/* ==========================================================================
   Sypher Digital — built literally to medipathai-design-spec.md.

   No reconciliation with the older brand docs this time: the spec's own
   palette, section rhythm and rules win everywhere they conflict.

   - Sky-blue accent (#86C3DF), the only hue in the palette.
   - Anything sitting ON the accent uses near-black text, never white.
   - Real alternating dark / light-gray / white section bands.
   - Fixed WHITE header over an otherwise dark page.
   - border-radius: 0 everywhere; 9999px only for a floating utility widget.
   - One geometric sans for headings, body, UI and numerals.
   - Uppercase + wide tracking reserved for buttons, nav, tags, eyebrows.
   - Small solid accent squares as the recurring bullet motif.

   The light/dark theme toggle is GONE. The spec's rhythm puts light and dark
   bands on the same page, which leaves a user-level theme switch with nothing
   meaningful to switch.
   ========================================================================== */

:root {
  /* Spec section 2 — the entire palette. */
  --ink: #121212;            /* bg-primary / text-on-accent */
  --off-white: #F5F5F5;      /* text-primary on dark */
  --blue: #86C3DF;           /* the one accent */
  --light-1: #EBEBEB;
  --light-2: #E0E0E0;
  --white: #FFFFFF;
  --dark-card: #242424;

  --font: "Space Grotesk", "Segoe UI", system-ui, sans-serif;

  --r: 0;
  --r-round: 9999px;

  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s8: 64px; --s10: 80px;
  --s12: 96px; --s16: 128px; --s18: 144px;

  /* Spec section 4 — 96–144px desktop section padding. */
  --pad: clamp(56px, 9vw, 112px);
  --pad-lg: clamp(72px, 11vw, 144px);
  --pad-sm: clamp(40px, 6vw, 96px);

  --shell: 1280px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 96px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* Defaults: the page base is dark. Tone classes override per section. */
  --bg: var(--ink);
  --text: var(--off-white);
  --text-muted: #A8A8A8;
  --rule: rgba(255,255,255,.14);
  --rule-strong: rgba(255,255,255,.28);
  --accent-text: var(--blue);   /* legible on dark only */
}

/* --------------------------------------------------------------------------
   Section tones — spec section 2: strictly alternating, never two the same
   back to back. Each tone re-declares the text/rule/accent-text values that
   are legible on it. The accent is a light sky blue, so it only works as TEXT
   on dark bands; on light bands it appears as a FILL (squares, buttons, tags)
   with near-black text on top, which is exactly how the spec uses it.
   -------------------------------------------------------------------------- */

.tone-dark   { background: var(--ink);       color: var(--off-white); }
.tone-dark-2 { background: var(--dark-card); color: var(--off-white); }
.tone-dark, .tone-dark-2 {
  --bg: var(--ink); --text: var(--off-white); --text-muted: #A8A8A8;
  --rule: rgba(255,255,255,.14); --rule-strong: rgba(255,255,255,.28);
  --accent-text: var(--blue);
}
.tone-dark-2 { --bg: var(--dark-card); }

.tone-light-1 { background: var(--light-1); }
.tone-light-2 { background: var(--light-2); }
.tone-white   { background: var(--white); }
.tone-light-1, .tone-light-2, .tone-white {
  color: var(--ink);
  --text: var(--ink); --text-muted: #5C5C5C;
  --rule: rgba(18,18,18,.16); --rule-strong: rgba(18,18,18,.34);
  --accent-text: var(--ink);
}
.tone-light-1 { --bg: var(--light-1); }
.tone-light-2 { --bg: var(--light-2); }
.tone-white   { --bg: var(--white); }

/* Aliases so existing template markup keeps working. */
.tone-b { composes: tone-light-1; }
.block.tone-b { background: var(--light-1); color: var(--ink);
  --bg: var(--light-1); --text: var(--ink); --text-muted: #5C5C5C;
  --rule: rgba(18,18,18,.16); --rule-strong: rgba(18,18,18,.34); --accent-text: var(--ink); }
.block.tone-c { background: var(--white); color: var(--ink);
  --bg: var(--white); --text: var(--ink); --text-muted: #5C5C5C;
  --rule: rgba(18,18,18,.16); --rule-strong: rgba(18,18,18,.34); --accent-text: var(--ink); }
