/* ==========================================================================
   WTC GOIÂNIA — tokens
   Palette aligned to the WTC Goiânia Branding Book (client request,
   2026-09-29): the off-brand navy #1B2C40 is gone. Blue takes every field
   the navy used to fill; the brand's dark gray takes every text role.
     --color-ink       #404040  (dark gray, Pantone 446 C — all text)
     --color-secondary #698DC1  (blue, Pantone 7682 C — dark fields)
     --color-accent    #E2A35E  (orange, Pantone 7411 C)
     --color-bg-light  #EFEFEF  (light gray — base for "light" sections)
     --color-white     #FFFFFF  (cards, text on blue)

   Unlike the previous lock, this palette allows derived hover/active/focus
   states via color-mix() — see the *-hover/-active/-focus tokens below.
   Everything else stays flat, matching each color's stated role.
   ========================================================================== */

:root {
  /* ---- the 5 brand colors -------------------------------------------- */
  --color-ink:       #404040;
  --color-secondary: #698DC1;
  --color-accent:    #E2A35E;
  --color-bg-light:  #EFEFEF;
  --color-white:     #FFFFFF;

  /* ---- derived interaction states (proportional, not new brand colors) ---
     Hover/active darken toward black; focus lightens toward white for a
     visible ring. Accent's darken steps are deliberately small — it's a
     mid-brightness orange, and darkening it much past ~6-8% drops text in
     --color-ink below 4.5:1 (flat: 4.76:1). */
  --color-secondary-hover:  color-mix(in srgb, var(--color-secondary) 85%, black);
  --color-secondary-active: color-mix(in srgb, var(--color-secondary) 70%, black);
  --color-secondary-focus:  color-mix(in srgb, var(--color-secondary) 60%, white);

  --color-accent-hover:     color-mix(in srgb, var(--color-accent) 94%, black);
  --color-accent-active:    color-mix(in srgb, var(--color-accent) 88%, black);
  --color-accent-focus:     color-mix(in srgb, var(--color-accent) 70%, white);

  /* ---- semantic roles (light theme, default) ------------------------------
     Base sections sit on --color-bg-light (9.0:1 for ink text — AAA);
     cards/surfaces lift off that with flat white (10.4:1). Ink carries all
     text roles (titles and body). */
  --fundo:        var(--color-bg-light);
  --superficie:   var(--color-white);
  --tinta:        var(--color-ink);
  --tinta-forte:  var(--color-ink);
  --tinta-fraca:  var(--color-ink);
  --tinta-tenue:  var(--color-ink);
  --linha:        var(--color-ink);
  --linha-tenue:  var(--color-ink);
  --acento:       var(--color-accent);
  --acento-grafo: var(--color-accent);

  /* ---- typography ----------------------------------------------------------- */
  --f-display: "Schibsted Grotesk", sans-serif;
  --f-body:    "Open Sans", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --f-data:    "Open Sans", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;

  --t-display: clamp(2.75rem, 7.2vw, 6rem);
  --t-h1:      clamp(2.125rem, 5vw, 3.75rem);
  --t-h2:      clamp(1.625rem, 3.2vw, 2.625rem);
  --t-h3:      clamp(1.1875rem, 1.9vw, 1.5rem);
  --t-h4:      clamp(1.0625rem, 1.4vw, 1.1875rem);
  --t-lead:    clamp(1.0625rem, 1.35vw, 1.3125rem);
  --t-body:    1.0625rem;
  --t-small:   0.9375rem;
  --t-micro:   0.8125rem;
  --t-label:   0.6875rem;

  --ls-display: 0;
  --ls-label:   0.18em;
  --ls-data:    0.04em;

  --lh-display: 1.02;
  --lh-title:   1.14;
  --lh-body:    1.68;

  /* ---- spacing --------------------------------------------------------------- */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 3rem;     --sp-8: 4rem;
  --sp-9: 6rem;     --sp-10: 8rem;

  --section-y: clamp(4rem, 9vw, 8.5rem);
  --wrap:      78rem;
  --wrap-narrow: 46rem;
  --gutter:    clamp(1.25rem, 5vw, 4rem);

  /* ---- motion ------------------------------------------------------------ */
  --e-exit:     cubic-bezier(0.22, 1, 0.36, 1);
  --e-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --d-fast:   180ms;
  --d-medium: 340ms;
  --d-slow:   760ms;

  --z-drawer: 80;
  --z-header: 90;
  --z-modal:  100;

  --whatsapp-size: 54px;  /* floating button; the consent banner clears it */

  /* ---- placeholder field for .frame / .hero-media before real photos ---- */
  --g-frame: var(--color-secondary);
}

/* Hero: flat blue field. Heroes with a photo/video sit under a dark scrim
   (.hero-media), so orange accent works there; a hero with no media
   (404, policy) shows the flat blue, where orange is only 1.56:1 — the
   override below swaps accent for white. White text on the flat blue is
   3.4:1 (AA large only — pending client review, 2026-09-29). */
.hero {
  --fundo:        var(--color-secondary);
  --superficie:   var(--color-secondary);
  --tinta:        var(--color-white);
  --tinta-forte:  var(--color-white);
  --tinta-fraca:  var(--color-white);
  --tinta-tenue:  var(--color-white);
  --linha:        var(--color-white);
  --linha-tenue:  var(--color-white);
  --acento:       var(--color-accent);
  --acento-grafo: var(--color-accent);
}
.hero:not(:has(.hero-media)) {
  --acento:       var(--color-white);
  --acento-grafo: var(--color-white);
}

/* Orange section: dark text on the mid-brightness field, so ink carries
   the text, not white (4.76:1). */
.theme-dark {
  --fundo:        var(--color-accent);
  --superficie:   var(--color-white);
  --tinta:        var(--color-ink);
  --tinta-forte:  var(--color-ink);
  --tinta-fraca:  var(--color-ink);
  --tinta-tenue:  var(--color-ink);
  --linha:        var(--color-ink);
  --linha-tenue:  var(--color-ink);
  --acento:       var(--color-ink);
  --acento-grafo: var(--color-ink);
}

/* Blue section (search hero, stats bar, final CTA): flat secondary.
   White text on it is ~3.4:1 (AA only for large text) since the switch to
   #698DC1 on 2026-09-29. --acento uses white instead of
   accent here: accent-on-secondary is only ~1.6:1,
   well short of AA — same problem the old palette had with Laranja-on-Azul. */
.theme-cerrado {
  --fundo:        var(--color-secondary);
  --superficie:   var(--color-white);
  --tinta:        var(--color-white);
  --tinta-forte:  var(--color-white);
  --tinta-fraca:  var(--color-white);
  --tinta-tenue:  var(--color-white);
  --linha:        var(--color-white);
  --linha-tenue:  var(--color-white);
  --acento:       var(--color-white);
  --acento-grafo: var(--color-white);
}

/* White section (Events quote form). Orange on white is ~2.1:1, so text
   accents, focus rings and the checkbox switch to ink (10.4:1), as on
   .theme-dark. The brand dots stay orange: they are decorative only. */
.theme-white {
  --fundo:        var(--color-white);
  --superficie:   var(--color-white);
  --acento:       var(--color-ink);
  --acento-grafo: var(--color-ink);
}
.theme-white .brand-dots i { background: var(--color-accent); }

/* Stats bar under the hero — same flat secondary as .theme-cerrado. */
.stats-bar {
  --fundo:        var(--color-secondary);
  --tinta:        var(--color-white);
  --tinta-forte:  var(--color-white);
  --tinta-tenue:  var(--color-white);
  --linha:        var(--color-white);
}
