/* Hallmark · genre: modern-minimal · macrostructure: Marquee Hero · theme: custom (studio monochrome)
 * tone: austere, technical · anchor hue: none (zero-chroma, accent = ink) · display + body: Geist, labels: Geist Mono
 * enrichment: Tier B hand-built SVG (the mark, assembled by scroll) · nav: N5 floating pill · footer: Ft2 inline
 * motion: load draw-in · scroll-assembled mark · reading highlight · scrubbed search demo
 * No JavaScript: CSS scroll-driven animations, with a composed static layout when unsupported or reduced motion. */

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--ink); color: var(--bg); }
h1, h2, p, ul, ol, dl, dd, figure { margin: 0; }
section[id] { scroll-margin-top: 5rem; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--space-md); top: var(--space-md); z-index: 30; background: var(--bg); padding: var(--space-xs) var(--space-sm); }

.page-gutter, .principles, .app, .contact-inner, .foot { padding-inline: clamp(1rem, 4vw, 3rem); }

/* ---------- Nav · N5 floating pill ---------- */
.nav {
  position: fixed; top: max(0.75rem, env(safe-area-inset-top)); left: 0; right: 0; z-index: 20;
  display: flex; justify-content: center; pointer-events: none;
  animation: nav-in var(--dur-long) var(--ease-out) 700ms both;
}
.nav-pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--space-xs);
  padding: 0.375rem 0.375rem 0.375rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  font-size: 0.875rem;
  white-space: nowrap;
}
.nav-brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; font-weight: 600; letter-spacing: -0.015em; padding-right: var(--space-xs); }
.nav-mark, .foot-mark { width: 0.8rem; height: 1.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 18; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: none; gap: 0.125rem; }
.nav-links a, .nav-cta {
  text-decoration: none; border-radius: var(--radius-pill); padding: 0.4rem 0.8rem;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.nav-links a { color: var(--ink-soft); }
.nav-cta { background: var(--ink); color: var(--bg); font-weight: 500; }
.nav-links a:active, .nav-cta:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); background: var(--hover); }
  .nav-cta:hover { background: var(--ink-soft); }
}
@media (min-width: 40rem) { .nav-links { display: inline-flex; } }
@keyframes nav-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Hero · the mark assembles ---------- */
.hero-stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto auto;
  padding: 6.5rem clamp(1rem, 4vw, 3rem) clamp(2rem, 7svh, 4.5rem);
  overflow: clip;
}
.hero-mark {
  position: absolute;
  top: 50%; right: clamp(1rem, 7vw, 8rem);
  height: min(74svh, 62vw);
  aspect-ratio: 204 / 284;
  translate: 0 -50%;
}
.half { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 50%; }
.half path { fill: none; stroke: var(--ink); stroke-width: 0.9; stroke-linecap: round; stroke-linejoin: round; }
.half .edge { stroke-dasharray: 1; animation: draw var(--dur-draw) var(--ease-out) 150ms both; }
.half-bottom .edge { animation-delay: 300ms; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.hero-waist {
  display: none;
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--line-strong);
  transform-origin: 100% 50%;
}
.hero-waist span {
  position: absolute; left: clamp(1rem, 4vw, 3rem); bottom: 0.6rem;
  font: 500 0.7rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
}

.hero-copy, .hero-after { align-self: end; position: relative; min-width: 0; }
.hero-copy { grid-row: 2; grid-column: 1; }
.hero-after { grid-row: 3; grid-column: 1; }
.hero-title {
  font-weight: 600;
  font-size: clamp(3.4rem, 12.5vw, 12.5rem);
  line-height: 0.88;
  letter-spacing: -0.065em;
  overflow-wrap: anywhere;
  margin-left: -0.05em;
}
.hero-title .word { display: inline-block; animation: rise 900ms var(--ease-out) both; }
.hero-title .word:first-child { animation-delay: 200ms; }
.hero-title .word:last-child { animation-delay: 320ms; }
@keyframes rise { from { opacity: 0; transform: translateY(0.35em); } }

