/* Saudade Mind Lab v3 — Main Stylesheet
   Matches the React/JSX design exactly. */
@import url('tokens.css');

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
input, textarea, select { font-size: 16px; font-family: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-headline);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--primary);
  text-wrap: balance;
}
p { text-wrap: pretty; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--secondary-soft); color: var(--primary); }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px)  { .container { padding: 0 32px; } }
@media (min-width: 1024px) { .container { padding: 0 48px; } }

.container-narrow {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) { .container-narrow { padding: 0 32px; } }

section { padding: clamp(56px, 9vw, 112px) 0; }

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
.h1 { font-size: clamp(34px, 6.4vw, 64px); line-height: 1.05; letter-spacing: -0.025em; }
.h2 { font-size: clamp(28px, 4.6vw, 48px); line-height: 1.08; }
.h3 { font-size: clamp(20px, 2.6vw, 28px); line-height: 1.2; }
.lede {
  font-size: clamp(16.5px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--on-surface-variant);
}
.body-lg { font-size: clamp(16px, 1.4vw, 18px); line-height: 1.7; }
.muted { color: var(--on-surface-variant); }
.italic-accent { font-style: italic; color: var(--secondary); font-weight: 400; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--secondary-soft);
  color: var(--primary);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--secondary);
  flex-shrink: 0;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-pill);
  padding: 16px 26px;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-body);
  letter-spacing: 0.005em;
  transition: transform 200ms ease, box-shadow 220ms ease, background 200ms ease, color 200ms ease;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  border: none;
}
.btn-lg { padding: 18px 32px; font-size: 16px; min-height: 56px; }
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 12px 32px -12px rgba(77,37,70,0.45);
}
.btn-primary:hover { transform: scale(0.97); box-shadow: 0 18px 40px -12px rgba(77,37,70,0.55); }
.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--outline);
}
.btn-secondary:hover { background: var(--surface-low); border-color: var(--primary); }
.btn-ghost {
  background: transparent;
  color: var(--primary);
  padding: 12px 18px;
  font-weight: 700;
}
.btn-ghost:hover { gap: 14px; }
.btn-block { width: 100%; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ── CARDS ───────────────────────────────────────────────────── */
.card { background: var(--surface); border-radius: var(--radius-md); padding: clamp(20px,3vw,28px); }
.card-soft { background: var(--surface-low); }

.editorial-card {
  border-radius: var(--radius-xl);
  padding: clamp(24px,4vw,40px);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.problem-card {
  background: var(--surface);
  padding: 22px 24px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
  transition: transform 240ms ease, box-shadow 240ms ease;
}
.problem-card h3 {
  font-family: var(--font-headline);
  font-size: 18px; font-weight: 700;
  color: var(--primary); margin-bottom: 6px; letter-spacing: -0.01em;
}
.problem-card p { font-size: 14.5px; color: var(--on-surface-variant); line-height: 1.55; }
.problem-card.alt-2 { border-left-color: var(--secondary); }
.problem-card.alt-3 { border-left-color: var(--tertiary); }
.problem-card.alt-4 { border-left-color: var(--secondary-fixed-dim); }
.problem-card.alt-5 { border-left-color: var(--primary-soft); }
@media (hover: hover) { .problem-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); } }

/* ── IMAGE FRAME (placeholder) ──────────────────────────────── */
.img-frame {
  position: relative;
  background:
    radial-gradient(at 30% 20%, rgba(198,120,130,0.35) 0%, transparent 50%),
    radial-gradient(at 70% 80%, rgba(140,91,63,0.28) 0%, transparent 50%),
    var(--surface-container);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-editorial);
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-frame .label {
  position: absolute; inset: auto 0 0 0;
  padding: 14px 18px;
  background: linear-gradient(to top, rgba(42,26,38,0.7), transparent);
  color: var(--on-primary);
  font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: 0.04em;
}
.img-frame .center-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 24px;
  color: var(--primary);
  font-family: ui-monospace, monospace; font-size: 12px;
  letter-spacing: 0.04em; opacity: 0.7;
  white-space: pre-line; line-height: 1.6;
}

