/* XTL: main stylesheet (R1). Spec: design/DESIGN_DIRECTION.md, design/REFINEMENT_R1.md */

@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Manrope Fallback"; src: local("Arial"); size-adjust: 103%; ascent-override: 103%; descent-override: 29%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"); size-adjust: 107%; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; }

:root {
  /* film grain (inline SVG noise, allowed by img-src data:); used on charcoal surfaces */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --xtl-orange: #FF6A00;
  --xtl-charcoal: #0F1115;
  --xtl-offwhite: #FAFAF8;
  --xtl-gray: #E5E7EB;
  --orange-text: #F06300;          /* orange for TEXT on off-white: 3.1:1 (large text only); brand #FF6A00 is 2.75:1 */
  --ink: var(--xtl-charcoal);
  --ink-muted: #5B5F66;           /* 6.14:1 on off-white */
  --line: #D3D6DB;
  --line-strong: var(--xtl-charcoal);
  --bg: var(--xtl-offwhite);
  --focus-inner: var(--xtl-charcoal);
  --focus-outer: var(--xtl-offwhite);

  --f-display: "Manrope", "Manrope Fallback", system-ui, sans-serif;
  --f-body: "Inter", "Inter Fallback", system-ui, sans-serif;
  --fs-display: clamp(3.125rem, 1.4rem + 6.6vw, 7.8125rem);
  --fs-statement: clamp(2.25rem, 1.35rem + 4.2vw, 5.5rem);
  --fs-numeral: clamp(2.5rem, 1.9rem + 2.4vw, 4.5rem);
  --fs-h2: clamp(1.875rem, 1.4rem + 2.1vw, 3.5rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.7vw, 1.75rem);
  --fs-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-body: clamp(1.0625rem, 1.02rem + 0.2vw, 1.125rem);
  --fs-small: 0.9375rem;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --pad-l: max(var(--pad), env(safe-area-inset-left));
  --pad-r: max(var(--pad), env(safe-area-inset-right));
  --gap: clamp(1rem, 2vw, 1.5rem);
  --section: clamp(4.5rem, 8vw, 8.5rem);
  --header-h: 64px;

  /* motion vocabulary (REFINEMENT_R1 §4) */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-std: cubic-bezier(.4, 0, .2, 1);
  --ease-dec: cubic-bezier(0, 0, .2, 1);
  --ease-acc: cubic-bezier(.4, 0, 1, 1);
}
@media (min-width: 768px) { :root { --header-h: 72px; } }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); scrollbar-gutter: stable; }
html.menu-open { overflow: hidden; }
body { background: var(--bg); color: var(--ink); font: 400 var(--fs-body)/1.6 var(--f-body); text-rendering: optimizeLegibility; }
img, svg, picture { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; text-wrap: balance; }
p { text-wrap: pretty; }
[tabindex="-1"]:focus { outline: none; }
[tabindex="-1"]:focus-visible { outline: 2px solid var(--focus-inner); outline-offset: 4px; }

:focus-visible { outline: 2px solid var(--focus-inner); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus-outer); }
.dark { --focus-inner: var(--xtl-offwhite); --focus-outer: var(--xtl-charcoal); }
.thesis { --focus-inner: var(--xtl-charcoal); --focus-outer: var(--xtl-orange); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 1rem; inset-block-start: -4rem; z-index: 100; background: var(--ink); color: var(--bg); padding: .75rem 1rem; }
.skip:focus { inset-block-start: 1rem; }
.nw { white-space: nowrap; }

/* ---------- type roles ---------- */
.hero-q .accent { color: var(--orange-text); } /* user request (R1.6); display size only, never body text */
.display { font-size: var(--fs-display); font-weight: 400; line-height: .96; letter-spacing: -.045em; }
.statement { font-size: var(--fs-statement); font-weight: 500; line-height: 1; letter-spacing: -.035em; }
.h2 { font-size: var(--fs-h2); font-weight: 500; line-height: 1.06; letter-spacing: -.025em; }
.h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.2; letter-spacing: -.015em; }
.lead { font-size: var(--fs-lead); line-height: 1.5; letter-spacing: -.005em; }
.label { font: 500 var(--fs-small)/1.45 var(--f-body); color: var(--ink-muted); }
.muted { color: var(--ink-muted); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: 90rem; margin-inline: auto; padding-inline: var(--pad-l) var(--pad-r); }
.section { padding-block: var(--section); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .75rem 1.25rem; background: var(--xtl-orange); color: var(--xtl-charcoal);
  font: 500 1rem/1.2 var(--f-body); text-decoration: none; border: 0; cursor: pointer; transition: background-color .15s var(--ease-std), color .15s var(--ease-std); }
