/* ==========================================================================
   SudoAgentic — main stylesheet
   1. Tokens   2. Reset & base   3. Layout   4. Components   5. Sections
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Color — brand-derived. Navy dominates; cyan is an accent only. */
  --navy-900: #081822;              /* primary background */
  --navy-850: #0b1e2a;              /* raised surface */
  --navy-800: #102734;
  --slate-700: #37414f;             /* brand right slate, lit */
  --slate-600: #3c5168;             /* brand left slate, lit */
  --slate-400: #7a8da0;             /* subtle text, AA on navy */
  --slate-300: #9aabba;             /* muted text */
  --white-soft: #f5f5f5;            /* brand wordmark white */
  --cyan: #48abc4;                  /* brand dot, lit */
  --cyan-bright: #6cc3da;

  --color-bg: var(--navy-900);
  --color-surface: var(--navy-850);
  --color-text: var(--white-soft);
  --color-text-muted: var(--slate-300);
  --color-text-subtle: var(--slate-400);
  --color-accent: var(--cyan);
  --color-accent-hover: var(--cyan-bright);
  --color-line: rgb(154 171 186 / 0.14);
  --color-line-strong: rgb(154 171 186 / 0.28);
  --color-focus: var(--cyan-bright);
  --color-error: #f0aaa0;

  /* Typography */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Type roles (375px → 1440px). One size per role; roles, not sections, decide size. */
  --fs-display: clamp(2.375rem, 1.3rem + 5.2vw, 6rem);          /* Display L — hero only: 40 → 96 */
  --fs-statement: clamp(2.25rem, 1.2rem + 4.2vw, 5rem);         /* Display M — Philosophy statement: 36 → 80 */
  --fs-section: clamp(1.875rem, 1.3rem + 2.3vw, 3.5rem);        /* Section heading: 30 → 54 */
  --fs-subheading: clamp(1.5rem, 1.15rem + 1.5vw, 2.5rem);      /* Subheading: 24 → 40 */
  --fs-subheading-s: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);  /* Minor heading (Privacy page): 20 → 26 */
  --fs-body: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem);          /* Body — all reading text: 17 → 20 */
  --fs-base: 1.0625rem;                                         /* 17px form inputs, page default */
  --fs-sm: 0.875rem;                                            /* UI — nav, form labels: 14 */
  --fs-section-label: clamp(0.875rem, 0.8rem + 0.3vw, 1.0625rem); /* Section identifier: 14 → 17 */
  --fs-eyebrow: 0.9375rem;                                      /* In-section labels + menu: 15 */
  --fs-micro: 0.6875rem;                                        /* Metadata: 11 */

  --lh-tight: 1.02;
  --lh-snug: 1.2;
  --lh-body: 1.6;

  --tracking-display: -0.04em;
  --tracking-heading: -0.025em;
  --tracking-label: 0.14em;

  /* Spacing — 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;
  --space-section: clamp(6rem, 4rem + 8vw, 11rem);

  /* Layout */
  --container-max: 80rem;                                       /* 1280px */
  --gutter: clamp(1.25rem, 0.6rem + 3.2vw, 4rem);               /* 20 → 64 */
  --measure: 36ch;
  --measure-wide: 44ch;
  --col-gap: clamp(1.25rem, 2.2vw, 2.5rem);
  --header-h: 4.25rem;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-base: 320ms;
  --dur-slow: 900ms;
}

@media (min-width: 48rem) {
  :root { --header-h: 5.5rem; }
}

/* 2. Reset & base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  background: var(--color-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol { margin: 0; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

::selection { background: rgb(72 171 196 / 0.35); color: var(--white-soft); }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: var(--space-3);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--white-soft);
  color: var(--navy-900);
  font-size: var(--fs-sm);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

/* 3. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 4. Components ------------------------------------------------------------ */

/* Eyebrow — section identifiers and in-section labels. Readable, clearly below headings. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.eyebrow--section {
  font-size: var(--fs-section-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--color-text);
}
.eyebrow--section::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 2px;
  margin-right: 1rem;
  vertical-align: 0.3em;
  background: var(--color-accent);
}

/* Metadata — genuinely small secondary information */
.label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

