@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --black: #000000;
  --white: #FFFFFF;
  --gray: #F0F0F0;
  --blue: #2563EB;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }

body.neo-brutalist {
  font-family: 'Space Grotesk', sans-serif;
  background-color: var(--white);
  color: var(--black);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

/* -------------------------------------
   AWWWARDS PRELOADER
------------------------------------- */
.preloader {
  position: fixed;
  inset: 0;
  background-color: var(--blue);
  color: var(--white);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
  height: 100dvh;
  width: 100vw;
}
.preloader.hidden {
  transform: translateY(-100%);
}
.preloader-content {
  text-align: center;
  width: 100%;
  max-width: 600px;
  padding: 0 2rem;
}
.preloader-phrase-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  text-transform: uppercase;
}
.word-o {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.word-mundo {
  font-size: clamp(4.5rem, 16vw, 9rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -2px;
}
.word-e-de {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: clamp(200px, 40vw, 350px);
  font-size: clamp(3rem, 10vw, 5rem);
  font-style: italic;
  font-weight: 500;
  margin: 0.5rem 0;
  text-transform: uppercase;
}
.word-quem {
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -2px;
}
.word-faz {
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -2px;
  margin-top: 0.2rem;
}
.preloader-credit {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 3rem;
}
/* Progress Bar */
.bottom-progress-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.2);
}
.bottom-progress-bar {
  height: 100%;
  width: 0%;
  background-color: var(--white);
  transition: width 0.1s ease;
}
/* Animations */
.fade-anim {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeInUp {
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* Background Color Classes */
.bg-blue { background-color: var(--blue) !important; }
.bg-white { background-color: var(--white) !important; }
.bg-black { background-color: var(--black) !important; color: var(--white) !important; }
.bg-gray { background-color: var(--gray) !important; }

/* Typography */
.font-space { font-family: 'Space Grotesk', sans-serif; }
.font-playfair { font-family: 'Playfair Display', serif; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.5rem; }
.text-white { color: var(--white) !important; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-8 { margin-top: 2rem; }
.mt-line { margin-top: 2rem; border-top: 2px solid var(--black); padding-top: 2rem; }
.block { display: block; }
.inline-icon { width: 1.2rem; height: 1.2rem; vertical-align: middle; }
.mr-2 { margin-right: 0.5rem; }
.p-6 { padding: 1.5rem; }
.w-full { width: 100%; }

.container { max-width: 900px; margin: 0 auto; padding: 0 5vw; }
.full-width { grid-column: 1 / -1; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: 80px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 5vw; background: var(--white); border-bottom: 2px solid var(--black);
  z-index: 100;
}
.logo { font-size: 1.25rem; font-weight: 700; line-height: 1; cursor: pointer; }
.nav-links { display: flex; gap: 1rem; }
.nav-btn {
  border: 2px solid var(--black); padding: 0.5rem 1rem;
  font-family: inherit; font-weight: 700; font-size: 0.8rem;
  cursor: pointer; transition: all 0.2s; box-shadow: 2px 2px 0 var(--black);
}
.nav-btn:hover { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--black); }

/* Landing Section */
.landing-section {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 100px 5vw; background-image: radial-gradient(var(--gray) 2px, transparent 2px);
  background-size: 30px 30px;
}
.landing-content { text-align: center; max-width: 800px; background: var(--white); padding: 3rem; border: 4px solid var(--black); box-shadow: 8px 8px 0 var(--black); }
.landing-title { font-size: clamp(3.5rem, 8vw, 6rem); line-height: 0.9; letter-spacing: -0.05em; margin-bottom: 1.5rem; }
.landing-title .text-accent { color: var(--blue); font-style: italic; }
.landing-subtitle { font-size: 1.1rem; font-weight: 500; max-width: 500px; margin: 0 auto 3rem auto; }
.action-split { display: flex; gap: 1.5rem; justify-content: center; }
.split-btn {
  flex: 1; max-width: 250px; padding: 1.5rem; border: 2px solid var(--black);
  cursor: pointer; text-align: left; transition: all 0.2s;
  display: flex; flex-direction: column; gap: 0.5rem; box-shadow: 4px 4px 0 var(--black);
}
.split-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--black); }
.split-btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--black); }
.split-btn.dark { color: var(--white); }
.split-btn.light { color: var(--black); }
.split-title { font-size: 1.25rem; font-weight: 700; }
.split-desc { font-size: 0.85rem; opacity: 0.9; }