@media (hover: hover) { .btn:hover { background: var(--xtl-charcoal); color: var(--xtl-offwhite); } .dark .btn:hover { background: var(--xtl-offwhite); color: var(--xtl-charcoal); } } /* no sticky hover after a tap */
.btn[disabled] { cursor: progress; background: #C9CDD3; color: var(--xtl-charcoal); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - .55em) / 100% 1px no-repeat; transition: background-size .2s var(--ease-std); }
.text-link:hover { background-size: 100% 2px; }

/* registration cross: two hairlines crossing on a corner */
.cross { position: relative; }
.cross::before, .cross::after { content: ""; position: absolute; background: var(--line-strong); pointer-events: none; z-index: 1; }
.cross::before { inset-inline-start: -28px; inset-block-start: 0; width: 56px; height: 1px; }
.cross::after { inset-inline-start: 0; inset-block-start: -28px; width: 1px; height: 56px; }

/* placeholder marker (removed automatically when FINAL_APPROVED) */
.is-placeholder { position: relative; }
.is-placeholder::after { content: "Placeholder"; position: absolute; inset-block-start: .75rem; inset-inline-end: .75rem; background: var(--xtl-charcoal); color: var(--xtl-offwhite); font: 500 .75rem/1 var(--f-body); padding: .35rem .5rem; }
picture img { width: 100%; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-block-end: 1px solid var(--line); }
.site-header.dark, .menu-dialog.dark .menu-top { background: var(--xtl-charcoal); border-block-end-color: rgb(255 255 255 / .1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; min-height: var(--header-h); flex-wrap: wrap; }
.js .header-inner { flex-wrap: nowrap; }
.logo { display: block; flex: none; padding-block: .75rem; }
.logo img { height: 22px; width: auto; }
@media (min-width: 768px) { .logo img { height: 28px; } }

.site-nav { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-nav ul a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font: 500 var(--fs-small)/1 var(--f-body); text-decoration: none; }
.site-nav ul a::after { content: ""; position: absolute; inset-inline: 0; bottom: 10px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease-std), background-color .2s; }
.site-nav ul a:hover::after, .site-nav ul a:focus-visible::after { transform: scaleX(1); }
.site-nav ul a.is-current::after { transform: scaleX(1); height: 2px; background: var(--xtl-orange); }

/* menu control (an <a> to #footer-nav until main.js upgrades it); fixed width so nothing shifts */
.menu-btn { display: none; align-items: center; justify-content: flex-end; gap: .6rem; flex: none; width: 6.5rem; min-height: 44px; padding: 0; background: none; border: 0; color: inherit;
  font: 500 1rem/1 var(--f-body); text-decoration: none; cursor: pointer; }
.menu-glyph { position: relative; width: 20px; height: 12px; flex: none; }
.menu-glyph span { position: absolute; inset-inline: 0; height: 1.5px; background: currentColor; border-radius: 1px; transition: transform .26s var(--ease-std), top .26s var(--ease-std); }
.menu-glyph span:first-child { top: 2px; }
.menu-glyph span:last-child { top: 8.5px; }
.menu-dialog.is-open .menu-close .menu-glyph span { top: 5.25px; }
.menu-dialog.is-open .menu-close .menu-glyph span:first-child { transform: rotate(45deg); }
.menu-dialog.is-open .menu-close .menu-glyph span:last-child { transform: rotate(-45deg); }

@media (max-width: 1023px) {
  .js .site-nav { display: none; }
  .js .menu-btn { display: inline-flex; }
  html:not(.js) .site-nav { width: 100%; padding-block-end: .75rem; }
}

/* menu dialog: a fixed surface; its top row mirrors the header exactly (same wrap, logo, control) */
.menu-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0 var(--sbw, 0px) 0 0; border: 0;
  background: var(--bg); color: var(--ink); overflow: auto; overscroll-behavior: contain; }
.menu-dialog::backdrop { background: transparent; }
.menu-dialog .menu-btn { display: inline-flex; }
.menu-top { position: sticky; top: 0; z-index: 1; background: var(--bg); border-block-end: 1px solid var(--line); }
.menu-body { display: flex; flex-direction: column; gap: 2rem; padding-block: clamp(1.5rem, 5vh, 3rem) max(2rem, env(safe-area-inset-bottom)); min-height: calc(100% - var(--header-h) - 1px); }
.menu-links { border-block-start: 1px solid var(--line-strong); }
.menu-links a { display: flex; align-items: center; min-height: 3.25rem; padding-block: .6rem; border-block-end: 1px solid var(--line);
  font: 500 clamp(1.625rem, 1.2rem + 2.4vw, 2.5rem)/1.1 var(--f-display); letter-spacing: -.025em; text-decoration: none; }
.menu-links a:hover { color: var(--ink-muted); }
.menu-dialog.dark { background: var(--grain) var(--xtl-charcoal); }
.menu-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-block-start: auto; }
.menu-meta { font-size: var(--fs-small); color: var(--ink-muted); }
@media (max-height: 520px) {
  .menu-body { gap: 1rem; padding-block-start: 1rem; }
  .menu-links { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); }
  .menu-links a { min-height: 2.75rem; font-size: 1.375rem; }
}

/* ---------- hero: "Signal" (R1.16) ----------
   Charcoal, cinematic: the photo bleeds in from the right and fades into the dark, faint 45° lines
   from the logo's slash, film grain, and the five stages along the bottom that light up once. */
.hero { position: relative; isolation: isolate; overflow: clip; display: grid; grid-template-rows: 1fr auto;
  min-height: calc(100svh - var(--header-h)); background-color: var(--xtl-charcoal); }
.hero-media { position: absolute; inset: 0 0 38% 0; z-index: -2; }
.hero-media picture, .hero-media img { display: block; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: 50% 38%; }
.hero-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    var(--grain),
    repeating-linear-gradient(135deg, rgb(255 255 255 / .035) 0 1px, transparent 1px 92px),
    linear-gradient(0deg, var(--xtl-charcoal) 38%, rgb(15 17 21 / .55) 58%, rgb(15 17 21 / .1) 80%, rgb(15 17 21 / .35) 100%); }