.hero-after { margin-top: var(--space-xl); max-width: 36rem; }
.hero-statement { font-size: clamp(1.5rem, 3.2vw, 2.6rem); line-height: 1.12; letter-spacing: -0.04em; font-weight: 500; text-wrap: balance; }
.hero-meta { margin-top: var(--space-lg); font: 0.75rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.hero-cue { display: none; }

/* Mobile: mark above the words, centred. */
@media (max-width: 47.99rem) {
  .hero-mark { top: 6.5rem; right: 50%; height: min(46svh, 80vw); translate: 50% 0; }
  .hero-waist { top: calc(6.5rem + min(46svh, 80vw) / 2); }
  .hero-waist span { display: none; }
}

/* Scroll choreography: only where scroll timelines exist and motion is welcome.
 * The hero track is 250svh; the stage stays pinned while the halves close. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero { height: 250svh; view-timeline: --hero block; }
    .hero-stage { position: sticky; top: 0; height: 100svh; min-height: 0; }

    .half-top, .half-bottom { animation: close-top var(--ease-in-out) both; animation-timeline: --hero; animation-range: contain 0% contain 62%; }
    .half-top { animation-name: close-top; }
    .half-bottom { animation-name: close-bottom; }
    @keyframes close-top { from { transform: translateY(-34%) scale(1.32) rotate(-6deg); } }
    @keyframes close-bottom { from { transform: translateY(34%) scale(1.32) rotate(6deg); } }

    .half .vee { stroke-dasharray: 1; animation: draw linear both; animation-timeline: --hero; animation-range: contain 12% contain 62%; }

    .hero-waist { display: block; animation: waist linear both; animation-timeline: --hero; animation-range: contain 30% contain 70%; }
    @keyframes waist { from { transform: scaleX(0); } }
    .hero-waist span { animation: fade-in linear both; animation-timeline: --hero; animation-range: contain 60% contain 75%; }

    .hero-copy { animation: copy-out linear both; animation-timeline: --hero; animation-range: contain 4% contain 36%; }
    @keyframes copy-out { to { opacity: 0; transform: translateY(-8svh); } }

    .hero-after { grid-row: 2; margin-top: 0; animation: after-in var(--ease-out) both; animation-timeline: --hero; animation-range: contain 40% contain 72%; }
    @keyframes after-in { from { opacity: 0; transform: translateY(5svh); } }

    .hero-cue {
      display: block; position: absolute; right: clamp(1rem, 4vw, 3rem); bottom: clamp(2rem, 7svh, 4.5rem);
      font: 500 0.7rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
      animation: cue-out linear both; animation-timeline: --hero; animation-range: contain 0% contain 8%;
    }
    @keyframes cue-out { to { opacity: 0; } }
    @media (max-width: 47.99rem) { .hero-cue { display: none; } }
  }
}
@keyframes fade-in { from { opacity: 0; } }

/* ---------- Principles · reading highlight ---------- */
.principles { padding-block: var(--space-3xl) var(--space-2xl); }
.section-title { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--space-xl); }
.principles-list { list-style: none; padding: 0; }
.principles-list li {
  border-top: 1px solid var(--line);
  padding-block: clamp(1.5rem, 4vw, 2.75rem);
  font-size: clamp(1.6rem, 4.6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  text-wrap: balance;
  max-width: 62rem;
}
.principles-list li:last-child { border-bottom: 1px solid var(--line); }
.principles-list strong { font-weight: 600; }
.principles-list span { color: var(--ink-faint); font-weight: 500; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .principles-list li { animation: read linear both; animation-timeline: view(); animation-range: entry 35% cover 42%; }
    @keyframes read { from { opacity: 0.14; } }
  }
}

/* ---------- Espresso · split with scrubbed demo ---------- */
.app {
  padding-block: var(--space-3xl) var(--space-4xl);
  display: grid; gap: var(--space-2xl);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 60rem) { .app { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: var(--space-3xl); } }
.app-kicker { color: var(--ink-faint); font-size: 0.95rem; margin-bottom: var(--space-sm); }
.app-title { font-weight: 600; font-size: clamp(3.25rem, 9vw, 7.5rem); line-height: 0.9; letter-spacing: -0.065em; margin-left: -0.04em; }
.app-lede { margin-top: var(--space-lg); font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--ink-soft); max-width: 32rem; text-wrap: pretty; }
.app-facts { margin-top: var(--space-xl); border-top: 1px solid var(--line); max-width: 32rem; }
.app-facts div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--space-md); padding-block: 0.8rem; border-bottom: 1px solid var(--line); font-size: 0.925rem; }
.app-facts dt { font: 500 0.7rem/1.9 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.app-actions { margin-top: var(--space-xl); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg); }

.btn {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 0.75rem 1.25rem; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.text-link {
  white-space: nowrap; font-size: 0.95rem; text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 0.25em; text-decoration-thickness: 1px;
  transition: text-decoration-color var(--dur-short) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink-soft); }
  .text-link:hover { text-decoration-color: var(--ink); }
}

