@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
      --bg: #f5f5f2;
      --ink: #111111;
      --muted: #66665f;
      --rule: #d6d6cf;
      --signal: #2a44d6;
      --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
      --mono: "Geist Mono", ui-monospace, Menlo, monospace;
      --pad: clamp(16px, 4vw, 72px);
    }
    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) {
        --bg: #0f0f0e;
        --ink: #ecece8;
        --muted: #8f8f88;
        --rule: #2a2a28;
        --signal: #8fa2ff;
      }
    }
    :root[data-theme="dark"] {
      --bg: #0f0f0e;
      --ink: #ecece8;
      --muted: #8f8f88;
      --rule: #2a2a28;
      --signal: #8fa2ff;
    }

    *, *::before, *::after { box-sizing: border-box; }
    * { margin: 0; padding: 0; }
    html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
    body {
      background: var(--bg);
      color: var(--ink);
      font-family: var(--sans);
      font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.35rem);
      line-height: 1.55;
      -webkit-font-smoothing: antialiased;
    }
    a { color: inherit; }
    :focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; border-radius: 2px; }

    .page { position: relative; padding-inline: var(--pad); }

    /* Header */
    .top {
      position: relative; z-index: 2;
      display: flex; align-items: center; justify-content: space-between;
      height: clamp(72px, 9vh, 96px);
    }
    .tools { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 32px); }
    /* Home page: the header sits over the dark hero, so it uses light colours */
    body.has-hero .top {
      position: absolute; top: 0; left: 0; right: 0;
      padding-inline: var(--pad);
      --ink: #f2f4fa;
      --muted: #9aa3bd;
      --rule: rgba(255, 255, 255, 0.14);
      color: var(--ink);
    }
    body.has-hero .top .logo-navy { fill: #000d3a; }
    .lang, .tool {
      font: inherit; font-size: .9rem; color: var(--muted); text-decoration: none;
      background: none; border: 1px solid var(--rule); border-radius: 999px;
      padding: 6px 12px; cursor: pointer;
    }
    .lang { border-color: transparent; padding-inline: 4px; }
    .lang:hover, .tool:hover { color: var(--ink); }
    .skip {
      position: absolute; left: 16px; top: -100px; z-index: 10;
      background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px;
    }
    .skip:focus { top: 12px; }
    .legal-links { display: flex; gap: 20px; }
    .wordmark { display: inline-flex; align-items: center; }
    .wordmark { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; text-decoration: none; }
    .logo { width: 64px; height: auto; display: block; }
    .logo-blue { fill: #002277; }
    .logo-navy { fill: #000d3a; }
    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) .logo-navy { fill: #000d3a; }
    }
    :root[data-theme="dark"] .logo-navy { fill: #000d3a; }
    .top nav { display: flex; gap: clamp(20px, 3vw, 48px); font-size: 1rem; }
    .top nav a { text-decoration: none; color: var(--muted); }
    .top nav a:hover { color: var(--ink); }

    .link {
      text-decoration: none;
      background-image: linear-gradient(currentColor, currentColor);
      background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
      transition: background-size .25s ease, color .25s ease;
    }
    .link:hover { background-size: 100% 1px; color: var(--signal); }

    /* Hero: fills the first screen */
    .hero {
      position: relative;
      overflow: hidden;
      margin-inline: calc(var(--pad) * -1);
      padding-inline: var(--pad);
      --ink: #f2f4fa;
      --muted: #9aa3bd;
      --rule: rgba(255, 255, 255, 0.14);
      --signal: #9fb4ff;
      color: var(--ink);
      background:
        radial-gradient(900px 520px at 88% 0%, rgba(60, 110, 255, 0.22), transparent 62%),
        linear-gradient(180deg, #05080f 0%, #0a1020 70%, #05080f 100%);
      min-height: 100svh;
      display: grid;
      align-content: end;
      gap: clamp(32px, 5vh, 64px);
      padding-block: clamp(48px, 10vh, 120px) clamp(48px, 8vh, 96px);
    }
    .hero h1 {
      font-size: clamp(3rem, 9.5vw, 11rem);
      font-weight: 500;
      line-height: 0.96;
      letter-spacing: -0.045em;
      max-width: 13ch;
    }
    .hero-foot {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: end;
      gap: 32px;
      border-top: 1px solid var(--rule);
      padding-top: 28px;
    }
    .hero-foot p { color: var(--muted); max-width: 44ch; }
    .hero-foot .link { font-size: 1.1rem; white-space: nowrap; }

    /* Hero background: animated dot field drawn on a canvas */
    .hero > *:not(.hero-field) { position: relative; z-index: 1; }
    .hero-field {
      position: absolute; inset: 0; width: 100%; height: 100%;
      z-index: 0; pointer-events: none;
    }

    /* Contact form */
    .contact-form { display: grid; gap: 28px; max-width: 560px; margin-top: 8px; }
    .field { display: grid; gap: 6px; }
    .field label { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
    .field input, .field textarea {
      font: inherit; color: var(--ink); background: transparent;
      border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
      padding: 10px 0; resize: vertical;
    }
    .field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--signal); }
    .form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
    .submit {
      font: inherit; font-weight: 500; padding: 14px 26px; border-radius: 999px;
      border: 1px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer;
      transition: opacity .2s ease;
    }
    .submit:hover { opacity: .85; }
    .submit:disabled { opacity: .5; cursor: default; }
    .status { color: var(--muted); font-size: .95rem; }
    .status.error { color: #c0392b; }
    .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

    /* Sections */
    section {
      border-top: 1px solid var(--rule);
      padding-block: clamp(80px, 14vh, 180px);
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
      gap: clamp(32px, 6vw, 120px);
    }
    .label { font-family: var(--mono); font-size: .9rem; color: var(--muted); padding-top: .6em; }
    h2 {
      font-size: clamp(2.2rem, 5vw, 4.6rem);
      font-weight: 500;
      letter-spacing: -0.035em;
      line-height: 1.02;
      max-width: 18ch;
    }

    /* Capabilities */
    .list { list-style: none; margin-top: clamp(40px, 6vh, 72px); }
    .list li {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
      gap: clamp(20px, 3vw, 48px);
      padding-block: clamp(28px, 4vh, 44px);
      border-top: 1px solid var(--rule);
    }
    .list li:last-child { border-bottom: 1px solid var(--rule); }
    .list h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; }
    .list p { color: var(--muted); max-width: 50ch; }

    /* Approach: stages mirror the studio's gates */
    .stages {
      margin-top: clamp(40px, 6vh, 72px);
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: clamp(20px, 2.5vw, 40px);
    }
    .stage { border-top: 2px solid var(--ink); padding-top: 20px; }
    .stage:nth-child(n + 2) { border-top-color: var(--rule); }
    .stage .step { font-family: var(--mono); font-size: .9rem; color: var(--muted); display: block; margin-bottom: 18px; }
    .stage h3 { font-size: clamp(1.3rem, 1.8vw, 1.7rem); font-weight: 500; letter-spacing: -0.02em; }
    .stage p { margin-top: 10px; color: var(--muted); font-size: .95em; }

    /* Contact */
    .contact { padding-bottom: clamp(96px, 16vh, 200px); }
    .contact-main { display: grid; gap: 28px; }
    .contact a.mail {
      justify-self: start;
      font-size: clamp(1.9rem, 5vw, 5.4rem);
      font-weight: 500;
      letter-spacing: -0.045em;
      line-height: 1;
      text-decoration: none;
      border-bottom: 2px solid var(--rule);
      padding-bottom: .08em;
      transition: color .25s ease, border-color .25s ease;
      word-break: break-word;
    }
    .contact a.mail:hover { color: var(--signal); border-color: var(--signal); }
    .contact p { color: var(--muted); max-width: 50ch; }

    footer {
      border-top: 1px solid var(--rule);
      padding-block: 28px 36px;
      display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
      color: var(--muted); font-size: 1rem;
    }

    .reveal { opacity: 0; transform: translateY(12px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
    .reveal.d1 { animation-delay: .1s; }
    .reveal.d2 { animation-delay: .2s; }
    @keyframes rise { to { opacity: 1; transform: none; } }

    @media (max-width: 1000px) {
      section { grid-template-columns: 1fr; }
      .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
      .stage:nth-child(3) { border-top-color: var(--rule); }
    }
    @media (max-width: 640px) {
      .logo { width: 44px; }
      .top nav a:not(.keep) { display: none; }
      .hero-foot { grid-template-columns: 1fr; gap: 20px; }
      .list li { grid-template-columns: 1fr; gap: 12px; }
      .stages { grid-template-columns: 1fr; }
      .stage:nth-child(n + 2) { border-top-color: var(--rule); }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
      .reveal { opacity: 1; transform: none; }
    }

    /* FAQ */
    .faq { margin-top: clamp(40px, 6vh, 64px); border-top: 1px solid var(--rule); }
    .faq details { border-bottom: 1px solid var(--rule); padding: 24px 0; }
    .faq summary {
      cursor: pointer; list-style: none; font-size: clamp(1.15rem, 1.8vw, 1.45rem);
      font-weight: 500; letter-spacing: -0.02em; display: flex; justify-content: space-between; gap: 24px;
    }
    .faq summary::-webkit-details-marker { display: none; }
    .faq summary::after { content: "+"; color: var(--muted); font-weight: 300; }
    .faq details[open] summary::after { content: "–"; }
    .faq details p { color: var(--muted); margin-top: 14px; max-width: 60ch; }
    .mail-alt { margin-top: 12px; color: var(--muted); }

    /* Legal pages */
    .legal { max-width: 70ch; padding-block: clamp(48px, 8vh, 96px) clamp(72px, 12vh, 120px); }
    .legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 32px; }
    .legal h2 { font-size: 1.2rem; font-weight: 500; margin: 36px 0 10px; }
    .legal p { color: var(--ink); margin-bottom: 14px; font-size: 1rem; }
    .legal a { color: var(--ink); }
    .draft {
      border: 1px dashed var(--rule); padding: 12px 16px; border-radius: 8px;
      color: var(--muted); font-size: .95rem; margin-bottom: 40px;
    }
