/* Shared marketing chrome — palette, fonts, wordmark, nav, footer.
 * Loaded on every public marketing page. Per-page styles live in
 * marketing/<page>.css and are loaded after this so they can override.
 */

  :root {
    --ink: #0C2240;
    --ink-soft: #10294C;
    --ink-deep: #091B36;
    --bone: #F2EDE2;
    --bone-warm: #E8E3D6;
    --bone-soft: #F9F5EC;
    --signal: #E5273C;
    --signal-soft: #F7D4CC;
    --mute-dark: rgba(242,237,226,0.55);
    --mute-light: #6F6A60;
    --hairline-light: rgba(12,34,64,0.14);
    --hairline-dark: rgba(242,237,226,0.14);
    --hairline-strong: rgba(12,34,64,0.5);

    --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    --display: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

    --grid-max: 1280px;
    --gutter: clamp(20px, 4vw, 56px);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: var(--sans);
    /* Top-glow blue: px-anchored ellipse (page-height percentages would
       push it off-screen on long pages) fading to --ink-deep, which the
       base color continues below, so long pages stay seamless. */
    background-color: var(--ink-deep);
    background-image: radial-gradient(140% 1200px at 50% -120px, #142E56 0%, #10294C 30%, #0C2240 62%, #091B36 100%);
    background-repeat: no-repeat;
    color: var(--bone);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
  }
  ::selection { background: var(--signal); color: var(--bone); }
  a { color: inherit; }

  /* ─── Texture: fine film grain over the whole page ─── */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  }

  /* ─── Layout ─── */
  .frame {
    max-width: var(--grid-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    position: relative;
  }
  section {
    padding: clamp(64px, 7vw, 112px) 0;
    position: relative;
    border-top: 1px solid var(--hairline-dark);
    /* Dark sections are solid footer-blue; only the first section stays
       transparent so the body's top-glow gradient shows behind the hero. */
    background: var(--ink);
  }
  section.light {
    background: var(--bone);
    color: var(--ink);
    border-top-color: var(--hairline-light);
  }
  section.first {
    border-top: none;
    background: transparent;
  }
  /* Whisper-faint brand grid behind each page's opening section, fading
     out downward (from the design file). Paints under the content. */
  section.first::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.16;
    background-image:
      linear-gradient(rgba(242,237,226,0.12) 1px, transparent 1px),
      linear-gradient(90deg, rgba(242,237,226,0.12) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(110% 70% at 50% 0%, #000, transparent 78%);
    mask-image: radial-gradient(110% 70% at 50% 0%, #000, transparent 78%);
  }

  /* ─── Wordmark ─── */
  .wordmark {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.035em;
    font-size: 22px;
    line-height: 1;
    color: inherit;
    position: relative;
    display: inline-block;
    padding-right: 0.32em;
  }
  .wordmark::after {
    content: "";
    position: absolute;
    top: 0.03em;
    right: 0;
    width: 0.24em;
    height: 0.24em;
    border-radius: 50%;
    background: var(--signal);
    animation: wmPulse 3.2s ease-in-out infinite;
  }
  @keyframes wmPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
  @media (prefers-reduced-motion: reduce) {
    .wordmark::after { animation: none; }
  }

  /* ─── Typography ─── */
  .eyebrow {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--signal);
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }

  .h1 {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 0.98;
    letter-spacing: -0.035em;
  }
  .h1 .signal { color: var(--signal); }
  .h2 {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.028em;
  }
  .h2 .signal { color: var(--signal); }
  .lede {
    font-family: var(--sans);
    font-weight: 500;
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.5;
    letter-spacing: -0.01em;
    max-width: 60ch;
  }

  /* ─── Buttons ─── */
  .btn-primary {
    background: var(--signal);
    color: var(--bone);
    font-family: var(--sans); font-weight: 700; font-size: 14px;
    padding: 14px 26px;
    border: none; border-radius: 999px; cursor: pointer;
    letter-spacing: -0.005em;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 10px;
    transition: opacity 0.15s, transform 0.15s;
  }
  .btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
  .btn-primary::after { content: "→"; font-family: var(--mono); font-weight: 400; }
  .btn-secondary {
    background: transparent;
    color: inherit;
    font-family: var(--sans); font-weight: 600; font-size: 14px;
    padding: 14px 24px;
    border: 1px solid currentColor;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: -0.005em;
    display: inline-flex; align-items: center; gap: 10px;
    transition: background 0.15s, color 0.15s;
  }
  .btn-secondary:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
  .light .btn-secondary:hover { background: var(--ink); color: var(--bone); border-color: var(--ink); }

  /* ─── NAV ─── */
  .nav {
    position: sticky; top: 0; z-index: 50;
    /* Solid, not translucent: iOS Safari's backdrop blur doesn't reliably
       frost the scrolling content underneath (it conflicts with the fixed
       mix-blend grain overlay), so a translucent header lets page content
       show through as it scrolls behind. A solid header is unambiguous. */
    background: var(--ink);
    color: var(--bone);
    border-bottom: 1px solid rgba(255,255,255,0.18);
  }
  .nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px var(--gutter);
    max-width: var(--grid-max);
    margin: 0 auto;
  }
  .nav-brand { text-decoration: none; color: inherit; }
  .nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
  }
  /* Hamburger — hidden on desktop, shown at the mobile breakpoint. */
  .nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    background: transparent; border: 0; padding: 0;
    cursor: pointer;
  }
  .nav-toggle span {
    display: block;
    width: 22px; height: 2px;
    margin: 0 auto;
    background: var(--bone);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  @media (max-width: 900px) {
    /* Don't stick the header on mobile — iOS Safari mis-renders the sticky
       nav (content draws over/behind it during momentum scroll). Let it
       scroll away normally. `relative` (not static) keeps it as the
       positioning context for the absolute dropdown menu below. */
    .nav { position: relative; }
    .nav-toggle { display: flex; }
    .nav-right {
      display: none;
      position: absolute;
      top: 100%;
      left: 0; right: 0;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      padding: 6px var(--gutter) 18px;
      background: var(--ink);
      border-bottom: 1px solid var(--hairline-dark);
    }
    .nav.open .nav-right { display: flex; }
    .nav-right .nav-link {
      font-size: 17px;
      padding: 14px 0;
      border-bottom: 1px solid var(--hairline-dark);
    }
    .nav-right .nav-cta {
      margin-top: 16px;
      justify-content: center;
      padding: 13px 20px;
    }
  }
  .nav-link {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 15px;
    color: rgba(242,237,226,0.72);
    text-decoration: none;
    letter-spacing: -0.005em;
    transition: color 0.15s;
  }
  .nav-link:hover { color: var(--bone); }
  .nav-link.active {
    color: var(--bone);
    text-decoration: underline;
    text-decoration-color: var(--signal);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
  }
  .nav-cta {
    font-family: var(--sans); font-weight: 600; font-size: 13px;
    background: var(--signal); color: var(--bone);
    border: 1px solid var(--signal);
    padding: 10px 20px; border-radius: 999px; cursor: pointer;
    letter-spacing: -0.005em;
    text-decoration: none;
    display: inline-flex; align-items: center;
    transition: background 0.15s, border-color 0.15s;
  }
  .nav-cta:hover { background: #C81E31; border-color: #C81E31; }

  footer.tail {
    background: var(--ink);
    color: var(--bone);
    padding: clamp(64px, 7vw, 96px) 0 28px;
    border-top: 1px solid var(--hairline-dark);
  }
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(40px, 4vw, 56px);
    padding-bottom: clamp(40px, 4vw, 56px);
    border-bottom: 1px solid var(--hairline-dark);
  }
  @media (min-width: 800px) {
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  }
  .footer-brand-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .footer-brand-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
  }
  .footer-brand-link .wordmark {
    font-size: 30px;
  }
  .footer-brand-block .footer-tag {
    font-family: var(--sans);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: var(--mute-dark);
    max-width: 32ch;
  }
  .footer-col-title {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mute-dark);
    margin-bottom: 16px;
  }
  .footer-col-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .footer-col-links a {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 14px;
    color: var(--bone);
    text-decoration: none;
    letter-spacing: -0.005em;
    transition: color 0.15s;
  }
  .footer-col-links a:hover { color: var(--signal); }
  .footer-bottom {
    margin-top: 28px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--sans);
    font-size: 12px;
    color: var(--mute-dark);
    letter-spacing: -0.005em;
  }
  .footer-bottom a {
    color: var(--mute-dark);
    text-decoration: none;
  }
  .footer-bottom a:hover { color: var(--bone); }

