/* ============================================================================
 *  Global chrome + shared marketing tokens. Loaded on EVERY page via baseHead()
 *  (unlike home.css which is page-scoped). Holds the design tokens the marketing
 *  pages consume + the site footer styling. Nav styling joins here when the full
 *  nav is ported. Ported from legacy design-tokens.css + home.css; light theme.
 *  Fonts map to Inter Tight (custom display font deferred — see docs/phase-03/10).
 * ========================================================================== */
:root {
  /* Fonts — all mapped to Inter Tight (see note above) */
  --font-display: 'Inter Tight', system-ui, sans-serif;
  --font-body:    'Inter Tight', system-ui, sans-serif;
  --font-logo:    'Inter Tight', system-ui, sans-serif;

  /* Brand (constant) */
  --brand-blue:   #3901FB;
  --brand-violet: #693EFE;
  --brand-indigo: #3333FF;
  --brand-lilac:  #9A7DFE;

  /* HERO — always dark */
  --hero-bg:           #140342;
  --hero-bg-deep:      #0a0125;
  --hero-text:         #FFFFFF;
  --hero-text-dim:     rgba(255, 255, 255, 0.72);
  --hero-text-faint:   rgba(255, 255, 255, 0.45);
  --hero-border:       rgba(255, 255, 255, 0.10);
  --hero-surface:      rgba(255, 255, 255, 0.06);
  --hero-glow-1:       rgba(76, 38, 235, 0.55);
  --hero-glow-2:       rgba(57, 1, 251, 0.22);
  --hero-btn-bg:       #FFFFFF;
  --hero-btn-fg:       #140342;
  --hero-btn-bg-hover: #f4f0ff;

  /* PAGE — themed; light defaults */
  --page-bg:            #FFFFFF;
  --page-surface:       #FFFFFF;
  --page-text:          #140342;
  --page-text-dim:      rgba(20, 3, 66, 0.65);
  --page-text-faint:    rgba(20, 3, 66, 0.45);
  --page-border:        rgba(20, 3, 66, 0.10);
  --page-surface-hover: rgba(20, 3, 66, 0.05);
  --page-shadow:        0 16px 48px -8px rgba(20, 3, 66, 0.18),
                        0 2px 6px -2px rgba(20, 3, 66, 0.08);

  /* Layout */
  --nav-height:    76px;
  --container-px:  48px;
  --section-py:    clamp(64px, 8vw, 112px);
  --container-max: 1280px;
  --radius-btn:    8px;
  --radius-control:10px;
  --radius-card:   12px;
  --stack-cards-gap: 2rem;
}