@media (max-width: 768px) {
  .landing-content { padding: 2rem 1rem; border: 2px solid var(--black); box-shadow: 4px 4px 0 var(--black); }
  .action-split { flex-direction: column; align-items: center; }
  .split-btn { width: 100%; max-width: 100%; }
}

/* Form Section */
.form-section { padding: 120px 0; min-height: 100vh; }
.form-header {
  max-width: 900px; margin: 0 auto 3rem auto; padding: 0 5vw;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 2px solid var(--black); padding-bottom: 1rem;
}
.back-btn {
  background: transparent; border: none; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer; color: inherit;
}
.back-btn:hover { text-decoration: underline; }
.form-title { font-size: 1.25rem; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.input-block { display: flex; flex-direction: column; }
.input-block label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; margin-bottom: 0.5rem; }
input, select, textarea {
  width: 100%; max-width: 100%;
  background: var(--white); border: 2px solid var(--black); padding: 1rem;
  font-family: inherit; font-size: 1rem; font-weight: 500; transition: all 0.2s; border-radius: 0;
}
input:focus, select:focus, textarea:focus {
  outline: none; box-shadow: 4px 4px 0 var(--black); transform: translate(-2px, -2px);
}

.services-area { margin-bottom: 2rem; border: 2px solid var(--black); padding: 1.5rem; background: var(--gray); }
.service-row {
  display: grid; grid-template-columns: 3fr 1fr 1fr auto; gap: 1rem; margin-bottom: 1rem; align-items: end;
}
.add-btn {
  background: var(--white); border: 2px dashed var(--black); width: 100%; padding: 1rem;
  font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.2s;
}
.add-btn:hover { background: var(--gray); color: var(--black); }
.remove-btn {
  background: var(--white); color: var(--black); border: 2px solid var(--black);
  padding: 1rem; cursor: pointer;
}
.remove-btn:hover { background: var(--gray); }
.total-area {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: 1.25rem; padding: 1.5rem; border: 2px solid var(--black);
}
.total-value { font-size: 2rem; }

.form-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 2rem;
  margin-top: 3rem; border-top: 2px solid var(--black); padding-top: 2rem;
}
.copies-group { display: flex; align-items: center; }
.transparency-inline-btn {
  background: transparent; border: none; font-weight: 700; font-size: 1rem;
  text-decoration: underline; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; color: var(--black); transition: color 0.2s;
}
.transparency-inline-btn:hover { color: var(--blue); }
.submit-btn {
  color: var(--white); border: 2px solid var(--black); padding: 1.5rem 3rem;
  font-size: 1.5rem; font-weight: 700; cursor: pointer; box-shadow: 6px 6px 0 var(--black); transition: all 0.2s;
}
.submit-btn:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--black); }

@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .services-area { padding: 1rem; border: 2px solid var(--black); margin-left: 0; margin-right: 0; }
  .service-row { grid-template-columns: 1fr; gap: 0.5rem; border: 2px solid var(--black); padding: 1rem; margin-bottom: 1rem; background: var(--white); }
  .form-footer { flex-direction: column; }
  .submit-btn { width: 100%; }
  .total-area { flex-direction: column; text-align: center; gap: 1rem; padding: 1rem; }
  .total-value { font-size: 1.5rem; }
  .transparency-inline-btn { text-align: center; margin-bottom: 1rem; }
}