/* Primary call to action — a text link, not a button block */
.link-cta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
  padding-block: 0.35em;
  font-size: var(--fs-base);
  font-weight: 450;
  letter-spacing: -0.005em;
  color: var(--color-text);
}
.link-cta__text {
  background-image: linear-gradient(var(--color-accent), var(--color-accent)),
                    linear-gradient(var(--color-line-strong), var(--color-line-strong));
  background-size: 0% 1px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 0.3em;
  transition: background-size var(--dur-base) var(--ease-out);
}
.link-cta__arrow {
  color: var(--color-accent);
  transition: transform var(--dur-base) var(--ease-out), color var(--dur-fast);
}
.link-cta:hover .link-cta__text,
.link-cta:focus-visible .link-cta__text { background-size: 100% 1px, 100% 1px; }
.link-cta:hover .link-cta__arrow,
.link-cta:focus-visible .link-cta__arrow { transform: translateX(0.3em); color: var(--color-accent-hover); }

/* Button — used where an action must read unmistakably as a button (form submit) */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  min-height: 3rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--color-text);
  font-size: var(--fs-base);
  font-weight: 450;
  letter-spacing: -0.005em;
  transition: background-color var(--dur-fast), border-color var(--dur-fast);
}
.button__arrow {
  color: var(--color-accent);
  transition: transform var(--dur-base) var(--ease-out), color var(--dur-fast);
}
.button:hover,
.button:focus-visible { background-color: rgb(72 171 196 / 0.12); }
.button:hover .button__arrow,
.button:focus-visible .button__arrow { transform: translateX(0.25em); color: var(--color-accent-hover); }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-base), border-color var(--dur-base), backdrop-filter var(--dur-base);
}
.site-header.is-scrolled {
  background-color: rgb(8 24 34 / 0.82);
  border-bottom-color: var(--color-line);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-header__logo {
  position: relative;
  z-index: 2;                      /* stays visible above the mobile menu */
  display: block;
  flex-shrink: 0;
  /* The supplied SVG includes shadow padding; offset it so the mark
     aligns optically with the content edge. */
  margin-left: -0.65rem;
}
.site-header__logo img {
  width: auto;
  height: 3.25rem;                 /* ≈ 175px wide on phones */
}
@media (min-width: 48rem) {
  .site-header__logo { margin-left: -0.66rem; }
  .site-header__logo img { height: 3.85rem; }
}

/* Navigation — desktop */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.75rem, 3vw, 2.75rem);
}
.site-nav__link {
  position: relative;
  display: inline-block;
  padding-block: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--color-text-muted);
  transition: color var(--dur-fast);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.2rem;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.site-nav__link:hover,
.site-nav__link:focus-visible { color: var(--color-text); }
.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { transform: scaleX(1); }
.site-nav__index { display: none; }
.site-nav__toggle { display: none; }

/* Navigation — mobile & tablet: quiet text toggle + full-screen typographic menu */
@media (max-width: 63.99rem) {
  .site-nav__toggle {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 44px;
    padding-inline: var(--space-2);
    margin-right: calc(var(--space-2) * -1);
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--color-text-muted);
  }
  .site-nav__toggle-icon {
    position: relative;
    width: 18px;
    height: 7px;
    border-block: 1px solid currentColor;
    transition: transform var(--dur-base) var(--ease-out), height var(--dur-base) var(--ease-out);
  }
  .site-nav__toggle[aria-expanded="true"] { color: var(--color-text); }
  .site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon {
    height: 1px;
    border-bottom: 0;
  }

  .site-nav__list {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    padding: calc(var(--header-h) + var(--space-6)) var(--gutter) var(--space-8);
    background: var(--color-bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
  }
  .site-nav__list.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--dur-base) var(--ease-out), visibility 0s;
  }
  .site-nav__list li { border-top: 1px solid var(--color-line); }
  .site-nav__list li:last-child { border-bottom: 1px solid var(--color-line); }
  .site-nav__link {
    display: flex;
    align-items: baseline;
    gap: var(--space-4);
    padding-block: var(--space-5);
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: var(--tracking-heading);
    line-height: 1.1;
    color: var(--color-text);
  }
  .site-nav__link::after { display: none; }
  .site-nav__index {
    display: inline;
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    letter-spacing: var(--tracking-label);
    color: var(--color-accent);
  }
  body.nav-open { overflow: hidden; }
  /* the scrolled header's backdrop-filter would trap the fixed menu inside the header bar */
  body.nav-open .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Without JS the mobile toggle can't work, so show links inline instead */
