/*
  Frontend Design direction v3 (2026-08-18): dark theme.
  Loaded after v1/v2 — wins the cascade. v1/v2 stay intact as a rollback point.

  Token remap: --ink/--fd-ink -> white text, --white/--fd-surface -> dark surface
  (repurposed, not renamed, so every existing var()-based rule flips automatically).
  --blue/--green-2/--amber/--fd-accent -> bright yellow (small accents, buttons, links).
  --green/--fd-accent-deep -> deep amber (button fill, a few "already dark" block accents).

  That flip breaks two kinds of rule that assumed the OLD meaning:
  1) sections that used var(--ink)/var(--green) as a BACKGROUND for an "inverted dark
     block on a light page" (.result-section, .thanks-page, .site-footer) — now that
     the whole page is dark, these need an explicit surface color instead of inheriting
     the flipped token.
  2) hardcoded hex colors that were never routed through a token (draft-notice, form
     inputs, callout boxes, etc.) — these don't auto-flip and need direct overrides.
  Everything else (the vast majority of the page) flips automatically via the tokens
  below and needs no further rule here.
*/

:root {
  --ink: #f5f6f2;
  --muted: #9aa3ab;
  --paper: #0a0b0e;
  --white: #14161a;
  --green: #caa000;
  --green-2: #f4c430;
  --blue: #f4c430;
  --mint: #fbe6a8;
  --line: rgba(255, 255, 255, .12);
  --amber: #f4c430;

  --fd-paper: #0a0b0e;
  --fd-surface: #14161a;
  --fd-ink: #f5f6f2;
  --fd-muted: #9aa3ab;
  --fd-accent: #f4c430;
  --fd-accent-deep: #caa000;
  --fd-steel: #454b52;
  --fd-line: rgba(255, 255, 255, .12);
}