.glow-blob {
  position: absolute; width: 280px; height: 280px;
  background: var(--tertiary-fixed); border-radius: 50%;
  filter: blur(70px); opacity: 0.35; z-index: -1;
}

/* ── BENTO GRID ──────────────────────────────────────────────── */
.bento { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .bento .span-2 { grid-column: span 2; }
}

/* ── CHIP ────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center;
  padding: 8px 16px; background: var(--surface);
  border-radius: var(--radius-pill); font-size: 13.5px;
  font-weight: 500; color: var(--primary); border: 1px solid var(--outline-soft);
}
.chip-active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* ── TRUST PILL ──────────────────────────────────────────────── */
.trust-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--outline-soft);
  font-size: 12.5px; font-weight: 600; color: var(--primary);
}

/* ── FAQ ─────────────────────────────────────────────────────── */
details.faq {
  background: var(--surface); border: 1px solid var(--outline-soft);
  border-radius: 20px; padding: 18px 22px; margin-bottom: 12px;
  transition: border-color 200ms ease;
}
details.faq[open] { border-color: var(--secondary); }
details.faq summary {
  cursor: pointer; font-weight: 700; font-size: 16px;
  color: var(--primary); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; font-size: 22px; color: var(--secondary); font-weight: 400;
  transition: transform 240ms ease; flex-shrink: 0; font-family: var(--font-body);
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { margin-top: 12px; color: var(--on-surface-variant); font-size: 15px; line-height: 1.6; }

/* ── FORM ────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--primary); margin-bottom: 7px; letter-spacing: 0.01em;
}
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--outline); border-radius: 14px;
  padding: 14px 16px; font-family: inherit; font-size: 16px;
  background: var(--surface); color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(198,120,130,0.25);
}

/* ── PULL QUOTE ──────────────────────────────────────────────── */
.pull-quote {
  position: relative;
  padding: clamp(28px,4vw,48px);
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.pull-quote::before {
  content: "\201C"; position: absolute; top: -40px; left: 16px;
  font-family: var(--font-headline); font-size: 240px;
  color: rgba(250,245,239,0.1); line-height: 1; pointer-events: none;
}

/* ── NAV ─────────────────────────────────────────────────────── */
.nav-shell {
  position: sticky; top: 0; z-index: 60;
  transition: background 240ms ease, border-color 240ms ease;
}
.nav-shell.scrolled {
  background: rgba(250,245,239,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--outline-soft);
}
.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 16px 20px; gap: 16px;
  max-width: 1240px; margin: 0 auto;
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--primary); text-decoration: none;
}
.nav-logo-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-headline); font-weight: 700; font-style: italic;
  font-size: 18px; flex-shrink: 0;
}
.nav-logo-text {
  font-family: var(--font-headline); font-size: 19px; font-weight: 700;
  letter-spacing: -0.01em;
}
.nav-logo-text em { font-style: italic; font-weight: 400; }
.nav-links {
  display: none; gap: 4px; list-style: none;
  align-items: center;
}
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-links a {
  padding: 10px 14px; font-size: 14.5px; font-weight: 500;
  color: var(--text); text-decoration: none; position: relative;
  transition: color 160ms;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); font-weight: 700; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 2px; background: var(--secondary); border-radius: 2px;
}
.nav-right {
  display: flex; align-items: center; gap: 14px;
}
.lang-toggle {
  display: inline-flex; align-items: center; gap: 0;
}
.lang-toggle a, .lang-toggle button {
  background: transparent; border: none; padding: 4px 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--on-surface-variant); text-transform: uppercase;
  cursor: pointer; text-decoration: none; transition: color 150ms;
  font-family: inherit;
}
.lang-toggle a.active, .lang-toggle button.active {
  color: var(--primary);
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px;
}
.lang-sep { color: var(--outline); font-size: 12px; }
.nav-cta { display: none !important; }
@media (min-width: 900px) { .nav-cta { display: inline-flex !important; } }