.block.tone-d { background: var(--dark-card); color: var(--off-white);
  --bg: var(--dark-card); --text: var(--off-white); --text-muted: #A8A8A8;
  --rule: rgba(255,255,255,.14); --rule-strong: rgba(255,255,255,.28); --accent-text: var(--blue); }

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  padding-top: var(--nav-h);
  background: var(--ink);
  color: var(--off-white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
img { height: auto; border-radius: 0; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, select, textarea { border-radius: 0; }

::selection { background: var(--blue); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--blue); color: var(--ink); padding: 14px 22px;
  font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --------------------------------------------------------------------------
   Type — spec section 3
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 { margin: 0; font-weight: 700; }

/* 36px @375 -> 60px @800 -> 72px @1440, leading pinned to 1.0. */
.d1 { font-size: clamp(36px, 7.5vw, 72px); line-height: 1.0; letter-spacing: -.017em; text-wrap: balance; }
.d2 { font-size: clamp(28px, 6vw, 56px);  line-height: 1.02; letter-spacing: -.017em; text-wrap: balance; }
.d3 { font-size: clamp(20px, 2vw, 26px);  line-height: 1.15; letter-spacing: -.012em; }
.d4 { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.3; letter-spacing: -.008em; font-weight: 600; }
@media (max-width: 600px) { .d1 { line-height: 1.08; } .d2 { line-height: 1.1; } }

p { margin: 0 0 var(--s3); }
p:last-child { margin-bottom: 0; }

/* Body copy: normal case, no tracking, muted tone. */
.lede { font-size: clamp(16px, 1.15vw, 18px); line-height: 1.7; color: var(--text-muted); max-width: 50ch; }
.body-lg { font-size: 16px; line-height: 1.75; color: var(--text-muted); max-width: 56ch; }

/* Micro-typography: UI chrome only. */
.label { font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; line-height: 1.6; }
.label--lg { font-size: 12px; letter-spacing: .18em; }
.label--accent { color: var(--accent-text); }
.label--muted { color: var(--text-muted); }

/* The recurring solid accent square, used as every bullet/marker. */
.tag-line { display: flex; align-items: center; gap: 14px; color: var(--text-muted); }
.tag-line::before { content: ""; width: 12px; height: 12px; flex: none; background: var(--blue); }
.sq { display: inline-block; width: 12px; height: 12px; background: var(--blue); flex: none; }

.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.14; letter-spacing: -.015em; margin: var(--s12) 0 var(--s3); padding-top: var(--s3); border-top: 1px solid var(--rule); }
.prose p, .prose ul, .prose ol { font-size: 16.5px; line-height: 1.8; }
.prose ul, .prose ol { margin: 0 0 var(--s3); padding-left: 0; list-style: none; }
.prose ol { counter-reset: n; }
.prose li { margin-bottom: 12px; padding-left: 28px; position: relative; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: .66em; width: 10px; height: 10px; background: var(--blue); }
.prose ol li { counter-increment: n; }
.prose ol li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 0; font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--text-muted); line-height: 2.2; }
.prose strong { font-weight: 600; color: var(--text); }
.prose em { font-style: italic; }
.prose a { color: var(--text); box-shadow: inset 0 -1px 0 var(--rule-strong); }
.prose a:hover { box-shadow: inset 0 -2px 0 var(--blue); }

/* --------------------------------------------------------------------------
   Shell & rhythm
   -------------------------------------------------------------------------- */

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }
/* Driven off --bg, not a literal, so the tone classes win regardless of
   source order — .block's own background used to override them. */
.block { padding-block: var(--pad); background: var(--bg); }
.block--lg { padding-block: var(--pad-lg); }
.block--tight { padding-block: var(--pad-sm); }
.block--sunken { background: var(--light-1); }
.ruled-top { border-top: 1px solid var(--rule); }

.gridlines { position: relative; }
.gridlines::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, color-mix(in srgb, currentColor 6%, transparent) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%; }
.gridlines > * { position: relative; }

.rail-layout { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.rail-layout--wide { grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); }
.offset-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.offset-layout--center { align-items: center; }
@media (max-width: 1000px) { .rail-layout, .rail-layout--wide, .offset-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s5); } }