:focus-visible { outline-color: #f4c430; }

/* --- hardcoded literals that don't route through a token --- */
.draft-notice { background: #1a1d22; color: var(--muted); border-bottom-color: var(--line); }
.approval-note { border-color: rgba(244, 196, 48, .3); }
.portrait-frame { background: #20242a; }
.principle-mark { border-color: rgba(244, 196, 48, .3); }
.question-section, .profile-materials-section { background: #101216; }
.boundary-card.fits { background: #15181c; }
.boundary-card.not-fits { border-top-color: #33383e; }
.not-fits li svg { color: var(--muted); }
.career-card { background: #15181c; }
.company-logo-grid figure:hover { background: #1e2227; }
.value-grid article { background: rgba(255, 255, 255, .05); border-color: rgba(244, 196, 48, .18); }
.profile-history details { background: rgba(255, 255, 255, .05); border-color: rgba(244, 196, 48, .22); }
.media-note { background: rgba(255, 255, 255, .05); }
.verification-note { background: rgba(255, 255, 255, .05); }
.application-usp { background: rgba(255, 255, 255, .05); }
.quiz-progress-track { background: rgba(255, 255, 255, .1); }
.lead-form input:not([type=checkbox]), .lead-form select, .lead-form textarea,
.admin-page input:not([type=checkbox]), .admin-page textarea { background: #0f1114; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus,
.admin-page input:focus, .admin-page textarea:focus { box-shadow: 0 0 0 3px rgba(244, 196, 48, .16); }
.lead-form [aria-invalid=true] { border-color: #e05a4a !important; }
.consent-check input { background-color: rgba(255, 255, 255, .06); }
.consent-check input:focus-visible { box-shadow: 0 0 0 3px rgba(244, 196, 48, .22); }
.form-status { color: #ff8a75; }
.form-status:not(:empty) { background: rgba(224, 90, 74, .12); border-left-color: #e05a4a; }
.mobile-sticky { background: rgba(10, 11, 14, .92); border-top: 1px solid var(--line); }
.legal-intro { background: rgba(244, 196, 48, .1); color: var(--ink); }
.thanks-icon { background: rgba(244, 196, 48, .14); }
.admin-message { background: rgba(244, 196, 48, .1); }
.site-footer { background: #101216; }
.application-section { background: #101216; }

/* yellow is a button/accent color, not a fill — keep it off large section backgrounds */
.button-primary { background: #f4c430; color: #14161a; }
.button-primary:hover { background: #d9a900; }
.direct-contact { background: #101216; color: var(--ink); }
.direct-contact .eyebrow { color: var(--mint); }
.direct-phone { color: var(--blue); }
.direct-contact .button-ghost { color: var(--ink); }
.direct-contact .button-primary { background: #f4c430; color: #14161a; }
.direct-contact .button-primary:hover { background: #d9a900; color: #14161a; }
.thanks-page { background: #101216; }

/* --- sections that used the old --ink/--green as an "inverted dark block" fill;
   now that the page itself is dark, they need their own explicit surface --- */
.result-section { background: #15181c; color: var(--ink); }
.result-title .eyebrow, .result-list li > span, .result-list li > svg { color: var(--blue); }
.result-list h3 { color: var(--ink); }
.site-footer { color: var(--ink); }

/* --- hero constellation canvas: full-bleed, so the hero-visual portrait (which
   would otherwise sit on top and block half the grid) is dropped from the hero;
   the same photo reappears in the process section below and in "about" --- */
.hero { position: relative; grid-template-columns: 1fr; max-width: none; margin: 0; }
.hero-visual { display: none; }
.hero-copy { max-width: 900px; margin: 0; padding: 0 clamp(20px, 4vw, 64px); box-sizing: border-box; }
@media (min-width: 1050px) {
  /* Reproduces where the text sat back when .hero itself was capped at 1240px and
     centered — same left inset, now that .hero is full-bleed for the canvas. */
  .hero-copy { margin-left: max(0px, calc((100% - 1240px) / 2)); margin-right: auto; }
}
.hero-constellation { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; pointer-events: auto; }
.hero-copy { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-constellation { opacity: .5; }
}

/* --- retint the Vimeo poster thumbnail (a fixed external asset, can't regenerate it) to the site's black/yellow palette --- */
.media-video-poster img { filter: grayscale(1) contrast(2.2) brightness(.5) sepia(1) hue-rotate(-12deg) saturate(6); }
.media-video-poster::after { background: linear-gradient(180deg, rgba(10, 11, 14, .15) 30%, rgba(10, 11, 14, .88)); }
.media-video-play { border-color: rgba(244, 196, 48, .75); background: rgba(10, 11, 14, .78); }
.media-video-play::after { border-left-color: #f4c430; }
.media-project-video { background: #101216; }

/* --- process section: real portrait instead of the old decorative sketch-sheet stack --- */
.process-body { display: grid; grid-template-columns: .78fr 1.22fr; gap: 8vw; align-items: start; }
.process-visual { position: sticky; top: 90px; display: block; width: 100%; max-width: 380px; }
.process-visual .portrait-picture { border-radius: 4px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.process-visual .portrait-picture img { aspect-ratio: 4 / 5; object-fit: cover; }
.process-line { display: block; }
.process-line article { padding-top: 0; padding-bottom: 44px; border-top: 0; border-bottom: 1px solid var(--line); }
.process-line article:last-child { border-bottom: 0; }
.process-line article::before { display: none; }
@media (max-width: 1050px) {
  .process-body { grid-template-columns: 1fr; gap: 40px; }
  .process-visual { position: static; max-width: 260px; margin: 0 auto; }
}

/* --- two-column sections only collapsed below 760px; on 761-1049px viewports
   (tall/large phones, small tablets) they stayed two-column and overflowed the
   viewport (photo/text columns wider than the screen). Collapse them earlier. --- */
@media (max-width: 900px) {
  .question-section, .about-section, .result-section, .faq-section, .application-section, .offer-section {
    grid-template-columns: 1fr;
  }
  .question-intro, .result-title, .application-intro { position: static; }
  .about-photo { order: 2; height: 70vw; max-height: 480px; }
  .about-copy { order: 1; }
  .question-list li { font-size: 1.2rem; }
}

/* --- readability: several description/paragraph sizes read as too small on dark bg --- */
.quiz-step-intro { font-size: .92rem; }
.application-intro > p:not(.eyebrow) { font-size: 1rem; }
.application-usp p { font-size: .86rem; }
.application-next p { font-size: .82rem; }
.application-next strong { font-size: .92rem; }
.field-hint { font-size: .78rem; }
.form-note { font-size: .74rem; }
.lead-form label > span:first-child { font-size: .82rem; }

/* --- submit-button loading state (pixel-grid wavefront + shimmer label + elapsed timer) --- */
.btn-loader { display: inline-flex; align-items: center; gap: 10px; }
.btn-loader-grid { display: grid; grid-template-columns: repeat(3, 4px); gap: 1.5px; }
.btn-loader-grid span { width: 4px; height: 4px; border-radius: 1px; background: currentColor; opacity: .15; animation: pixel-on 650ms ease-in-out infinite; }
.btn-loader-label {
  background-image: linear-gradient(90deg, currentColor 35%, rgba(20, 22, 26, .45) 50%, currentColor 65%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: shimmer-text 1.4s linear infinite;
}
.btn-loader-timer { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .72rem; opacity: .8; font-variant-numeric: tabular-nums; }
@keyframes pixel-on { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes shimmer-text { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .btn-loader-grid span { animation: none !important; opacity: .4 !important; }
  .btn-loader-label { animation: none !important; background: none !important; -webkit-text-fill-color: currentColor; color: inherit !important; }
}

/* --- exit-intent popup --- */
.exit-modal-backdrop { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(6, 7, 9, .78); backdrop-filter: blur(2px); opacity: 0; transition: opacity .25s ease; }
.exit-modal-backdrop[hidden] { display: none; }
.exit-modal-backdrop.is-visible { opacity: 1; }
.exit-modal { position: relative; width: min(100%, 480px); max-height: calc(100vh - 40px); overflow-y: auto; padding: clamp(28px, 4vw, 40px); background: #14161a; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); transform: translateY(14px); transition: transform .25s ease; }
.exit-modal-backdrop.is-visible .exit-modal { transform: translateY(0); }
.exit-modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.exit-modal-close:hover { background: rgba(255, 255, 255, .06); }
.exit-modal-close svg { width: 16px; height: 16px; }
.exit-modal .eyebrow { margin-bottom: 14px; }
.exit-modal h2 { max-width: 380px; margin-bottom: 12px; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.exit-modal p { margin: 0 0 22px; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.exit-modal label { display: block; margin-bottom: 14px; }
.exit-modal label > span:first-child { display: block; margin-bottom: 6px; font-size: .78rem; font-weight: 600; }
.exit-modal input:not([type=checkbox]) { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--fd-steel); border-radius: 8px; background: #0f1114; color: var(--ink); }
.exit-modal input:focus { outline: none; border-color: #f4c430; box-shadow: 0 0 0 3px rgba(244, 196, 48, .16); }
.exit-modal .consent-check { margin: 6px 0 20px; }
.exit-modal .button-submit { width: 100%; }
.exit-modal-status { min-height: 20px; margin-bottom: 8px; color: #ff8a75; font-size: .78rem; }
.exit-modal-success { text-align: center; }
.exit-modal-success svg { width: 40px; height: 40px; margin: 0 auto 16px; color: #f4c430; }
@media (max-width: 480px) {
  .exit-modal { padding: 26px 20px; }
}

/* --- team immersion photo gallery --- */
.team-immersion-section { padding-bottom: 60px; }
.team-gallery-wrap { position: relative; }
.team-gallery { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; padding: 4px 0 12px; }
.team-gallery::-webkit-scrollbar { display: none; }
.team-gallery-item { flex: 0 0 auto; width: min(78vw, 460px); aspect-ratio: 3 / 2; margin: 0; scroll-snap-align: start; border-radius: 4px; overflow: hidden; background: #15181c; }
.team-gallery-item picture, .team-gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.team-gallery-arrow { position: absolute; top: 50%; z-index: 2; width: 46px; height: 46px; display: grid; place-items: center; margin-top: -6px; transform: translateY(-50%); border: 1px solid var(--line); border-radius: 50%; background: rgba(10, 11, 14, .85); color: var(--ink); cursor: pointer; backdrop-filter: blur(4px); }
.team-gallery-arrow:hover { border-color: #f4c430; color: #f4c430; }
.team-gallery-arrow svg { width: 18px; height: 18px; }
.team-gallery-prev { left: -8px; }
.team-gallery-prev svg { transform: rotate(180deg); }
.team-gallery-next { right: -8px; }
@media (max-width: 760px) {
  .team-gallery-arrow { display: none; }
  .team-gallery-item { width: 84vw; }
}