.no-js .site-nav__toggle { display: none; }
.no-js .site-nav__list { position: static; opacity: 1; visibility: visible; flex-direction: row; padding: 0; background: none; }
/* While JS takes over from the no-JS layout, hide the menu instantly (no fade on page load) */
.nav-settling .site-nav__list { transition: none !important; }

/* 5. Sections -------------------------------------------------------------- */

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--header-h);
  /* Barely-there atmosphere: a cool lift in the upper right */
  background:
    radial-gradient(60rem 40rem at 85% 10%, rgb(60 81 104 / 0.18), transparent 70%),
    var(--color-bg);
}
.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: var(--space-9);
  padding-bottom: calc(var(--space-10) + var(--space-7));
}
.hero__content { max-width: 60rem; }

.hero__title {
  font-size: var(--fs-display);
  font-weight: 300;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  font-variation-settings: "opsz" 32;
  text-wrap: balance;
}
.hero__line { display: block; }
.hero__line--muted { color: var(--color-text-muted); }

.hero__lead {
  max-width: 39ch;
  margin-top: clamp(1.75rem, 1rem + 2vw, 2.75rem);
  font-size: var(--fs-body);
  font-weight: 350;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.hero__cta { margin-top: clamp(2rem, 1.2rem + 2vw, 3rem); }

@media (min-width: 48rem) {
  .hero__inner {
    justify-content: center;
    padding-top: var(--space-10);
  }
  .hero__content { margin-top: auto; }
}

/* Construction geometry — decorative, very low contrast */
.hero__geometry {
  position: absolute;
  z-index: -1;
  top: 0;
  right: -4vw;
  width: clamp(26rem, 48vw, 58rem);
  height: 100%;
  pointer-events: none;
  /* drifts slower than the page as the hero scrolls away */
  transform: translate3d(0, calc(var(--p, 0) * 7rem), 0);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
}
.hero__geometry line,
.hero__geometry circle {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-width: 1;
}
.hero__lines line { stroke: rgb(154 171 186 / 0.13); }
.hero__guides line { stroke: rgb(154 171 186 / 0.07); }
.hero__dot circle { stroke: rgb(72 171 196 / 0.5); }
@media (max-width: 47.99rem) {
  .hero__geometry {
    right: -30vw;
    width: 110vw;
    height: 58%;
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
    opacity: 0.8;
  }
}

/* Entrance — CSS only, so content never depends on JS to appear */
@media (prefers-reduced-motion: no-preference) {
  .hero__line,
  .hero__lead,
  .hero__cta {
    animation: rise var(--dur-slow) var(--ease-out) both;
  }
  .hero__line:nth-child(1) { animation-delay: 120ms; }
  .hero__line:nth-child(2) { animation-delay: 240ms; }
  .hero__lead { animation-delay: 420ms; }
  .hero__cta { animation-delay: 540ms; }

  .hero__lines line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 2.4s var(--ease-out) forwards;
  }
  .hero__lines line:nth-child(2) { animation-delay: 120ms; }
  .hero__lines line:nth-child(3) { animation-delay: 240ms; }
  .hero__lines line:nth-child(4) { animation-delay: 360ms; }
  .hero__guides { animation: fade 2s var(--ease-out) 900ms both; }
  .hero__dot { animation: fade 1.2s var(--ease-out) 1.4s both; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.9rem); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Page sections below the hero
   ========================================================================== */

/* Shared section rhythm */
.section {
  position: relative;
  padding-block: var(--space-section);
}
.section-head {
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-line);
  scroll-margin-top: var(--space-6);   /* nav jumps land on the section label, just below the header */
}