/* Chat AI Section */
.chat-section { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--white); }
.chat-header {
  height: 80px; display: flex; align-items: center; padding: 0 5vw;
  border-bottom: 2px solid var(--black); background: var(--white);
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
}
.chat-title { margin-left: auto; margin-right: auto; font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; }
.chat-history {
  flex: 1; padding: 100px 5vw 140px 5vw; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column;
  gap: 1.5rem; max-width: 800px; margin: 0 auto; width: 100%; background: var(--white);
}
.chat-bubble {
  max-width: 85%; padding: 1rem; border: 2px solid var(--black); font-size: 1.05rem;
  font-weight: 500; line-height: 1.4; animation: popIn 0.3s ease-out;
  word-wrap: break-word; overflow-wrap: break-word; word-break: break-word;
}
.chat-bubble.ai { align-self: flex-start; background: var(--gray); border-bottom-left-radius: 0; box-shadow: 4px 4px 0 var(--black); }
.chat-bubble.user { align-self: flex-end; background: var(--blue); color: var(--black); border-bottom-right-radius: 0; box-shadow: -4px 4px 0 var(--black); }
.chat-input-area {
  position: fixed; bottom: 0; left: 0; right: 0; padding: 1.5rem 5vw;
  background: var(--white); border-top: 2px solid var(--black); z-index: 10;
}
.chat-form { max-width: 800px; margin: 0 auto; display: flex; gap: 1rem; }
.chat-form input { flex: 1; padding: 1rem 1.5rem; font-size: 1.1rem; box-shadow: 4px 4px 0 var(--black); }
.chat-submit-btn {
  color: var(--white); border: 2px solid var(--black); width: 60px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 4px 4px 0 var(--black); transition: all 0.2s;
}
.chat-submit-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--black); }
.btn-download {
  background: var(--white); color: var(--black); border: 2px solid var(--black); padding: 1rem 2rem;
  font-weight: 700; font-size: 1.2rem; margin-top: 1rem; cursor: pointer; box-shadow: 4px 4px 0 var(--black); transition: all 0.2s; display: inline-block;
}
.btn-download:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--black); background: var(--gray); }

@keyframes popIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.floating-back-btn {
  position: fixed;
  bottom: 120px;
  right: 5vw;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
  border-radius: 50px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1000;
  cursor: pointer;
  transition: all 0.2s;
}
.floating-back-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--black);
}

/* Custom Modal */
.custom-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 3000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.custom-modal {
  width: 100%; max-width: 400px; padding: 2rem; border: 4px solid var(--black);
  box-shadow: 8px 8px 0 var(--black); text-align: center;
}
.modal-icon { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--black); background: var(--white); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem auto; }
.modal-actions { display: flex; gap: 1rem; justify-content: center; }
.modal-btn {
  padding: 0.75rem 1.5rem; font-weight: 700; border: 2px solid var(--black);
  cursor: pointer; transition: all 0.2s; box-shadow: 2px 2px 0 var(--black); flex: 1;
}
.modal-btn:hover { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--black); }

/* Sidebar History */
.history-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; }
.history-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px;
  background: var(--white); border-left: 2px solid var(--black);
  z-index: 2001; display: flex; flex-direction: column;
}
.history-header { padding: 2rem; border-bottom: 2px solid var(--black); display: flex; justify-content: space-between; align-items: center; background: var(--white); }
.close-btn { background: none; border: none; cursor: pointer; }
.history-content { flex: 1; overflow-y: auto; padding: 1rem; background: var(--gray); }
.history-item {
  background: var(--white); border: 2px solid var(--black);
  padding: 1.5rem; margin-bottom: 1rem; box-shadow: 4px 4px 0 var(--black);
}
.history-item-header { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 0.5rem; }
.history-item-footer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-weight: 600; }
.btn-reissue {
  background: var(--black); color: var(--white); border: 2px solid var(--black);
  padding: 0.5rem 1rem; font-weight: 700; cursor: pointer; width: 100%; transition: all 0.2s;
}
.btn-reissue:hover { background: var(--blue); color: var(--white); }
.history-footer { padding: 2rem; border-top: 2px solid var(--black); }
.clear-btn { border: 2px solid var(--black); color: var(--black); padding: 1rem; width: 100%; font-weight: 700; cursor: pointer; box-shadow: 4px 4px 0 var(--black); transition: all 0.2s; }
.clear-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--black); }

@media (max-width: 768px) { .history-panel { width: 100%; } }

/* Footer */
.footer { border-top: 2px solid var(--black); padding: 2rem 0; font-weight: 600; background: var(--white); }
.footer a { color: var(--black); }

/* Interactive Chat Elements */
.chat-interactive-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}
.chat-btn {
  flex: 1;
  padding: 1rem;
  font-weight: 700;
  text-align: center;
  border: 2px solid var(--black);
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--black);
  transition: all 0.2s;
}
.chat-btn.yes { background: var(--blue); color: var(--white); }
.chat-btn.no { background: var(--white); color: var(--black); }
.chat-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--black); }