/* =============================== FOOTER =============================== */
    /* =====================================================================
       FOOTER — dark plate. Brand block + 3 link columns. Top glow.
       ===================================================================== */
    .footer {
      position: relative;
      background: #0a0125;
      color: rgba(255, 255, 255, 0.85);
      padding: clamp(64px, 8vw, 112px) var(--container-px) 32px;
      overflow: hidden;
      isolation: isolate;
    }
    .footer::before {
      content: '';
      position: absolute;
      left: 50%;
      bottom: -360px;
      width: 760px; height: 760px;
      transform: translateX(-50%);
      background: radial-gradient(circle, rgba(105, 62, 254, 0.4), transparent 60%);
      filter: blur(60px);
      pointer-events: none;
      z-index: -1;
    }
    .footer__container { max-width: 1280px; margin: 0 auto; }
    .footer__top {
      display: grid;
      grid-template-columns: 1fr;
      gap: clamp(40px, 5vw, 64px);
      margin-bottom: clamp(48px, 6vw, 72px);
    }
    @media (min-width: 768px) {
      .footer__top { grid-template-columns: 1fr 1fr 1fr 1fr; }
    }
    @media (min-width: 1024px) {
      .footer__top { grid-template-columns: 2fr 1fr 1fr 1fr; }
    }

    .footer__brand-block { display: flex; flex-direction: column; gap: 20px; }
    .footer__brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: #FFFFFF;
      text-decoration: none;
    }
    .footer__brand-icon {
      width: 30px;
      height: 30px;
      flex: 0 0 auto;
      display: inline-flex;
    }
    .footer__brand-icon svg { width: 100%; height: 100%; display: block; }
    .footer__wordmark {
      font-family: var(--font-logo);
      font-size: 22px;
      font-weight: 700;
      letter-spacing: 0.04em;
      line-height: 1;
      color: #FFFFFF;
    }
    .footer__tagline {
      font-size: 14px;
      line-height: 1.55;
      color: rgba(255, 255, 255, 0.65);
      margin: 0;
      max-width: 360px;
    }
    .footer__social {
      display: inline-flex;
      align-items: center;
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 999px;
      overflow: hidden;
      width: fit-content;
    }
    .footer__social-link {
      width: 38px;
      height: 38px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: rgba(255, 255, 255, 0.75);
      transition: color .15s ease, background-color .15s ease;
      border-right: 1px solid rgba(255, 255, 255, 0.10);
    }
    .footer__social-link:last-child { border-right: none; }
    .footer__social-link:hover {
      color: #FFFFFF;
      background-color: rgba(255, 255, 255, 0.06);
    }
    .footer__social-link svg { width: 16px; height: 16px; fill: currentColor; }

    .footer__col-heading {
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, 0.5);
      margin: 0 0 14px;
    }
    .footer__col-list {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .footer__col-link {
      color: rgba(255, 255, 255, 0.78);
      text-decoration: none;
      font-size: 14px;
      transition: color .15s ease;
    }
    .footer__col-link:hover { color: #FFFFFF; }
    /* "Cookie settings" reopens the consent manager — render the <button> as a link. */
    .footer__col-link--button {
      appearance: none;
      background: none;
      border: 0;
      padding: 0;
      margin: 0;
      font-family: inherit;
      line-height: inherit;
      text-align: left;
      cursor: pointer;
    }

    .footer__divider {
      border: none;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      margin: 0 0 24px;
    }
    .footer__copyright {
      text-align: center;
      font-size: 13px;
      color: rgba(255, 255, 255, 0.55);
      margin: 0;
    }

    .js .footer:not(.is-revealed) .footer__brand-block,
    .js .footer:not(.is-revealed) .footer__col,
    .js .footer:not(.is-revealed) .footer__copyright { opacity: 0; }
    .footer.is-revealed .footer__brand-block { animation: offer-reveal .7s cubic-bezier(0.22, 1, 0.36, 1) .15s both; }
    .footer.is-revealed .footer__col:nth-of-type(1) { animation: offer-reveal .6s cubic-bezier(0.22, 1, 0.36, 1) .30s both; }
    .footer.is-revealed .footer__col:nth-of-type(2) { animation: offer-reveal .6s cubic-bezier(0.22, 1, 0.36, 1) .40s both; }
    .footer.is-revealed .footer__col:nth-of-type(3) { animation: offer-reveal .6s cubic-bezier(0.22, 1, 0.36, 1) .50s both; }
    .footer.is-revealed .footer__copyright { animation: offer-reveal .6s cubic-bezier(0.22, 1, 0.36, 1) .65s both; }
    @media (prefers-reduced-motion: reduce) { .footer:not(.is-revealed) * { opacity: 1; } }

/* =============================== NAV ================================ *
 * Dark, sticky, white-on-dark. Group/Personal/lang dropdowns use native
 * <details> (no-JS, accessible). Mobile menu uses a checkbox-hack toggle
 * (no-JS). chrome.js adds one-open + outside-click/Escape enhancement.
 * ------------------------------------------------------------------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--container-px);
  background: var(--hero-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hero-border);
  box-sizing: border-box;
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--hero-text); text-decoration: none; flex: 0 0 auto; }
.logo__img { height: 26px; width: auto; }

/* Collapsible region (primary menu + right cluster). Desktop: spread row. */
.nav-collapse { display: flex; align-items: center; justify-content: space-between; flex: 1 1 auto; gap: 24px; }
.nav-menu { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-menu__item { position: relative; }
.nav-menu__link {
  display: inline-flex; align-items: center; gap: 5px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--hero-text);
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  background: none; border: 0; text-decoration: none;
}
summary.nav-menu__link { list-style: none; }
summary.nav-menu__link::-webkit-details-marker { display: none; }
.nav-menu__link:hover { background: var(--hero-surface); }
.nav-menu__chevron { width: 11px; height: 11px; opacity: .7; transition: transform .2s ease; }
details[open] > .nav-menu__link .nav-menu__chevron { transform: rotate(180deg); }

/* Dropdown card (the <details> content) */
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--page-surface); color: var(--page-text);
  border: 1px solid var(--page-border); border-radius: 14px;
  box-shadow: var(--page-shadow); padding: 10px; z-index: 100;
}
.dropdown__inner { display: flex; gap: 14px; }
.dropdown__col { display: flex; flex-direction: column; gap: 2px; min-width: 300px; }
.dropdown__item { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: inherit; }
.dropdown__item:hover { background: var(--page-surface-hover); }
.dropdown__icon { width: 38px; height: 38px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--page-surface-hover); color: var(--brand-violet); }
.dropdown__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dropdown__body { display: flex; flex-direction: column; gap: 1px; }
.dropdown__title { font-size: 14px; font-weight: 600; color: var(--page-text); }
.dropdown__desc { font-size: 12.5px; color: var(--page-text-dim); line-height: 1.4; }
.dropdown__featured { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 12px; background: linear-gradient(160deg, #f4f1fb, #ffffff); border: 1px solid var(--page-border); min-width: 230px; text-decoration: none; color: inherit; }
.dropdown__featured-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-violet); }
.dropdown__featured-title { font-size: 18px; font-weight: 700; color: var(--page-text); margin: 0; }
.dropdown__featured-desc { font-size: 13px; color: var(--page-text-dim); margin: 0; line-height: 1.45; }
.dropdown__featured-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand-violet); }
.dropdown__featured-cta svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.7; fill: none; }