/* Scroll reveal — only armed when JS runs and motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(1rem);
    transition:
      opacity var(--dur-slow) var(--ease-out) var(--reveal-delay, 0ms),
      transform var(--dur-slow) var(--ease-out) var(--reveal-delay, 0ms);
  }
  .reveal-ready [data-reveal="quiet"] {
    transform: translateY(0.4rem);
    transition-duration: 700ms;
  }
  .reveal-ready [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

/* What we do --------------------------------------------------------------- */
.services {
  padding-top: clamp(4rem, 2rem + 6vw, 8rem);
  padding-bottom: clamp(3rem, 1rem + 4vw, 5rem);   /* tighter hand-off into Philosophy */
}
.services__list {
  margin-top: clamp(0.5rem, 1.5vw, 1.5rem);   /* first row brings its own top padding */
  list-style: none;
  padding: 0;
}
.service {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--space-4);
  align-items: baseline;
  padding-block: clamp(2rem, 1.2rem + 2.6vw, 3.5rem);
}
/* Hairline that draws in as the row reveals */
.service::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--color-line);
  transform-origin: left;
}
.service:first-child::before { display: none; }   /* the section rule already sits above */
.service:last-child { border-bottom: 1px solid var(--color-line); }
.service__step { color: var(--color-accent); }   /* eyebrow role, in cyan */
.service__name {
  font-size: var(--fs-subheading);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.service__body { margin-top: var(--space-2); }
.service__summary {
  max-width: var(--measure);
  font-size: var(--fs-body);
  font-weight: 350;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-wrap: pretty;
}
.service__name { text-wrap: balance; }

@media (min-width: 48rem) {
  .service {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }
  .service__step { grid-column: 1 / span 6; grid-row: 1; }
  .service__name { grid-column: 1 / span 6; grid-row: 2; }
  .service__body { grid-column: 7 / -1; grid-row: 2; margin-top: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .service[data-reveal] { opacity: 1; transform: none; }
  .reveal-ready .service[data-reveal] > * {
    opacity: 0;
    transform: translateY(0.75rem);
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  }
  .reveal-ready .service[data-reveal] > :nth-child(2) { transition-delay: 80ms; }
  .reveal-ready .service[data-reveal] > :nth-child(3) { transition-delay: 180ms; }
  .reveal-ready .service[data-reveal]::before {
    transform: scaleX(0);
    transition: transform 1.4s var(--ease-out);
  }
  .reveal-ready .service[data-reveal].is-visible > * { opacity: 1; transform: none; }
  .reveal-ready .service[data-reveal].is-visible::before { transform: scaleX(1); }
}

/* Philosophy — the page's loudest moment, made with type and space alone */
.philosophy {
  padding-block: clamp(8rem, 4rem + 14vw, 18rem);
  background:
    radial-gradient(56rem 34rem at 12% 55%, rgb(60 81 104 / 0.05), transparent 72%);
}
.philosophy__label { margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
.philosophy__statement {
  font-size: var(--fs-statement);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 32;
  text-wrap: balance;
}
.philosophy__line { display: block; }
.philosophy__line--muted { color: var(--color-text-muted); }
.philosophy__stop { color: var(--color-accent); }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .philosophy__stop {
    display: inline-block;
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 600ms var(--ease-out) 700ms, transform 600ms var(--ease-out) 700ms;
  }
  .reveal-ready .is-visible .philosophy__stop { opacity: 1; transform: none; }
}
.philosophy__copy {
  max-width: 38ch;
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 5rem);
  font-size: var(--fs-body);
  font-weight: 350;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
  text-wrap: pretty;
}
@media (min-width: 64rem) {
  .philosophy__inner {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }
  .philosophy__label,
  .philosophy__statement { grid-column: 1 / -1; }
  .philosophy__copy { grid-column: 7 / -1; }
}

/* Research & development — quieter, more technical.
   The mark's construction lines draw in as the section arrives. */
.direction {
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(6rem, 3rem + 8vw, 11rem) clamp(12rem, 8rem + 12vw, 16rem);
}
@media (min-width: 64rem) {
  .direction { padding-block: clamp(6rem, 3rem + 8vw, 11rem); }
}
.direction::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--color-line);
  transform-origin: left;
  transform: scaleX(var(--p, 1));
}
.direction__geometry {
  position: absolute;
  z-index: -1;
  /* small screens: sits in the open space below the text */
  bottom: 0;
  right: 0;
  width: 100%;
  height: 42%;
  pointer-events: none;
  transform: translate3d(0, calc((1 - var(--p, 1)) * 3rem), 0);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 62% 62%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 60% at 62% 62%, #000 25%, transparent 75%);
  opacity: 0.7;
}
.direction__geometry line,
.direction__geometry circle {
  fill: none;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.direction__lines line {
  stroke: rgb(154 171 186 / 0.13);
  stroke-dasharray: 1;
  stroke-dashoffset: max(0, calc(1 - var(--p, 1) * 1.1));
}
.direction__lines line:nth-child(2) { stroke-dashoffset: max(0, calc(1 - var(--p, 1) * 1.2)); }
.direction__lines line:nth-child(3) { stroke-dashoffset: max(0, calc(1 - var(--p, 1) * 1.3)); }
.direction__lines line:nth-child(4) { stroke-dashoffset: max(0, calc(1 - var(--p, 1) * 1.45)); }
.direction__guides { opacity: var(--p, 1); }
.direction__guides line { stroke: rgb(154 171 186 / 0.07); }
.direction__dot { opacity: clamp(0, calc(var(--p, 1) * 2.5 - 1.5), 1); }
.direction__dot circle,
.direction__dot line { stroke: rgb(72 171 196 / 0.5); }

.direction__grid {
  display: grid;
  gap: var(--space-6);
}
.direction__title {
  font-size: var(--fs-section);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.direction__copy {
  max-width: var(--measure-wide);
  margin-top: var(--space-5);
  font-size: var(--fs-body);
  font-weight: 350;
  line-height: 1.55;
  color: var(--color-text-muted);
  text-wrap: pretty;
}
.direction__copy p + p { margin-top: var(--space-4); }
.direction__terms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.direction__terms li {
  padding: var(--space-4) var(--space-4) var(--space-4) 0;
  border-top: 1px solid var(--color-line);
}
@media (min-width: 64rem) {
  .direction__geometry {
    top: 0;
    bottom: auto;
    left: 0;
    right: auto;
    width: min(56vw, 52rem);
    height: 100%;
    -webkit-mask-image: radial-gradient(ellipse 62% 58% at 48% 52%, #000 30%, transparent 78%);
    mask-image: radial-gradient(ellipse 62% 58% at 48% 52%, #000 30%, transparent 78%);
    opacity: 1;
  }
  .direction__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }
  .direction__aside { grid-column: 1 / span 4; }
  .direction__content { grid-column: 6 / -1; }
  .direction__terms { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* About */
.about__grid {
  display: grid;
  gap: var(--space-7);
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}
.about__title {
  font-size: var(--fs-section);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.about__title span { display: block; }
.about__body {
  max-width: var(--measure-wide);   /* measured at lead size so copy and sign-off share one width */
  font-size: var(--fs-body);
}
.about__copy {
  font-weight: 350;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
  text-wrap: pretty;
}
.about__copy p + p { margin-top: var(--space-4); }
@media (min-width: 64rem) {
  .about__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    row-gap: var(--space-8);
  }
  .about__title { grid-column: 1 / -1; }
  .about__body { grid-column: 7 / -1; }
}

/* Contact */
.contact {
  padding-top: clamp(4rem, 2rem + 4vw, 6rem);
  padding-bottom: clamp(5rem, 3rem + 6vw, 9rem);
}
.contact__grid {
  display: grid;
  gap: var(--space-8);
  margin-top: clamp(2rem, 1rem + 2vw, 3rem);
}
.contact__title {
  max-width: 16ch;
  font-size: var(--fs-section);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.contact__status {
  max-width: 34ch;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-line);
}
.contact__availability {
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--color-text);
  text-wrap: pretty;
}
.contact__availability::before {
  /* small cyan dot: open for work, echoing the mark */
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.65rem;
  border-radius: 50%;
  background: var(--color-accent);
  vertical-align: 0.1em;
}
.contact__email {
  margin-top: var(--space-3);
  font-size: var(--fs-body);
}
.contact__email a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-line-strong);
  text-underline-offset: 0.25em;
  transition: text-decoration-color var(--dur-fast);
}
.contact__email a:hover,
.contact__email a:focus-visible { text-decoration-color: var(--color-accent); }
.contact__copy {
  max-width: 34ch;
  margin-top: var(--space-5);
  font-size: var(--fs-body);
  font-weight: 350;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
  text-wrap: pretty;
}
@media (min-width: 64rem) {
  .contact__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }
  .contact__intro { grid-column: 1 / span 5; }
  .contact-form { grid-column: 7 / -1; }
}

/* Form — underline fields, no boxes */
.contact-form {
  display: grid;
  gap: 1.25rem;
}
.field { display: grid; gap: var(--space-2); }
.field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}
.field__optional {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.55rem 0 0.7rem;
  border: 0;
  border-bottom: 1px solid var(--color-line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: var(--fs-base);
  line-height: 1.5;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 6rem; }
.field input:hover,
.field textarea:hover { border-bottom-color: rgb(154 171 186 / 0.45); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--color-accent);
  box-shadow: 0 1px 0 0 var(--color-accent);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-bottom-color: var(--color-error);
  box-shadow: 0 1px 0 0 var(--color-error);
}
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--color-text);
  box-shadow: 0 0 0 100px var(--color-bg) inset;
  caret-color: var(--color-text);
}
.field__error {
  font-size: var(--fs-sm);
  color: var(--color-error);
}
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form__footer {
  display: grid;
  justify-items: start;              /* aligned with the fields, on the reading line */
  gap: var(--space-4);
  margin-top: var(--space-2);
}
.contact-form__submit { margin-left: -1.5rem; }   /* text lines up with the fields; hover fill extends past them */
.contact-form__submit[disabled] { opacity: 0.6; cursor: progress; }
@media (max-width: 47.99rem) {
  .contact-form__submit { justify-self: stretch; margin-left: 0; }   /* full-width, easy thumb target on phones */
}
.contact-form__note {
  font-size: var(--fs-sm);
  color: var(--color-text-subtle);
}
.contact-form__note a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-decoration-color: var(--color-line-strong);
  text-underline-offset: 0.25em;
  transition: color var(--dur-fast), text-decoration-color var(--dur-fast);
}
.contact-form__note a:hover { color: var(--color-text); text-decoration-color: var(--color-accent); }
.contact-form__status:empty { display: none; }
.contact-form__status {
  font-size: var(--fs-base);
  color: var(--color-text-muted);
}
.contact-form__status.is-error { color: var(--color-error); }
.contact-form__done {
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-accent);
  font-size: var(--fs-body);
  font-weight: 350;
  color: var(--color-text);
}
.contact-form__done span { display: block; margin-top: var(--space-2); font-size: var(--fs-base); color: var(--color-text-muted); }