.hero-body { align-self: end; display: grid; justify-items: start; gap: 1.25rem; padding-block: 34svh 2.25rem; }
.kicker { display: inline-flex; align-items: center; gap: .7rem; font: 500 .8125rem/1.2 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.kicker::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--xtl-orange); box-shadow: 0 0 0 5px rgb(255 106 0 / .16); }
.hero-kicker { color: #B9BDC4; }
.dark .hero-kicker::before { box-shadow: 0 0 0 5px rgb(255 106 0 / .18), 0 0 22px rgb(255 106 0 / .9); }
.hero-q { color: var(--xtl-offwhite); max-width: 6.8em; font-size: clamp(2.75rem, 1.4rem + 4.4vw, 5.75rem); } /* R1.21: "We turn real / problems into / ventures." clear of the bulb */
.hero-kicker { text-wrap: balance; }
.hero-q .accent, .hero-answer .accent { color: var(--xtl-orange); } /* user request (R1.6); orange on charcoal 6.6:1 */
.hero-copy { display: grid; gap: 1rem; max-width: 40rem; margin-block-start: .5rem; }
.hero-answer { font: 500 clamp(1.375rem, 1.1rem + 1.2vw, 2.125rem)/1.15 var(--f-display); letter-spacing: -.02em; color: #E5E7EB; }
.hero-intro { max-width: 36rem; color: #A9AEB6; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 2rem; }
.hero-now { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; font-size: var(--fs-small); text-decoration: none; color: #A9AEB6; }
.hero-now strong { color: var(--xtl-offwhite); font-weight: 600; }
.hero-now:hover span:last-child { text-decoration: underline; text-underline-offset: .25em; }
.hero-now .status-dot { width: 8px; height: 8px; background: var(--xtl-orange); flex: none; }
/* the five stages: a rail that fills once on load (4 s, under the WCAG 2.2.2 five-second limit) */
.hero-rail { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-block-start: 1px solid rgb(255 255 255 / .16); }
.hero-rail::before { content: ""; position: absolute; inset: -1px 0 auto; height: 2px; background: var(--xtl-orange); transform-origin: left; }
.hero-rail li { padding-block: .9rem 1.4rem; font: 500 clamp(.8125rem, .75rem + .25vw, .9375rem)/1.3 var(--f-body); color: var(--xtl-offwhite); white-space: nowrap; }
.hero-rail span { display: block; font-size: .75rem; color: #8A8F96; margin-block-end: .15rem; }
@media (min-width: 1024px) {
  .hero-media { inset: 0 0 0 34%; }
  .hero-media img { object-position: 50% 40%; }
  .hero-fx { background:
    var(--grain),
    repeating-linear-gradient(135deg, rgb(255 255 255 / .035) 0 1px, transparent 1px 92px),
    linear-gradient(90deg, var(--xtl-charcoal) 34%, rgb(15 17 21 / .75) 46%, rgb(15 17 21 / 0) 70%),
    linear-gradient(0deg, var(--xtl-charcoal) 0%, rgb(15 17 21 / 0) 30%); }
  .hero-body { padding-block: 6rem 3rem; }
}

/* observation band, full width at every size, NO zoom (R1.10: phones included).
   The frame is as wide as the photo and shorter than it; the photo (2120 × 742) is drawn at exactly the page width
   and only travels through the vertical overscan. Keep the ratios in sync with 'band' w/h in content/media.php.
   Phones: 30 % overscan (≈105 px strip at 390 px, ±16 px drift) so the movement is perceptible.
   ≥ 768 px: 12 % overscan (450 px tall at 1440). --travel = drift as a % of the photo's height. */
.observation { display: block; position: relative; margin-block-start: 0; overflow: clip; background: var(--xtl-charcoal); --travel: 11.54%; }
/* overflow: clip (not hidden) so these are not scroll containers, the view() timelines need the page scroller */
.observation picture { position: relative; aspect-ratio: 2120 / 570.8; overflow: clip; }
.observation picture img { position: absolute; inset-inline: 0; top: -15%; width: 100%; height: auto; }
@media (min-width: 768px) {
  .observation { --travel: 5.36%; }
  .observation picture { aspect-ratio: 2120 / 662.5; }
  .observation picture img { top: -6%; }
}

/* ---------- thesis ---------- */
.thesis { background: repeating-linear-gradient(135deg, rgb(15 17 21 / .06) 0 1px, transparent 1px 92px) var(--xtl-orange); color: var(--xtl-charcoal); padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.thesis-grid { display: grid; gap: 1.75rem; }
.thesis .statement .line { display: block; }
.thesis-belief { max-width: 30rem; font-size: var(--fs-body); line-height: 1.55; }
.thesis-lead { font-weight: 600; }
@media (min-width: 1024px) {
  .thesis-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; }
  .thesis .statement { grid-column: 1 / 10; }
  .thesis-belief { grid-column: 10 / 13; padding-block-end: .35rem; }
}

/* ---------- about (R1.5: heading across the top; image and text share one top line) ---------- */
.about { display: grid; gap: 2rem; }
.about-head .label { margin-block-end: 1rem; }
.about-head .h2 { max-width: 18ch; }
.about-body { display: grid; gap: 1.1rem; max-width: 40rem; align-content: start; }
.about-body > .lead { font-size: var(--fs-lead); }
.roles { display: grid; gap: .55rem; margin-block: .75rem .25rem; padding-block: .25rem; padding-inline-start: 1.25rem; border-inline-start: 2px solid var(--xtl-orange); }
.roles li { font: 400 var(--fs-lead)/1.4 var(--f-display); letter-spacing: -.01em; color: var(--ink-muted); }
.roles strong { font-weight: 600; color: var(--ink); }
.about-img { max-width: 34rem; }
.about-img picture, .about-img img { width: 100%; }
.about-img img { aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: 55% 40%; }
.vm { display: grid; gap: 2rem; padding-block-start: 2rem; border-block-start: 1px solid var(--line); }
.vm .label { margin-block-end: .6rem; }
.vm-text { font: 400 var(--fs-h3)/1.3 var(--f-display); letter-spacing: -.01em; }
@media (min-width: 1024px) {
  .about { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); row-gap: clamp(2.5rem, 4vw, 3.5rem); }
  .about-head { grid-column: 1 / 10; grid-row: 1; }
  .about-head .h2 { max-width: none; }
  /* desktop: the image fills exactly the height of the text column, so both columns start and end together */
  .about-img { grid-column: 1 / 6; grid-row: 2; max-width: none; align-self: stretch; position: relative; min-height: 22rem; }
  .about-img picture { position: absolute; inset: 0; }
  .about-img img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-position: 55% 40%; }
  .about-img .is-placeholder::after { z-index: 1; }
  .about-body { grid-column: 7 / 13; grid-row: 2; max-width: 38rem; align-self: start; }
  .vm { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; column-gap: var(--gap); }
  .vm > div + div { border-inline-start: 1px solid var(--line); padding-inline-start: var(--gap); }
}

/* ---------- approach / method ---------- */
.approach { border-block-start: 1px solid var(--line); }
.approach-head { display: grid; gap: 1.25rem; margin-block-end: clamp(2.5rem, 5vw, 4rem); }
.approach-title { font-size: var(--fs-statement); line-height: 1; letter-spacing: -.035em; }
.stage { display: grid; gap: 1.25rem; padding-block: 2rem; border-block-start: 1px solid var(--line-strong); }
.stage-text { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: baseline; }
.stage-text p { grid-column: 1 / -1; margin-block-start: .5rem; max-width: 30rem; font-size: var(--fs-lead); line-height: 1.5; }
.numeral { font: 300 var(--fs-numeral)/.9 var(--f-display); letter-spacing: -.04em; color: var(--ink-muted); }
.stage-name { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -.025em; }
.method-frame[hidden] { display: none; }
.bridge { margin-block-start: clamp(3rem, 6vw, 5rem); padding-inline-end: max(var(--pad-r), 20%);
  font: 500 var(--fs-h2)/1.08 var(--f-display); letter-spacing: -.025em; text-wrap: balance; }
@media (min-width: 1024px) {
  .approach-head { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; }
  .approach-title { grid-column: 1 / 8; }
  .approach-head .lead { grid-column: 8 / 13; }
}
/* enhanced desktop (main.js adds .is-live): one persistent frame beside a compact text sequence */
.method.is-live { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: start; }
.method.is-live .stages { grid-column: 1 / 6; grid-row: 1; }
.method.is-live .stage { display: block; min-height: 46vh; padding-block: 2rem 0; border-block-start-color: var(--line); position: relative; }
.method.is-live .stage:first-child { border-block-start-color: var(--line-strong); }
.method.is-live .stage:last-child { min-height: 0; padding-block-end: 2rem; }
.method.is-live .stage::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: -1px; width: 3rem; height: 3px; background: var(--xtl-orange); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-std); }
.method.is-live .stage.is-active::before { transform: scaleX(1); }
.method.is-live .numeral { transition: color .3s var(--ease-std); }
.method.is-live .stage.is-active .numeral { color: var(--ink); }
.method.is-live .stage-text { grid-template-columns: 1fr; }
.method.is-live .numeral { margin-block-end: .75rem; }
.method.is-live .method-frame { display: block; grid-column: 6 / 13; grid-row: 1; position: sticky; top: calc(var(--header-h) + 2rem); }
.frame-media { position: relative; aspect-ratio: 5 / 4; max-height: calc(100vh - var(--header-h) - 7rem); width: 100%; overflow: hidden; background: var(--xtl-gray); }
.frame-media .stage-fig { position: absolute; inset: 0; opacity: 0; transition: opacity .36s var(--ease-std); }
.frame-media .stage-fig.is-active { opacity: 1; }
.frame-media picture, .frame-media img { width: 100%; height: 100%; object-fit: cover; }
.frame-meta { display: flex; gap: .75rem; align-items: baseline; padding-block-start: .75rem; font: 500 var(--fs-small)/1 var(--f-body); }
.frame-count { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.frame-thread { position: absolute; inset-inline-start: -1rem; inset-block-start: 0; width: 1px; height: calc(100% - 2.25rem); background: var(--line); }
.frame-thread span { position: absolute; inset-block: 0; inset-inline-start: -1px; width: 3px; background: var(--xtl-orange); transform: scaleY(var(--progress, .2)); transform-origin: top; transition: transform .3s var(--ease-std); }

/* ---------- LINK (dark field: the resolved thing) ---------- */
.dark { background: var(--grain) var(--xtl-charcoal); color: var(--xtl-offwhite); --line: #2E3138; --line-strong: var(--xtl-offwhite); --ink-muted: #A3A7AE; }
.dark .muted, .dark .label { color: #A3A7AE; }
/* ---------- projects (R1.17): a framed project card instead of a giant title + full-bleed photo ---------- */
.venture-top { display: grid; gap: 1rem; margin-block-end: clamp(2rem, 4vw, 3.25rem); }
.status { display: inline-flex; align-items: center; gap: .6rem; justify-self: start; padding: .5rem .75rem; border: 1px solid var(--line-strong); font: 500 var(--fs-small)/1 var(--f-body); }
.status-dot { width: 10px; height: 10px; background: var(--xtl-orange); }
.project { display: grid; background: rgb(255 255 255 / .025); border: 1px solid rgb(255 255 255 / .1); }
.project-media { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: #1A1D22; }
.project-media picture, .project-media img { display: block; width: 100%; height: 100%; }
.project-media img { object-fit: cover; transition: transform .8s var(--ease-out); }
.project-media .status { position: absolute; top: 1rem; left: 1rem; background: rgb(15 17 21 / .78); border-color: rgb(255 255 255 / .22); backdrop-filter: blur(6px); color: var(--xtl-offwhite); }
.project-info { display: grid; align-content: center; justify-items: start; gap: .9rem; padding: clamp(1.5rem, 3.5vw, 3rem); }
.project-name { font: 500 clamp(2.5rem, 1.8rem + 2.6vw, 4rem)/1 var(--f-display); letter-spacing: -.04em; }
.project-cat { font: 500 var(--fs-h3)/1.25 var(--f-display); letter-spacing: -.015em; color: var(--xtl-offwhite); max-width: 24ch; text-wrap: balance; }
.project-desc { color: #A9AEB6; max-width: 36rem; }
.facts { display: grid; width: 100%; margin-block-start: .75rem; }
.facts > div { display: grid; gap: .25rem; padding-block: .85rem; border-block-start: 1px solid var(--line); }
.facts dt { font: 500 .8125rem/1.45 var(--f-body); color: #A3A7AE; }
.facts dd { font-size: .9375rem; }
.venture-concept { margin-block-start: clamp(2.5rem, 5vw, 4rem); padding-inline-start: 1.25rem; border-inline-start: 3px solid var(--xtl-orange);
  font: 500 clamp(1.375rem, 1.1rem + 1.2vw, 2.125rem)/1.25 var(--f-display); letter-spacing: -.02em; max-width: 34ch; text-wrap: balance; }
@media (hover: hover) { .project:hover .project-media img { transform: scale(1.025); } }
@media (min-width: 640px) { .facts > div { grid-template-columns: 9.5rem 1fr; gap: 1rem; } }
@media (min-width: 1024px) {
  .venture-top { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; }
  .venture-top .kicker { grid-column: 1 / -1; }
  .venture-top h2 { grid-column: 1 / 8; }
  .project { grid-template-columns: 1.08fr 1fr; }
  .project-media { aspect-ratio: auto; min-height: 100%; }
}

/* ---------- capabilities: a compact flowing index ---------- */
.capabilities { background: var(--xtl-gray); --ink-muted: #4A4E55; } /* 7.0:1 on #E5E7EB */
.cap-grid { display: grid; gap: 2.5rem; }
.cap-head { display: grid; gap: 1rem; align-content: start; }
.cap-intro { color: var(--ink-muted); }
.cap-groups { display: grid; gap: 1.75rem; }
.cap-group { padding-block-start: 1rem; border-block-start: 1px solid var(--line-strong); }
.cap-group .label { margin-block-end: .5rem; }
.flow { display: flex; flex-wrap: wrap; font: 500 var(--fs-h3)/1.35 var(--f-display); letter-spacing: -.015em; }
.flow li:not(:last-child)::after { content: "/"; content: "/" / ""; color: #6B7078; margin-inline: .45em; font-weight: 300; }
@media (min-width: 1024px) {
  .cap-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
  .cap-head { grid-column: 1 / 5; }
  .cap-groups { grid-column: 6 / 13; }
}

/* ---------- team: people first ---------- */
/* charcoal field: the human section reads as its own moment after the grey capability index */
.team { border-block-start: 0; }
.team + .contact { border-block-start: 0; }
.team-img { margin-block: calc(var(--section) * -1) var(--section); }
.team-head { display: grid; gap: 1rem; margin-block-end: clamp(2.5rem, 5vw, 4rem); }
/* people as cards (R1.20): monogram, name on one line, role, responsibility, focus tags.
   Each card spans 4 subgrid rows so names, roles, descriptions and tags line up across a row. */
.people { display: grid; gap: var(--gap); }
.person { display: grid; gap: 1.1rem; align-content: start; padding: clamp(1.5rem, 2.4vw, 2rem);
  background: rgb(255 255 255 / .025); border: 1px solid rgb(255 255 255 / .1); transition: border-color .25s, background-color .25s; }
.person-top { display: flex; align-items: center; justify-content: space-between; }
.person-mono { display: inline-grid; place-items: center; width: 3.25rem; height: 3.25rem; border: 1px solid rgb(255 106 0 / .55);
  font: 600 1.0625rem/1 var(--f-display); letter-spacing: .02em; color: var(--xtl-orange); transition: background-color .25s, color .25s; }
.person-mono .icon { width: 1.5rem; height: 1.5rem; }
.person-index { font: 500 .8125rem/1 var(--f-body); color: #6B7078; font-variant-numeric: tabular-nums; }
.person-id { display: grid; gap: .45rem; align-content: start; }
.person-name { font-size: clamp(1.75rem, 1.35rem + 1vw, 2.25rem); line-height: 1.05; letter-spacing: -.03em; }
.person-name .first-name { color: var(--xtl-orange); } /* user request (R1.3); orange on charcoal 6.58:1 */
.person-role { font: 500 .875rem/1.4 var(--f-body); color: #B9BDC4; }
.person-does { font-size: 1rem; line-height: 1.6; color: #E5E7EB; padding-block-start: 1.1rem; border-block-start: 1px solid rgb(255 255 255 / .1); }
.person-focus ul { display: flex; flex-wrap: wrap; gap: .4rem; }
.person-focus li { padding: .3rem .6rem; border: 1px solid rgb(255 255 255 / .14); font: 500 .75rem/1.3 var(--f-body); color: #A9AEB6; }
@media (hover: hover) {
  .person:hover { border-color: rgb(255 106 0 / .45); background: rgb(255 255 255 / .04); }
  .person:hover .person-mono { background: var(--xtl-orange); color: var(--xtl-charcoal); }
}
/* layout (user request R1.22): CEO alone in row 1, the two co-founders in row 2, the three team members in row 3.
   Cards span 4 subgrid rows so icon, name, role, description and tags line up across a row. */
@media (min-width: 768px) {
  .people { grid-template-columns: repeat(2, 1fr); }
  .person { grid-row: span 4; grid-template-rows: subgrid; }
  .person:first-child { grid-column: 1 / -1; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .person:last-child:nth-child(even) { grid-column: 1 / -1; } /* tablet: no empty cell beside the last card */
}
@media (min-width: 1200px) {
  .people { grid-template-columns: repeat(6, 1fr); }
  .person { grid-column: span 2; }
  .person:nth-child(2), .person:nth-child(3) { grid-column: span 3; }
  /* CEO card (R1.23): one top-aligned line: icon | name + role | responsibility with focus tags below;
     the index sits in the top-right corner */
  .person:first-child { position: relative; grid-column: 1 / -1; grid-row: auto; grid-template-rows: auto auto;
    grid-template-columns: auto minmax(0, .85fr) minmax(0, 1.25fr); grid-template-areas: "top id does" "top id focus";
    column-gap: clamp(1.5rem, 3vw, 2.75rem); row-gap: 0; align-items: start; padding-block: 2.25rem; }
  .person:first-child .person-top { grid-area: top; }
  .person:first-child .person-index { position: absolute; top: 2.25rem; right: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; }
  .person:first-child .person-id { grid-area: id; padding-block-start: .3rem; }
  .person:first-child .person-does { grid-area: does; border-block-start: 0; padding: .15rem 3rem 0 clamp(1.5rem, 3vw, 2.75rem);
    border-inline-start: 1px solid rgb(255 255 255 / .1); font-size: 1.0625rem; line-height: 1.6; }
  .person:first-child .person-focus { grid-area: focus; padding-block-start: 1.1rem; padding-inline-start: clamp(1.5rem, 3vw, 2.75rem); border-inline-start: 1px solid rgb(255 255 255 / .1); }
}
@media (min-width: 1024px) {
  .team-head { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; }
  .team-head .h2 { grid-column: 1 / 7; }
  .team-head .lead { grid-column: 8 / 13; }
}

/* ---------- closing: the question resolves ---------- */
.contact { border-block-start: 1px solid var(--line); }
.contact-grid { display: grid; gap: 2.25rem; }
.resolve { position: relative; height: 56px; width: 56px; margin-inline-start: -28px; }
.resolve::before, .resolve::after { content: ""; position: absolute; background: var(--line-strong); }
.resolve::before { inset-inline: 0; top: 28px; height: 1px; transform-origin: left; }
.resolve::after { inset-block: 0; left: 28px; width: 1px; transform-origin: top; }
.contact-q { max-width: 11ch; margin-block-start: -1.5rem; }
.contact-body { display: grid; gap: 1.25rem; max-width: 38rem; justify-items: start; }
@media (min-width: 1024px) {
  /* the invitation sits beside the resolved question, closing the page as one block */
  .contact-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; }
  .resolve { grid-column: 1 / -1; }
  .contact-q { grid-column: 1 / 9; max-width: none; }
  .contact-body { grid-column: 9 / 13; padding-block-end: .5rem; }
}
/* ---------- icons (Lucide, ISC, inlined, decorative) ---------- */
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }
.with-icon { display: inline-flex; align-items: center; gap: .5rem; }
.with-icon .icon { color: var(--ink-muted); }
.dark .with-icon .icon { color: #A3A7AE; }
.btn-icon { gap: .6rem; }
.btn-icon .icon { width: 1.15em; height: 1.15em; }
.stage-icon { display: none; }
.stage-icon .icon { width: 1.75rem; height: 1.75rem; color: var(--ink-muted); }
.stage-text { position: relative; }
@media (min-width: 480px) { .stage-icon { display: block; position: absolute; inset-inline-end: 0; top: .25rem; } }
.method.is-live .stage.is-active .stage-icon .icon { color: var(--xtl-orange); }
.facts dt.with-icon .icon { width: 1.1rem; height: 1.1rem; }

/* ---------- contact modal (R1.11, redesigned R1.13) ---------- */
.contact-open-wrap { margin-block-start: .5rem; }
html:not(.js) .contact-open-wrap { display: none; }
.contact-dialog { padding: 0; border: 0; color: var(--ink); background: transparent; max-width: none; max-height: none; overflow: visible; }
.contact-dialog::backdrop { background: rgb(15 17 21 / .66); backdrop-filter: blur(3px); }
.cd-panel { position: relative; display: grid; background: var(--bg); width: 100%; max-height: inherit; overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 30px 80px -20px rgb(15 17 21 / .45); }

/* left: charcoal context column (compact header on small screens) */
.cd-aside { position: relative; display: grid; align-content: start; gap: .75rem; background: var(--xtl-charcoal); color: var(--xtl-offwhite);
  padding: 1.5rem 4.5rem 1.5rem 1.5rem; overflow: hidden; }
.cd-aside::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--xtl-orange); }
.cd-kicker { display: inline-flex; align-items: center; gap: .6rem; font: 500 .8125rem/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: #B9BDC4; }
.cd-kicker::before { content: ""; width: 1.5rem; height: 1px; background: var(--xtl-orange); }
.cd-title { font: 500 clamp(1.625rem, 1.3rem + 1.4vw, 2.375rem)/1.08 var(--f-display); letter-spacing: -.025em; outline: 0; }
.cd-intro { color: #C9CDD3; font-size: .9375rem; line-height: 1.55; max-width: 30rem; }
.cd-topics, .cd-place { display: none; }

/* close: quiet square, light on the charcoal header (small screens) */
.cd-close { position: absolute; z-index: 2; top: .75rem; right: .75rem; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid rgb(255 255 255 / .22); background: transparent; color: var(--xtl-offwhite); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.cd-close:hover { background: var(--xtl-offwhite); color: var(--xtl-charcoal); border-color: var(--xtl-offwhite); }
.cd-close .icon { width: 20px; height: 20px; }

/* right: form */
.cd-main { display: grid; padding: 1.5rem; }
.contact-form { display: grid; gap: 1.5rem; align-content: start; }
.cd-fields { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .cd-fields { grid-template-columns: 1fr 1fr; column-gap: 1rem; } .field-name, .field-message { grid-column: 1 / -1; } }
.field { display: grid; gap: .45rem; align-content: start; }
.field label { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; font: 500 .875rem/1.3 var(--f-body); color: var(--ink); }
.cd-opt { font-weight: 400; font-size: .8125rem; color: var(--ink-muted); }
.cd-control { position: relative; display: block; }
.cd-control > .icon { position: absolute; left: .9rem; top: .95rem; width: 1.125rem; height: 1.125rem; color: #6B7078; pointer-events: none; transition: color .15s; }
.field input, .field textarea { display: block; width: 100%; min-height: 50px; padding: .8rem .9rem .8rem 2.75rem; font: 400 1rem/1.4 var(--f-body); color: var(--ink);
  background: #fff; border: 1px solid #8A8F96; border-radius: 0; box-shadow: 0 1px 0 rgb(15 17 21 / .03); transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 9.5rem; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: #8A8F96; }
.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field textarea:focus-visible { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(255 106 0 / .35); }
.cd-control:focus-within > .icon { color: var(--xtl-orange); }
.field [aria-invalid="true"] { border-color: #B42318; box-shadow: inset 0 0 0 1px #B42318; }
.field-meta { display: flex; justify-content: space-between; gap: 1rem; min-height: 0; }
.field-meta:has(.field-error:empty):not(:has(.cd-count)) { display: none; }
/* provider credit inside the CAPTCHA box, bottom-right (user requests R1.26–R1.28): "Secured by SynapseCyber", 9px;
   only the name is a link, with a 24px-tall target (WCAG 2.5.8); hover turns it SynapseCyber blue (#3A6BE4, 4.8:1 on white) */
.cd-captcha-box { position: relative; }
.cd-powered { position: absolute; right: 12px; bottom: 10px; z-index: 1; display: inline-flex; align-items: center; gap: .25em;
  font: 500 9px/1 var(--f-body); letter-spacing: .02em; color: #6B7078; white-space: nowrap; }
.cd-powered a { display: inline-flex; align-items: center; min-height: 24px; margin-block: -7.5px; color: inherit; font-weight: 600; text-decoration: none;
  transition: color .15s; }
.cd-powered a:hover, .cd-powered a:focus-visible { color: #3A6BE4; text-decoration: none; }
.field-error { color: #B42318; font-size: .8125rem; line-height: 1.4; }
/* SynapseCyber verification widget (R1.25): themed through its CSS variables to match the fields */
.field-captcha { display: grid; gap: .45rem; align-content: start; }
.cd-captcha-label { font: 500 .875rem/1.3 var(--f-body); color: var(--ink); }
.cd-captcha { display: flex; align-items: center; min-height: 58px; font-size: .875rem; color: var(--ink-muted); outline: 0; }
.cd-captcha.is-failed { color: #B42318; }
html:not(.js) .js-only { display: none; }
cap-widget { display: block; width: 100%;
  --cap-widget-width: 100%; --cap-widget-height: 58px; --cap-widget-padding: 14px; --cap-gap: 12px;
  --cap-background: #fff; --cap-border-color: #8A8F96; --cap-border-radius: 0; --cap-color: var(--ink); --cap-font: var(--f-body);
  --cap-checkbox-size: 24px; --cap-checkbox-border: 1px solid #8A8F96; --cap-checkbox-border-radius: 0; --cap-checkbox-background: #fff; --cap-checkbox-margin: 2px;
  --cap-spinner-color: var(--xtl-orange); --cap-spinner-background-color: var(--xtl-gray); --cap-spinner-thickness: 2px;
  --cap-focus-ring: rgb(255 106 0 / .35); --cap-invalid-border-color: #B42318; --cap-invalid-ring-color: rgb(180 35 24 / .25); }
.cd-captcha.is-invalid cap-widget { --cap-border-color: #B42318; }
.cd-count { margin-inline-start: auto; font: 400 .75rem/1.4 var(--f-body); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.error-summary { border-inline-start: 3px solid #B42318; background: #FEF3F2; padding: .9rem 1.1rem; font-size: .9375rem; }
.error-summary ul { list-style: disc; padding-inline-start: 1.25rem; }
.error-summary a { color: #B42318; }
.form-status:empty { display: none; }
.form-status p { display: flex; gap: .6rem; align-items: flex-start; padding: .85rem 1rem; border-inline-start: 3px solid #B42318; background: #FEF3F2; color: #912018; font-size: .9375rem; }
.form-status .icon { flex: none; width: 1.1rem; height: 1.1rem; margin-block-start: .15rem; }
.cd-actions { display: flex; justify-content: flex-end; padding-block-start: .25rem; }
.cd-submit { min-width: 13rem; min-height: 52px; gap: .75rem; }
.cd-submit .icon { transition: transform .2s var(--ease-out); }
.cd-submit:hover .icon:not(.spin) { transform: translateX(3px); }
.cd-submit .spin { display: none; }
.cd-submit[aria-busy="true"] .spin { display: block; }
.cd-submit[aria-busy="true"] .icon:not(.spin) { display: none; }
@media (prefers-reduced-motion: no-preference) { .spin { animation: spin .9s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-dark { background: var(--xtl-charcoal); color: var(--xtl-offwhite); }
@media (hover: hover) { .btn-dark:hover { background: var(--xtl-orange); color: var(--xtl-charcoal); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* success: replaces the form inside the same column */
.cd-success { display: grid; justify-items: center; align-content: center; text-align: center; gap: .6rem; padding: 2rem 0 1rem; min-height: 22rem; }
.cd-success[hidden], .contact-form[hidden], .cd-success-from[hidden] { display: none; }
.cd-check { width: 4.5rem; height: 4.5rem; margin-block-end: .75rem; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cd-check circle { stroke: var(--xtl-orange); stroke-width: 2; fill: rgb(255 106 0 / .08); }
.cd-check path { stroke: var(--xtl-orange); stroke-width: 3; }
.cd-success-title { font: 500 clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem)/1.1 var(--f-display); letter-spacing: -.02em; outline: 0; }
.cd-success-text { color: var(--ink-muted); max-width: 26rem; text-wrap: balance; }
.cd-success-from { font-size: .9375rem; color: var(--ink-muted); }
.cd-success-from strong { color: var(--ink); font-weight: 500; word-break: break-all; }
.cd-success-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem 1.5rem; margin-block-start: 1.25rem; }
.cd-link { min-height: 44px; padding: 0 .25rem; border: 0; background: none; color: var(--ink); font: 500 1rem/1 var(--f-body); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: .3em; cursor: pointer; }
.cd-link:hover { text-decoration-color: var(--xtl-orange); text-decoration-thickness: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .cd-success:not([hidden]) > * { animation: cd-rise .45s var(--ease-out) both; }
  .cd-success:not([hidden]) > :nth-child(2) { animation-delay: .25s; }
  .cd-success:not([hidden]) > :nth-child(3) { animation-delay: .32s; }
  .cd-success:not([hidden]) > :nth-child(4) { animation-delay: .38s; }
  .cd-success:not([hidden]) > :nth-child(5) { animation-delay: .44s; }
  .cd-success:not([hidden]) .cd-check circle { stroke-dasharray: 151; animation: cd-draw .6s var(--ease-out) both; }
  .cd-success:not([hidden]) .cd-check path { stroke-dasharray: 36; animation: cd-draw .35s var(--ease-out) .45s both; }
}
@keyframes cd-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cd-draw { from { stroke-dashoffset: var(--len, 151); } to { stroke-dashoffset: 0; } }
.cd-check path { --len: 36; }

/* tablet+ : centred panel; desktop: two columns with the context column on the left */
.js .contact-dialog[open] { position: fixed; margin: auto; inset: 0; width: min(62rem, calc(100vw - 2rem)); max-height: calc(100dvh - 3rem); display: flex; }
@media (min-width: 640px) {
  .cd-aside { padding: 2rem 5rem 2rem 2.25rem; }
  .cd-main { padding: 2rem 2.25rem 2.25rem; }
}
@media (min-width: 900px) {
  .cd-panel { grid-template-columns: minmax(17rem, 21rem) 1fr; min-height: min(37rem, calc(100dvh - 3rem)); }
  .cd-aside { padding: 2.75rem 2.25rem 2.25rem; gap: 1rem; grid-template-rows: auto auto auto auto 1fr; }
  .cd-aside::after { inset: 0 auto 0 0; width: 3px; height: auto; }
  .cd-intro { font-size: 1rem; }
  .cd-topics { display: grid; gap: .1rem; margin-block-start: 1.25rem; border-block-start: 1px solid rgb(255 255 255 / .14); }
  .cd-topics li { display: flex; align-items: center; gap: .75rem; padding-block: .8rem; border-block-end: 1px solid rgb(255 255 255 / .14); font-size: .9375rem; color: #E5E7EB; }
  .cd-topics .icon { flex: none; width: 1.125rem; height: 1.125rem; color: var(--xtl-orange); }
  .cd-place { display: flex; align-items: center; gap: .5rem; align-self: end; margin-block-start: 2rem; font-size: .8125rem; color: #A9AEB6; }
  .cd-place .icon { width: 1rem; height: 1rem; }
  .cd-main { padding: 2.75rem 2.75rem 2.5rem; }
  .cd-close { top: 1rem; right: 1rem; border-color: var(--line); color: var(--ink); }
  .cd-close:hover { background: var(--xtl-charcoal); color: var(--xtl-offwhite); border-color: var(--xtl-charcoal); }
  .contact-form { padding-block-start: 1.5rem; }
}
/* phones: bottom sheet (internal scroll, safe area, dynamic viewport units) */
@media (max-width: 639px) {
  .js .contact-dialog[open] { margin: auto 0 0; width: 100%; max-height: 92dvh; }
  .cd-panel { padding-block-end: env(safe-area-inset-bottom); }
  .cd-aside { padding-block-start: 1.75rem; }
  .cd-actions .btn, .cd-success-actions .btn { width: 100%; }
}
/* without JavaScript: the same form, inline in the contact section */
html:not(.js) .contact-dialog { display: block; position: static; width: 100%; margin-block-start: 1rem; }
html:not(.js) .cd-close, html:not(.js) .cd-success-actions, html:not(.js) .cd-place { display: none; }
@media (min-width: 1024px) {
  html:not(.js) .contact-grid { align-items: start; }
  html:not(.js) .contact-q { grid-column: 1 / 11; }
  html:not(.js) .contact-body { grid-column: 1 / 9; max-width: 46rem; }
}

/* ---------- footer ---------- */
/* charcoal footer (R1.5): white logo variant, off-white text, muted #A3A7AE (7.82:1) */
.site-footer { padding-block: clamp(3.5rem, 6vw, 5rem) max(2.5rem, env(safe-area-inset-bottom)); }
.site-footer .footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line); }
.site-version { font-size: .75rem; letter-spacing: .04em; color: #8A8F96; font-variant-numeric: tabular-nums; } /* 5.6:1 on charcoal */
.site-footer a:hover { color: var(--xtl-orange); }
.footer-grid { display: grid; gap: 1.5rem; }
.footer-tagline { font: 500 var(--fs-h3)/1.2 var(--f-display); letter-spacing: -.015em; }
.footer-nav, .footer-channels { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.footer-nav a, .footer-channels a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-small); }
.footer-id, .footer-legal { font-size: var(--fs-small); color: var(--ink-muted); }
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: start; }
  .footer-grid > .logo { grid-column: 1 / 4; }
  .footer-id { grid-column: 10 / 13; }
  .footer-tagline { grid-column: 1 / 9; }
  .footer-grid > nav, .footer-channels, .footer-legal { grid-column: 1 / -1; }
}

/* ---------- 404 ---------- */
.notfound { padding-block: var(--section); display: grid; gap: 1.5rem; justify-items: start; }

/* =====================================================================
   MOTION (REFINEMENT_R1 §4). Optional polish only: the page is complete
   without it, without JS, and with reduced motion.
   ===================================================================== */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .06em .14em; margin-block: -.06em -.14em; padding-inline: .03em; margin-inline: -.03em; }
.w > span { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  /* enabled by main.js after load, so the browser's initial jump to a #fragment is instant */
  html.smooth { scroll-behavior: smooth; }

  /* converge, hero question on load (pure CSS, no script dependency) */
  .hero-q .w > span { animation: converge .64s var(--ease-out) both; }
  .hero-q .w:nth-child(odd) > span { --from: -22px; }
  .hero-q .w:nth-child(even) > span { --from: 22px; }
  .hero-q .w:nth-child(2) > span { animation-delay: 45ms; }
  .hero-q .w:nth-child(3) > span { animation-delay: 90ms; }
  .hero-q .w:nth-child(4) > span { animation-delay: 135ms; }
  .hero-q .w:nth-child(5) > span { animation-delay: 180ms; }
  .hero-q .w:nth-child(6) > span { animation-delay: 225ms; }
  .hero-q .w:nth-child(7) > span { animation-delay: 270ms; }
  .hero-rail::before { animation: thread 3.6s cubic-bezier(.45,0,.25,1) .5s both; }
  .hero-rail li { animation: rail-on .35s ease-out both; }
  .hero-rail li:nth-child(1) { animation-delay: .6s; }
  .hero-rail li:nth-child(2) { animation-delay: 1.35s; }
  .hero-rail li:nth-child(3) { animation-delay: 2.1s; }
  .hero-rail li:nth-child(4) { animation-delay: 2.85s; }
  .hero-rail li:nth-child(5) { animation-delay: 3.6s; }
  .hero-copy, .hero-kicker { animation: rise .7s var(--ease-out) .35s both; }

  /* armed by main.js only for elements below the fold at load; .in plays them once */
  .is-armed.converge .w > span { opacity: 0; }
  .is-armed.converge.in .w > span { animation: converge .6s var(--ease-out) both; }
  .is-armed.converge .w:nth-child(odd) > span { --from: -18px; }
  .is-armed.converge .w:nth-child(even) > span { --from: 18px; }
  .is-armed.converge.in .w:nth-child(2) > span { animation-delay: 40ms; }
  .is-armed.converge.in .w:nth-child(3) > span { animation-delay: 80ms; }
  .is-armed.converge.in .w:nth-child(4) > span { animation-delay: 120ms; }
  .is-armed.converge.in .w:nth-child(5) > span { animation-delay: 160ms; }
  .is-armed.converge.in .w:nth-child(6) > span { animation-delay: 200ms; }
  .is-armed.converge.in .w:nth-child(7) > span { animation-delay: 240ms; }
  .is-armed.converge.in .w:nth-child(8) > span { animation-delay: 280ms; }
  .is-armed.converge.in .w:nth-child(9) > span { animation-delay: 320ms; }

  .is-armed.meet .line { opacity: 0; }
  .is-armed.meet.in .line:first-child { --from: -28px; animation: converge .68s var(--ease-out) both; }
  .is-armed.meet.in .line:last-child { --from: 28px; animation: converge .68s var(--ease-out) 70ms both; }

  .is-armed.settle .w > span { opacity: 0; }
  .is-armed.settle.in .w > span { --from: -24px; animation: converge .7s var(--ease-out) both; }

  .is-armed.resolve::before, .is-armed.resolve::after { opacity: 0; }
  .is-armed.resolve.in::before { animation: thread .6s var(--ease-dec) both; }
  .is-armed.resolve.in::after { animation: threadY .6s var(--ease-dec) .12s both; }

  /* parallax: transform-only, tied to the band's passage through the viewport (fallback in main.js) */
  @supports (animation-timeline: view()) {
    .observation picture img { animation: parallax linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  }
  /* observation band: an off-white panel slides away (transform only) as the band enters */
  @supports (animation-timeline: view()) {
    .observation::after { content: ""; position: absolute; inset: 0 42% 0 0; background: var(--xtl-charcoal);
      animation: uncover linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
  }
}
/* "in development" pulse: 2 slow fades (4.8 s, under the WCAG 2.2.2 five-second limit), then solid;
   replays when the signpost is hovered/focused and when LINK's name settles into view */
@media (prefers-reduced-motion: no-preference) {
  .hero-now .status-dot { animation: pulse 2.4s ease-in-out .9s 2; }
  .hero-now:hover .status-dot, .hero-now:focus-visible .status-dot { animation: pulse-again 2.4s ease-in-out 2; }
  .project:has(.project-name.in) .status-dot { animation: pulse 2.4s ease-in-out .5s 2; }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes pulse-again { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes converge { from { opacity: 0; transform: translateX(var(--from, -22px)); } to { opacity: 1; transform: none; } }
@keyframes rail-on { from { color: #6B7078; } to { color: var(--xtl-offwhite); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes thread { from { opacity: 1; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
@keyframes threadY { from { opacity: 1; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }
@keyframes parallax { from { transform: translateY(calc(-1 * var(--travel))); } to { transform: translateY(var(--travel)); } }
@keyframes uncover { from { transform: translateX(0); } to { transform: translateX(-101%); } }

@media (prefers-reduced-motion: reduce) {
  .is-armed .w > span, .is-armed .line, .is-armed::before, .is-armed::after { opacity: 1 !important; transform: none !important; animation: none !important; }
  .menu-glyph span, .frame-media .stage-fig, .frame-thread span, .method.is-live .stage::before, .site-nav ul a::after { transition: none !important; }
}