.block-head { margin-bottom: clamp(32px, 5vw, 64px); }
.block-head__meta { display: flex; align-items: center; gap: var(--s2); padding-bottom: var(--s2); margin-bottom: var(--s5); border-bottom: 1px solid var(--rule); }
.block-head__meta .idx { color: var(--accent-text); }
.block-head__meta .ttl { color: var(--text-muted); }
.block-head__meta .spacer { flex: 1; }
.block-head p { color: var(--text-muted); max-width: 52ch; margin: var(--s3) 0 0; }

/* --------------------------------------------------------------------------
   Buttons — spec section 5
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font); font-size: 10px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; line-height: 1;
  padding: 15px 26px; border: 1px solid transparent; border-radius: 0; cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn svg { transition: transform .22s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

/* Solid accent fill + near-black text. Never white on blue. */
.btn--primary { background: var(--blue); color: var(--ink); }
.btn--primary:hover { background: #A2D3E9; }

/* Outline: 1px border in the current text colour. */
.btn--ghost { background: transparent; color: var(--text); border-color: currentColor; }
.btn--ghost:hover { background: var(--text); color: var(--bg); }

.btn--sm { padding: 12px 18px; font-size: 9px; letter-spacing: .2em; }
.btn-text { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; color: var(--text); }
.btn-text:hover { color: var(--blue); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

/* Signature pairing: button + small square icon-only button. */
.btn-pair { display: inline-flex; align-items: stretch; gap: 8px; }
.btn-sq {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; min-height: 46px; flex: none;
  background: transparent; color: var(--text);
  border: 1px solid currentColor; border-radius: 0; cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.btn-sq:hover { background: var(--text); color: var(--bg); }
.btn-pair .btn--sm + .btn-sq { width: 40px; min-height: 40px; }

.arrow-link { display: inline-flex; align-items: center; gap: 10px; font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text); position: relative; padding-bottom: 6px; }
.arrow-link::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .32s var(--ease); }
.arrow-link:hover { color: var(--blue); }
.arrow-link:hover::after { transform: scaleX(1); }
.arrow-link svg { transition: transform .22s var(--ease); }
.arrow-link:hover svg { transform: translateX(3px); }
.tone-light-1 .arrow-link:hover, .tone-white .arrow-link:hover,
.block.tone-b .arrow-link:hover, .block.tone-c .arrow-link:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Header — spec section 4: fixed, always WHITE, 96/80px
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--white); color: var(--ink);
  box-shadow: 0 1px 1px rgba(0,0,0,.05);
  --text: var(--ink); --text-muted: #5C5C5C;
  --rule: rgba(18,18,18,.16); --rule-strong: rgba(18,18,18,.34);
  --bg: var(--white); --accent-text: var(--ink);
}
/* The shell must carry the header's full height, otherwise .nav's
   height:100% resolves against an auto-height parent and the whole bar
   collapses to the top instead of centring in the 96px band. */
.site-header .shell { height: 100%; display: flex; align-items: center; }
.nav { display: flex; align-items: center; gap: var(--s3); width: 100%; height: 100%; }

/* Lockup rebuilt from icon-mark.svg + type so it works on white, light-gray
   and near-black alike (the PNG exports carry a baked background). The mark
   itself is untouched and stays monochrome. */
.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; color: currentColor; }
.brand__mark { display: block; width: 30px; height: 30px; flex: none; }
.brand__mark svg { display: block; width: 100%; height: 100%; }
.footer-brand .brand__mark { width: 38px; height: 38px; }
.footer-brand .brand__type b { font-size: 21px; }
.mobile-menu .brand__mark { width: 32px; height: 32px; }
.brand__type { display: block; line-height: 1; }
.brand__type b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.03em; }
.brand__type span { display: block; font-size: 8px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; margin-top: 3px; opacity: .72; }