/* Footer */
.site-footer {
  padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
}
.site-footer__inner {
  display: grid;
  gap: var(--space-7);
  padding-top: var(--space-7);
  border-top: 1px solid var(--color-line);
}
.site-footer__logo { display: inline-block; margin-left: -0.44rem; }
.site-footer__logo img { width: auto; height: 2.75rem; }
.site-footer__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--col-gap);
  margin: 0;
}
.site-footer__meta dt {
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.site-footer__meta dd {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
}
.site-footer__link {
  display: inline-block;
  padding-block: 0.35rem;            /* comfortable tap target (24px+) without changing the layout's look */
  transition: color var(--dur-fast);
}
.site-footer__link:hover,
.site-footer__link:focus-visible { color: var(--color-text); }
.site-footer__legal {
  margin-top: var(--space-8);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
@media (min-width: 64rem) {
  .site-footer__inner {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: start;
  }
  .site-footer__logo { grid-column: 1 / span 4; margin-top: -0.6rem; }
  .site-footer__meta {
    grid-column: 7 / -1;
    grid-template-columns: repeat(3, max-content);   /* columns sized to content so the email never collides */
    column-gap: clamp(2rem, 4vw, 4rem);
  }
}

/* Simple text pages (e.g. Privacy) */
.page {
  padding-top: calc(var(--header-h) + clamp(4rem, 2rem + 6vw, 8rem));
  padding-bottom: var(--space-section);
}
.page__title {
  font-size: var(--fs-section);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.page__meta { margin-top: var(--space-5); }
.prose {
  max-width: 40rem;
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  color: var(--color-text-muted);
}
.prose h2 {
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
  font-size: var(--fs-subheading-s);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--color-text);
}
.prose p + p, .prose p + ul, .prose ul + p { margin-top: var(--space-4); }
.prose ul { padding-left: 1.1rem; }
.prose li + li { margin-top: var(--space-2); }