/* Right cluster: lang + auth */
.nav-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.lang { position: relative; }
summary.lang__trigger { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--hero-text); cursor: pointer; list-style: none; }
summary.lang__trigger::-webkit-details-marker { display: none; }
.lang__trigger:hover { background: var(--hero-surface); }
.lang__trigger svg { width: 10px; height: 10px; opacity: .7; transition: transform .2s ease; }
details[open] > .lang__trigger svg { transform: rotate(180deg); }
.lang__menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 170px; background: var(--page-surface); border: 1px solid var(--page-border); border-radius: 10px; padding: 4px; box-shadow: var(--page-shadow); z-index: 100; }
.lang__option { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border-radius: 6px; font-size: 13px; color: var(--page-text); text-decoration: none; }
.lang__option:hover { background: var(--page-surface-hover); }
.lang__option[aria-current="true"] { font-weight: 700; }
.nav-right__login { padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--hero-text); text-decoration: none; white-space: nowrap; }
.nav-right__login:hover { opacity: .8; }
.nav-cta { display: inline-flex; align-items: center; justify-content: center; padding: 9px 18px; border-radius: var(--radius-btn); font-size: 14px; font-weight: 600; background: var(--hero-btn-bg); color: var(--hero-btn-fg); text-decoration: none; white-space: nowrap; transition: background .15s ease; }
.nav-cta:hover { background: var(--hero-btn-bg-hover); }

/* Mobile hamburger (checkbox-hack toggle — no JS required) */
.nav-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav-burger { display: none; margin-left: auto; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; color: var(--hero-text); cursor: pointer; flex: 0 0 auto; }
.nav-burger svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }

@media (max-width: 1023px) {
  .nav-burger { display: inline-flex; }
  .nav-collapse {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--hero-bg); border-bottom: 1px solid var(--hero-border);
    padding: 12px var(--container-px) 20px; max-height: calc(100dvh - 64px); overflow-y: auto;
  }
  .nav-toggle:checked ~ .nav-collapse { display: flex; }
  .nav-menu { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .nav-right { flex-direction: column; align-items: stretch; gap: 6px; width: 100%; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--hero-border); }
  .dropdown { position: static; box-shadow: none; border: 0; background: rgba(255, 255, 255, 0.04); margin: 2px 0 6px; }
  .dropdown__inner { flex-direction: column; }
  .dropdown__col { min-width: 0; }
  .dropdown__title { color: #fff; }
  .dropdown__desc { color: var(--hero-text-dim); }
  .dropdown__icon { background: var(--hero-surface); color: #fff; }
  .dropdown__featured { background: var(--hero-surface); border-color: var(--hero-border); }
  .dropdown__featured-title { color: #fff; }
  .dropdown__featured-desc { color: var(--hero-text-dim); }
  .lang__menu { position: static; box-shadow: none; border: 0; background: transparent; padding: 0; }
  .lang__option { color: var(--hero-text); }
  .lang__option:hover { background: var(--hero-surface); }
  .nav-right__login { color: var(--hero-text); }
}

/* Tighter horizontal padding for chrome (nav/footer) on small screens. */
@media (max-width: 640px) { :root { --container-px: 20px; } }