.nav__links { display: flex; align-items: center; gap: 6px; list-style: none;
  margin: 0 0 0 clamp(20px, 3.5vw, 56px); padding: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  padding: 11px 15px; background: none; border: 0; cursor: pointer; white-space: nowrap;
  color: var(--ink); position: relative; transition: color .16s var(--ease);
}
.nav__link:hover { color: #4A93B4; }
/* Active state = the square marker motif. */
.nav__link[aria-current="page"], .nav__link.is-active { padding-left: 22px; }
.nav__link[aria-current="page"]::before, .nav__link.is-active::before {
  content: ""; position: absolute; left: 4px; top: 50%; margin-top: -4px;
  width: 9px; height: 9px; background: var(--blue);
}
.nav__actions { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }

.nav__dropdown { position: relative; }
.nav__dropdown-toggle svg { transition: transform .22s var(--ease); }
.nav__dropdown[data-open="true"] .nav__dropdown-toggle svg { transform: rotate(180deg); }
.nav__menu {
  position: absolute; top: 100%; left: 0; min-width: 330px;
  background: var(--white); border: 1px solid rgba(18,18,18,.16);
  box-shadow: 0 10px 28px rgba(0,0,0,.10);
  padding: 6px; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.nav__dropdown[data-open="true"] .nav__menu,
.nav__dropdown:hover .nav__menu,
.nav__dropdown:focus-within .nav__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__menu a { display: grid; grid-template-columns: 22px 1fr; gap: var(--s2); padding: 13px 14px; transition: background-color .16s var(--ease); }
.nav__menu a:hover { background: var(--light-1); }
.nav__menu .n { width: 10px; height: 10px; background: var(--blue); margin-top: 6px; font-size: 0; }
.nav__menu .t { font-weight: 600; font-size: 14px; color: var(--ink); }
.nav__menu .s { display: block; font-size: 12.5px; color: #5C5C5C; line-height: 1.5; margin-top: 3px; font-weight: 400; letter-spacing: 0; text-transform: none; }

.icon-btn {
  width: 46px; height: 46px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink);
  border: 1px solid rgba(18,18,18,.34); border-radius: 0; cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.icon-btn:hover { background: var(--ink); color: var(--white); }

.nav__burger { display: none; }
@media (max-width: 1080px) { .nav__links { display: none; } .nav__burger { display: inline-flex; } }
@media (max-width: 560px) { :root { --nav-h: 80px; } .nav__actions .btn-pair { display: none; } }

/* --------------------------------------------------------------------------
   Mobile overlay — spec section 4: full screen, theme inverted to LIGHT
   -------------------------------------------------------------------------- */

.mobile-menu {
  position: fixed; inset: 0; z-index: 150;
  background: var(--light-1); color: var(--ink);
  --text: var(--ink); --text-muted: #5C5C5C;
  --rule: rgba(18,18,18,.16); --bg: var(--light-1); --accent-text: var(--ink);
  display: none; flex-direction: column; overflow-y: auto;
}
.mobile-menu[data-open="true"] { display: flex; }
body.menu-open { overflow: hidden; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); border-bottom: 1px solid var(--rule); }
.menu-close {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  background: transparent; border: 1px solid currentColor; border-radius: 0;
  color: var(--ink); padding: 14px 18px; cursor: pointer;
}
.menu-close:hover { background: var(--ink); color: var(--light-1); }
.mobile-menu__body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); padding: clamp(32px, 6vw, 64px) 0; align-items: start; }
@media (max-width: 820px) { .mobile-menu__body { grid-template-columns: 1fr; gap: var(--s6); } }
.mobile-menu__links { list-style: none; margin: 0; padding: 0; }
.mobile-menu__links li { border-bottom: 1px solid var(--rule); }
.mobile-menu__links a { display: flex; align-items: center; gap: var(--s3); padding: clamp(14px, 2.2vw, 20px) 0; font-size: clamp(24px, 4.2vw, 40px); font-weight: 700; letter-spacing: -.028em; line-height: 1.05; color: var(--ink); }
.mobile-menu__links a:hover, .mobile-menu__links a[aria-current="page"] { color: #3E8FB2; }
.mobile-menu__links .n { width: 12px; height: 12px; background: var(--blue); flex: none; font-size: 0; }
.mobile-menu__aside { display: grid; gap: var(--s5); }
.mobile-menu__aside h4 { font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 var(--s2); }
.mobile-menu__aside p, .mobile-menu__aside a { font-size: 14px; color: var(--text-muted); margin: 0 0 6px; }
.mobile-menu__foot { padding-bottom: var(--s8); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; background: var(--ink); color: var(--off-white); }
.hero__body { position: relative; z-index: 2; padding-block: clamp(56px, 9vw, 128px) clamp(48px, 7vw, 96px); }
.hero__kicker { margin-bottom: clamp(24px, 4vw, 44px); }
.hero .d1 { max-width: 16ch; margin-bottom: var(--s5); }
.hero .lede { margin-bottom: var(--s6); }

.aperture-field { position: absolute; z-index: 1; right: clamp(-260px, -14vw, -80px); top: 50%; transform: translateY(-50%); width: clamp(420px, 52vw, 760px); color: var(--blue); opacity: .16; pointer-events: none; }
.aperture-field--dim { opacity: .1; }

.hero__photo { position: absolute; inset: 0; z-index: 0; display: block; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--ink) 0, rgba(18,18,18,.72) 200px, rgba(18,18,18,.6) 100%),
              linear-gradient(to right, rgba(18,18,18,.92) 0%, rgba(18,18,18,.25) 78%); }