/* hamburger */
.hamburger {
  width: 44px; height: 44px; border-radius: 14px;
  border: 1px solid var(--outline); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
@media (min-width: 900px) { .hamburger { display: none !important; } }

/* Mobile drawer */
.drawer {
  display: none;
  position: fixed; inset: 0; background: var(--bg);
  z-index: 200; flex-direction: column; padding: 20px;
  overflow-y: auto;
}
.drawer.open { display: flex; }
.drawer-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px;
}
.drawer-close {
  width: 44px; height: 44px; border-radius: 14px;
  border: 1px solid var(--outline); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.drawer-links { list-style: none; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.drawer-links a {
  display: block; padding: 14px 16px;
  font-family: var(--font-headline); font-size: 26px; font-weight: 700;
  color: var(--primary); border-radius: var(--radius-md);
  text-decoration: none; transition: background 160ms;
}
.drawer-links a:hover { background: var(--surface-low); }
.drawer-footer {
  padding-top: 20px; border-top: 1px solid var(--outline-soft);
  display: flex; flex-direction: column; gap: 14px;
}

/* ── HERO GRID ───────────────────────────────────────────────── */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px)  { .hero-hide-sm { display: none !important; } }

/* ── TRUST STRIP ─────────────────────────────────────────────── */
.trust-strip {
  padding: 20px 0;
  border-top: 1px solid var(--outline-soft);
  border-bottom: 1px solid var(--outline-soft);
  background: var(--surface);
}
.trust-strip-inner {
  display: flex; flex-wrap: wrap;
  gap: 16px; justify-content: space-around; align-items: center;
}

/* ── CREDENTIALS LIST ────────────────────────────────────────── */
.cred-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.cred-list li {
  padding: 20px 24px; background: var(--surface);
  border-radius: 20px; border: 1px solid var(--outline-soft);
  display: flex; gap: 16px; align-items: flex-start;
}
.cred-num {
  font-family: var(--font-headline); font-style: italic; font-weight: 700;
  color: var(--secondary); font-size: 18px; flex-shrink: 0; min-width: 24px;
}
.cred-text { font-size: 15.5px; line-height: 1.5; }

/* ── APPROACH CHIPS ──────────────────────────────────────────── */
.approach-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── PROCESS STEPS ───────────────────────────────────────────── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.process-num {
  font-family: var(--font-headline);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 700; font-style: italic;
  color: var(--secondary); line-height: 1;
  margin-bottom: 12px; letter-spacing: -0.04em;
}

/* ── TRUST ITEMS GRID ────────────────────────────────────────── */
.trust-items {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.trust-item {
  padding: 20px 22px; background: var(--surface);
  border-radius: 20px; border: 1px solid var(--outline-soft);
}
.trust-item h3 {
  font-family: var(--font-headline); font-size: 17px; font-weight: 700;
  color: var(--primary); margin-bottom: 6px;
}
.trust-item p { color: var(--on-surface-variant); font-size: 14.5px; }
@media (max-width: 800px) { .trust-grid { grid-template-columns: 1fr !important; } }
@media (max-width: 480px) { .trust-items { grid-template-columns: 1fr !important; } }

/* ── FINAL CTA SECTION ───────────────────────────────────────── */
.final-cta-dark {
  background: var(--primary); color: var(--on-primary);
  padding: clamp(64px, 9vw, 112px) 0;
  border-top: 1px solid var(--outline-soft);
  text-align: center;
}
.final-cta-light {
  background: linear-gradient(180deg, var(--surface-low) 0%, var(--surface-container) 100%);
  padding: clamp(64px, 9vw, 112px) 0;
  border-top: 1px solid var(--outline-soft);
  text-align: center;
}

/* ── BLOG GRID ───────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.blog-card {
  background: var(--surface); border-radius: var(--radius-md);
  padding: 24px; border: 1px solid var(--outline-soft);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 220ms ease, box-shadow 220ms ease; cursor: pointer;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.blog-thumb {
  aspect-ratio: 16/10; border-radius: 16px;
  background: linear-gradient(135deg, var(--secondary-soft), var(--surface-container));
  position: relative;
}
.blog-tag-wrap { position: absolute; top: 12px; left: 12px; }
.blog-title {
  font-family: var(--font-headline); font-size: 19px; font-weight: 700;
  color: var(--primary); letter-spacing: -0.01em; line-height: 1.25;
}
.blog-readmore { margin-top: auto; color: var(--primary); font-size: 14px; font-weight: 700; }

/* ── CRISIS PAGE ─────────────────────────────────────────────── */
.crisis-alert {
  padding: 24px 28px; border-radius: 24px;
  background: #FFE8E0; border: 1px solid #E8B5A8; margin-bottom: 32px;
}
.crisis-alert p { font-size: 14px; color: #8B3A1F; font-weight: 600; line-height: 1.55; }
.crisis-row {
  padding: 22px 26px; background: var(--surface);
  border-radius: 24px; border: 1px solid var(--outline-soft);
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center;
}
@media (max-width: 600px) {
  .crisis-row { grid-template-columns: auto 1fr; }
  .crisis-row-detail { grid-column: span 2; text-align: left !important; padding-top: 8px; border-top: 1px solid var(--outline-soft); }
}
.crisis-num {
  font-family: var(--font-headline); font-style: italic; color: var(--secondary);
  font-size: 22px; font-weight: 700;
}
.crisis-country {
  font-size: 12px; color: var(--on-surface-variant); text-transform: uppercase;
  letter-spacing: 0.08em; font-weight: 700; margin-bottom: 4px;
}
.crisis-org {
  font-family: var(--font-headline); font-size: 18px; font-weight: 700; color: var(--primary);
}
.crisis-phone { font-size: 16px; font-weight: 700; color: var(--primary); }
.crisis-web { font-size: 13px; color: var(--on-surface-variant); }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--text); color: var(--on-primary);
  padding: clamp(48px,7vw,80px) 0 28px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px; margin-bottom: 40px;
}
@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}
.footer-logo-text {
  font-family: var(--font-headline); font-size: 22px; font-weight: 700;
  letter-spacing: -0.01em; margin-bottom: 10px; color: var(--on-primary);
  display: block;
}
.footer-logo-text em { font-style: italic; font-weight: 400; }
.footer-tagline { font-size: 14px; color: rgba(250,245,239,0.6); line-height: 1.6; max-width: 260px; }
.footer-nav-h {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(250,245,239,0.4); margin-bottom: 14px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 14px; color: rgba(250,245,239,0.7); text-decoration: none; transition: color 150ms;
}
.footer-links a:hover { color: var(--on-primary); }
.footer-divider { height: 1px; background: rgba(250,245,239,0.08); margin-bottom: 22px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
  font-size: 13px; color: rgba(250,245,239,0.4);
}
.footer-crisis {
  padding: 16px 20px; border-radius: 14px;
  background: rgba(250,245,239,0.05); border: 1px solid rgba(250,245,239,0.08);
  font-size: 13px; color: rgba(250,245,239,0.55); line-height: 1.6; margin-bottom: 32px;
}

/* ── MOBILE STICKY CTA ───────────────────────────────────────── */
.mobile-cta {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(250,245,239,0.96);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid var(--outline-soft); z-index: 90;
}
@media (max-width: 768px) {
  .mobile-cta { display: block; }
  body { padding-bottom: 84px; }
}

/* ── WHATSAPP FLOAT ──────────────────────────────────────────── */
.whatsapp-float {
  position: fixed; right: 18px; bottom: 24px;
  width: 56px; height: 56px;
  background: #25D366; color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18); z-index: 80;
  transition: transform 200ms ease; text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.06); }
@media (max-width: 768px) { .whatsapp-float { bottom: 96px; right: 16px; width: 52px; height: 52px; } }

/* ── SKIP LINK ───────────────────────────────────────────────── */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 14px; border-radius: 8px; z-index: 9999;
}
.skip:focus { left: 16px; top: 16px; }

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 600ms ease both; }

/* ── UTILITIES ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.tabular { font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .desktop-only { display: none !important; } }
@media (min-width: 901px) { .mobile-only  { display: none !important; } }
@media (max-width: 600px) { .hide-sm { display: none !important; } }