.demo {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface);
  padding: clamp(1rem, 2.4vw, 1.5rem);
  font-size: 0.9rem;
  min-width: 0;
}
.demo-field {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1rem; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line-strong);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); letter-spacing: -0.02em;
}
.demo-glass { width: 1.1rem; height: 1.1rem; flex: none; fill: none; stroke: var(--ink-faint); stroke-width: 1.6; stroke-linecap: round; }
.demo-query { white-space: nowrap; }
.demo-caret { width: 1.5px; height: 1.3em; background: var(--ink); margin-left: -0.6rem; }
.demo-results { list-style: none; padding: 0; margin-top: var(--space-sm); }
.demo-results li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-md);
  padding: 0.7rem 1rem; border-radius: 8px; align-items: baseline;
}
.demo-results li:first-child { background: var(--hover); }
.r-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-path { font: 0.75rem/1.4 var(--mono); color: var(--ink-faint); white-space: nowrap; }
.r-path em { font-style: normal; margin-left: 0.4rem; padding: 0.1rem 0.4rem; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); }
.demo-status { margin-top: var(--space-sm); padding: 0.4rem 1rem 0; font: 0.72rem/1.4 var(--mono); color: var(--ink-faint); }
@media (max-width: 30rem) { .r-path { display: none; } .demo-results li { grid-template-columns: minmax(0, 1fr); } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .demo { view-timeline: --demo block; }
    .demo-query { animation: type steps(8, end) both; animation-timeline: --demo; animation-range: entry 55% cover 42%; }
    @keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
    .demo-caret { animation: caret linear both; animation-timeline: --demo; animation-range: entry 55% cover 42%; }
    @keyframes caret { from { transform: translateX(-8.2ch); } }
    .demo-results li, .demo-status { animation: result var(--ease-out) both; animation-timeline: --demo; }
    .demo-results li:nth-child(1) { animation-range: cover 40% cover 46%; }
    .demo-results li:nth-child(2) { animation-range: cover 43% cover 49%; }
    .demo-results li:nth-child(3) { animation-range: cover 46% cover 52%; }
    .demo-results li:nth-child(4) { animation-range: cover 49% cover 55%; }
    .demo-status { animation-range: cover 52% cover 58%; }
    @keyframes result { from { opacity: 0; transform: translateY(6px); } }
  }
}

/* ---------- Contact · the hard colour change ---------- */
.contact { background: var(--ink); color: var(--bg); }
.contact-inner { padding-block: var(--space-3xl) var(--space-3xl); }
.contact-intro { max-width: 34rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; opacity: 0.7; text-wrap: pretty; }
.contact-title { margin-top: var(--space-3xl); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.04em; }
.contact-mail {
  display: inline-block; margin-top: var(--space-sm); margin-left: -0.04em;
  font-weight: 600; font-size: clamp(1.45rem, 6.4vw, 6.5rem); line-height: 1; letter-spacing: -0.06em;
  white-space: nowrap; text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 2px; background-position: 0 100%; background-repeat: no-repeat;
  padding-bottom: 0.08em;
  transition: background-size var(--dur-long) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .contact-mail { background-size: 0% 2px; }
  .contact-mail:hover, .contact-mail:focus-visible { background-size: 100% 2px; }
}
.contact :focus-visible { outline-color: var(--bg); }
.contact-small { margin-top: var(--space-xl); font-size: 0.95rem; opacity: 0.7; }
.contact-small a { text-underline-offset: 0.25em; }

/* ---------- Footer · Ft2 inline ---------- */
.foot { padding-block: var(--space-xl) var(--space-2xl); font-size: 0.85rem; color: var(--ink-soft); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-md); }
.foot-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--space-lg); }
.foot-links a { text-decoration: none; white-space: nowrap; color: var(--ink-soft); transition: color var(--dur-short) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .foot-links a:hover { color: var(--ink); } }
.foot-legal { margin-top: var(--space-lg); padding-top: var(--space-lg); border-top: 1px solid var(--line); font: 0.72rem/1.8 var(--mono); color: var(--ink-faint); }

/* The legal pages' "to be provided" marker, shared look. */
.pending { font: 0.9em var(--mono); border: 1px dashed var(--line-strong); border-radius: 4px; padding: 0 0.3em; }

/* ---------- Reduced motion: keep fades, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav, .hero-title .word { animation: fade-in 150ms linear both; }
  .half .edge { animation: none; stroke-dasharray: none; }
}