.strip { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.strip__cell { display: block; padding: var(--s5) var(--s4) var(--s5) 0; border-right: 1px solid var(--rule); position: relative; transition: color .2s var(--ease); }
.strip__cell:last-child { border-right: 0; }
.strip__cell::before { content: ""; position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--blue); transition: width .42s var(--ease); }
.strip__cell:hover::before { width: 100%; }
.strip__cell:hover { color: var(--blue); }
.strip__n { display: block; width: 12px; height: 12px; background: var(--blue); margin-bottom: var(--s3); font-size: 0; }
.strip__t { font-weight: 700; font-size: clamp(16px, 1.4vw, 20px); letter-spacing: -.015em; }
.strip__d { display: block; margin-top: 10px; font-size: 13.5px; color: var(--text-muted); line-height: 1.6; max-width: 34ch; }
@media (max-width: 820px) { .strip { grid-template-columns: 1fr; } .strip__cell { border-right: 0; border-bottom: 1px solid var(--rule); padding-right: 0; } .strip__cell:last-child { border-bottom: 0; } }

.page-head { position: relative; overflow: hidden; background: var(--ink); color: var(--off-white); padding-block: clamp(44px, 6vw, 96px) clamp(36px, 5vw, 72px); }
.page-head .d1 { max-width: 18ch; }
.page-head .offset-layout .d1 { font-size: clamp(32px, 4vw, 56px); max-width: 15ch; }
.page-head__kicker { margin-bottom: var(--s5); }
.page-head .lede { margin-top: var(--s4); }

/* --------------------------------------------------------------------------
   Services index
   -------------------------------------------------------------------------- */

.index-list { border-top: 1px solid var(--rule); }
.index-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) minmax(0, 30ch) 46px; gap: clamp(16px, 3vw, 48px); align-items: center; padding: clamp(24px, 3.2vw, 44px) 0; border-bottom: 1px solid var(--rule); position: relative; transition: color .22s var(--ease); }
.index-row::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; background: var(--blue); transition: width .52s var(--ease); }
.index-row:hover::after { width: 100%; }
.index-row__n { width: 14px; height: 14px; background: var(--blue); align-self: start; margin-top: 14px; font-size: 0; }
.index-row__t { font-weight: 700; font-size: clamp(24px, 3.2vw, 42px); line-height: 1.02; letter-spacing: -.028em; transition: transform .32s var(--ease); }
.index-row:hover .index-row__t { transform: translateX(10px); }
.index-row__d { color: var(--text-muted); font-size: 14.5px; line-height: 1.65; }
.index-row__go { width: 46px; height: 46px; border: 1px solid var(--rule-strong); display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); transition: background-color .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease); }
.index-row:hover .index-row__go { background: var(--blue); border-color: var(--blue); color: var(--ink); }
@media (max-width: 1000px) {
  .index-row { grid-template-columns: 26px minmax(0, 1fr); gap: var(--s2) var(--s3); align-items: start; }
  .index-row__n { margin-top: 8px; }
  .index-row__d { grid-column: 2; }
  .index-row__go { display: none; }
  .index-row:hover .index-row__t { transform: none; }
}

/* --------------------------------------------------------------------------
   Process — 40x40 solid accent squares with bold dark numerals (spec §4)
   -------------------------------------------------------------------------- */

.rail { position: relative; }
.rail__track { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(32px, 5vw, 64px) clamp(28px, 4vw, 56px); }
.rail__step { position: relative; }
.rail__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: var(--blue); color: var(--ink);
  font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none;
  margin-bottom: var(--s3);
}
.rail__t { font-weight: 700; font-size: clamp(19px, 1.7vw, 24px); letter-spacing: -.018em; margin-bottom: 10px; }
.rail__d { color: var(--text-muted); font-size: 15px; line-height: 1.7; max-width: 44ch; }
@media (max-width: 820px) { .rail__track { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Work panels — thin border / left accent stripe, flat
   -------------------------------------------------------------------------- */

.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 3vw, 48px) clamp(20px, 2.5vw, 40px); }
.work-item:nth-child(4n+1) { grid-column: span 7; }
.work-item:nth-child(4n+2) { grid-column: span 5; }
.work-item:nth-child(4n+3) { grid-column: span 5; }
.work-item:nth-child(4n+4) { grid-column: span 7; }
.work-grid--even .work-item { grid-column: span 4; }
@media (max-width: 1000px) { .work-grid { grid-template-columns: 1fr; }
  .work-item, .work-item:nth-child(4n+1), .work-item:nth-child(4n+2),
  .work-item:nth-child(4n+3), .work-item:nth-child(4n+4), .work-grid--even .work-item { grid-column: 1 / -1; } }

.panel { position: relative; aspect-ratio: 16 / 9; background: var(--dark-card); color: var(--off-white); border: 1px solid rgba(255,255,255,.14); border-left: 4px solid var(--blue); display: flex; flex-direction: column; justify-content: flex-end;
  align-items: flex-start; padding: clamp(20px, 2.4vw, 36px); overflow: hidden; transition: border-color .24s var(--ease); }
.tone-light-1 .panel, .tone-white .panel, .block.tone-b .panel, .block.tone-c .panel { border-color: rgba(18,18,18,.16); border-left-color: var(--blue); }
.work-item:hover .panel { border-color: var(--blue); }
.panel::before { content: ""; position: absolute; right: -8%; bottom: -22%; width: 44%; aspect-ratio: 1; background: var(--blue); opacity: .1;
  -webkit-mask: url("../images/logo/icon-mark.svg") center / contain no-repeat;
  mask: url("../images/logo/icon-mark.svg") center / contain no-repeat; transition: transform .6s var(--ease); }
.work-item:hover .panel::before { transform: rotate(29deg) scale(1.06); }
.panel__bracket { position: absolute; width: 14px; height: 14px; border-color: var(--blue); border-style: solid; border-width: 0; opacity: 0; transition: opacity .26s var(--ease); }
.panel__bracket--tl { top: 10px; left: 10px; border-top-width: 2px; border-left-width: 2px; }
.panel__bracket--br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; }
.work-item:hover .panel__bracket { opacity: 1; }
.panel__url { position: relative; display: block; margin-top: 10px; color: var(--blue); }
.panel__name { position: relative; font-weight: 700; font-size: clamp(20px, 2.1vw, 30px); line-height: 1.06; letter-spacing: -.022em; margin: 0; }

.work-meta { padding-top: var(--s3); }
.work-meta__row { display: flex; flex-wrap: wrap; gap: var(--s2); padding-bottom: var(--s2); margin-bottom: var(--s2); border-bottom: 1px solid var(--rule); color: var(--text-muted); }
.work-meta__row .sep { opacity: .5; }
.work-meta p { font-size: 14.5px; color: var(--text-muted); line-height: 1.65; margin: 0 0 6px; }
.work-meta p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Spec list & left-stripe cards
   -------------------------------------------------------------------------- */

.spec { border-top: 1px solid var(--rule); }
.spec__item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: clamp(12px, 2vw, 28px); padding: var(--s4) 0; border-bottom: 1px solid var(--rule); }
.spec__n { width: 12px; height: 12px; background: var(--blue); margin-top: 9px; font-size: 0; }
.spec__t { font-weight: 600; font-size: 16.5px; margin: 0 0 6px; }
.spec__d { color: var(--text-muted); font-size: 15px; line-height: 1.7; margin: 0; }

/* Left-edge accent stripe, no other border, flat (spec section 5). */
.notes { display: grid; gap: var(--s4); }
.notes--2 { grid-template-columns: repeat(2, 1fr); gap: var(--s4) clamp(24px, 3vw, 40px); }
.note { border-left: 4px solid var(--blue); padding: 4px 0 4px var(--s3); }
.note__n { display: none; }
.note h3 { font-weight: 700; font-size: clamp(17px, 1.4vw, 20px); letter-spacing: -.015em; margin: 0 0 10px; }
.note p { color: var(--text-muted); font-size: 15px; line-height: 1.7; margin: 0; }
@media (max-width: 820px) { .notes--2 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Closing CTA band — dark
   -------------------------------------------------------------------------- */

.statement { background: var(--ink); color: var(--off-white); --text: var(--off-white); --text-muted: #A8A8A8; --rule: rgba(255,255,255,.14); --bg: var(--ink); --accent-text: var(--blue); position: relative; overflow: hidden; }
.statement__inner { padding-block: var(--pad-lg); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 5vw, 80px); align-items: end; }
.statement .d2 { max-width: 16ch; }
.statement p { color: var(--text-muted); max-width: 48ch; margin: var(--s4) 0 0; }
.statement .aperture-field { opacity: .09; right: -12%; }
@media (max-width: 900px) { .statement__inner { grid-template-columns: 1fr; align-items: start; } }

/* --------------------------------------------------------------------------
   Figures, placeholders, proof
   -------------------------------------------------------------------------- */

.figure { overflow: hidden; border-radius: 0; background: var(--dark-card); position: relative; }
.figure img { width: 100%; }
.figure--16-10 { aspect-ratio: 16 / 10; }
.figure--16-10 img { height: 100%; object-fit: cover; }
.figure--portrait { aspect-ratio: 4 / 5; }
.figure--portrait img { height: 100%; object-fit: cover; }
.figure__frame { position: absolute; inset: 0; border: 1px solid var(--rule); pointer-events: none; }
.zoom img { transition: transform .7s var(--ease); }
.zoom:hover img { transform: scale(1.03); }
.diagram { width: 100%; color: var(--text); }

.pending { font-size: 13px; line-height: 1.8; color: var(--text-muted); border: 1px dashed var(--rule-strong); border-left: 4px solid var(--blue); padding: var(--s3) var(--s4); position: relative; }
.pending::before { content: "PENDING"; position: absolute; top: -7px; left: var(--s4); background: var(--bg); padding: 0 8px; font-size: 9px; font-weight: 600; letter-spacing: .24em; color: var(--text-muted); }

.proof { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 720px; }
.proof__slot { padding: var(--s6) var(--s2); border-right: 1px solid var(--rule); text-align: center; color: var(--text-muted); }
.proof__slot:last-child { border-right: 0; }

/* --------------------------------------------------------------------------
   Horizontal scroll — spec section 4 / checklist 9
   -------------------------------------------------------------------------- */

.scroll-x { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; padding-bottom: 4px; }
.scroll-x::-webkit-scrollbar { height: 8px; }
.scroll-x::-webkit-scrollbar-track { background: color-mix(in srgb, currentColor 10%, transparent); }
.scroll-x::-webkit-scrollbar-thumb { background: var(--rule-strong); }
.scroll-x::-webkit-scrollbar-thumb:hover { background: var(--blue); }
.scroll-x-wrap { position: relative; }
.scroll-x-wrap::after { content: ""; position: absolute; top: 0; bottom: 12px; right: 0; width: 64px; pointer-events: none; opacity: 1; transition: opacity .22s var(--ease); background: linear-gradient(to right, transparent, var(--bg)); }
.scroll-x-wrap.is-end::after, .scroll-x-wrap.no-scroll::after { opacity: 0; }
.scroll-x-hint { margin-top: var(--s2); color: var(--text-muted); display: none; }
.scroll-x-wrap:not(.no-scroll) + .scroll-x-hint { display: block; }

.data-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.data-table th, .data-table td { text-align: left; padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.data-table thead th { font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); }
.data-table th[scope="row"] { font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); width: 26%; }
.data-table td { font-size: 15px; color: var(--text); }
.data-table thead .is-primary { color: var(--accent-text); display: flex; align-items: center; gap: 10px; }
.data-table thead .is-primary::before { content: ""; width: 10px; height: 10px; background: var(--blue); flex: none; }

/* --------------------------------------------------------------------------
   Post list
   -------------------------------------------------------------------------- */

.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.post-item { border-bottom: 1px solid var(--rule); position: relative; }
.post-item::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; background: var(--blue); transition: width .52s var(--ease); }
.post-item:hover::after { width: 100%; }
.post-item a { display: grid; grid-template-columns: 60px minmax(0, 1fr) minmax(0, 34ch); gap: clamp(16px, 3vw, 48px); padding: clamp(22px, 3vw, 38px) 0; align-items: start; }
.post-item .n { width: 12px; height: 12px; background: var(--blue); margin-top: 10px; font-size: 0; }
.post-item h3 { font-weight: 700; font-size: clamp(19px, 1.9vw, 26px); line-height: 1.16; letter-spacing: -.022em; margin: 0 0 10px; }
.post-item .dek { color: var(--text-muted); font-size: 14.5px; line-height: 1.65; margin: 0; }
.post-item time { color: var(--text-muted); }
@media (max-width: 900px) { .post-item a { grid-template-columns: 26px minmax(0, 1fr); } .post-item .dek { grid-column: 2; } }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form { display: grid; gap: var(--s4); max-width: 620px; }
.field { display: grid; gap: 10px; }
.field label { font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--text-muted); }
.field .hint { text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea { font-family: var(--font); font-size: 16px; color: var(--text); background: transparent; border: 1px solid var(--rule-strong); border-radius: 0; padding: 14px 16px; width: 100%; transition: border-color .2s var(--ease); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 18px center, right 13px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); }
.field .error { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #C0392B; display: none; }
.field.has-error .error { display: block; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #C0392B; }
.field select option { background: var(--white); color: var(--ink); }
.form__footnote { font-size: 12.5px; line-height: 1.8; color: var(--text-muted); }

.contact-detail { margin: 0; }
.contact-detail div { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.contact-detail dt { font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.contact-detail dd { margin: 0; font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.contact-detail dd a:hover { color: var(--blue); }
.contact-detail dd.plain { font-weight: 400; font-size: 13px; color: var(--text-muted); line-height: 1.75; letter-spacing: 0; }

/* --------------------------------------------------------------------------
   Footer — dark, flat, oversized wordmark watermark (spec section 4)
   -------------------------------------------------------------------------- */

.site-footer { background: var(--ink); color: var(--off-white); --text: var(--off-white); --text-muted: #A8A8A8; --rule: rgba(255,255,255,.14); --bg: var(--ink); --accent-text: var(--blue); padding-top: var(--pad); position: relative; overflow: hidden; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, .85fr)); gap: clamp(28px, 4vw, 64px); padding-bottom: var(--s10); }
.footer-brand .brand { color: var(--off-white); }
.footer-brand p { color: var(--text-muted); font-size: 14px; max-width: 32ch; margin: var(--s3) 0 0; line-height: 1.7; }
.footer-col h4 { font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid var(--rule); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-col a { font-size: 14px; transition: color .16s var(--ease); }
.footer-col a:hover { color: var(--blue); }
.footer-col .ph { font-size: 12px; color: var(--text-muted); }
.footer-watermark { margin-top: var(--s6); font-weight: 700; font-size: clamp(46px, 15.2vw, 250px); line-height: .8; letter-spacing: -.05em; color: var(--off-white); opacity: .05; user-select: none; white-space: nowrap; text-align: center; pointer-events: none; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); justify-content: space-between; align-items: center; padding: var(--s3) 0; border-top: 1px solid var(--rule); color: var(--text-muted); position: relative; }
@media (max-width: 1000px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 620px) { .footer-top { grid-template-columns: 1fr; } }

/* The one round element permitted (spec section 7). */
.round { border-radius: var(--r-round); }

/* Motion */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal, .reveal.is-static { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
