/* NOCTIS Interactive — night-shift timing board.
   Direction: "Type and nothing else" (Anton / Work Sans), graphite palette with frosted glass. */

:root {
  --bg: #0e0f11;
  --surface: #17191c;
  --surface-2: #25282c;
  --ink: #f2f3f4;
  --muted: #a0a5ab;
  --accent: #c6f432;
  --accent-ink: #0c1004;
  --accent-hover: #d8ff5c;
  --paper: #d7dadd;
  --paper-ink: #0e0f11;
  --paper-muted: #474c52;
  --field: #2a2d32;
  --field-ink: #f2f3f4;
  --tint: #98a2ae;
  --tint-pct: 100%;
  --layer-dim: .62;
  --glass-fill: rgba(255,255,255,.07);
  --hover-bg: var(--paper);
  --hover-ink: var(--paper-ink);
  --hello-bg: var(--paper);
  --hello-ink: var(--paper-ink);
  --hello-hover: #ffffff;
  --go-bg: var(--accent);
  --go-ink: var(--accent-ink);
  --nav-line: var(--ink);
  --slider-fill: #c9cdd2;
  --result-val: var(--ink);
  --sel-bg: var(--ink);
  --sel-ink: var(--bg);
  --hero-img: url("../img/street-579.jpg");
  --hero-op: .3;
  --hero-y: 60%;
  --tint-c: color-mix(in srgb, var(--tint) var(--tint-pct), transparent);
  --bar-fill: color-mix(in srgb, var(--bg) 72%, transparent);
  --glass-blur: blur(20px) saturate(140%);
  --glass-sheen: linear-gradient(180deg, rgba(255,255,255,.14) 0, rgba(255,255,255,.05) 36%, rgba(255,255,255,.02) 100%);
  --glass-line: rgba(255,255,255,.13);
  --glass-hi: rgba(255,255,255,.26);
  --glass-r: 22px;


  --font-display: "Anton", "Anton Fallback", Impact, "Arial Narrow", sans-serif;
  --font-text: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step-small: 1rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);
  --step-d3: clamp(2rem, 1.2rem + 2.4vw, 3.5rem);
  --step-d2: clamp(2.5rem, 1.1rem + 4.5vw, 5.75rem);
  --step-d1: clamp(2.75rem, 0.4rem + 12.5vw, 12rem);
  --step-clock: clamp(3.5rem, 1rem + 7.2vw, 9rem);

  --m: clamp(1rem, 0.6rem + 1vw, 1.5rem);
  --gutter: clamp(0.75rem, 1.4vw, 1.5rem);
  --bar-h: 56px;
  --section-gap: clamp(96px, 11vw, 200px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
  --stagger: 80ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 8px); background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  timeline-scope: --contact;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-paper :focus-visible, .field--paper :focus-visible, .foot :focus-visible { outline-color: var(--paper-ink); }


.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; font-size: 1px; line-height: 1; letter-spacing: 0;
}
.skip { position: fixed; left: var(--m); top: -80px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 12px 20px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.display { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.88; }

/* ---------- Bar (sticky top) ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--m);
  background: var(--bg);
  color: var(--ink);
}
.js .bar { background: transparent; }
.js .bar--bg { background: var(--bg); }
.bar__mark {
  font-family: var(--font-display); font-size: var(--step-lead); line-height: 1; letter-spacing: -0.01em;
  text-decoration: none; text-transform: uppercase;
  transition: opacity var(--t-ui) var(--ease-out), transform var(--t-ui) var(--ease-out);
}
.js .bar__mark { opacity: 0; transform: translateY(8px); pointer-events: none; }
.js .bar--mark .bar__mark, .js .bar--solid .bar__mark { opacity: 1; transform: none; pointer-events: auto; }
.bar__nav { display: flex; gap: clamp(16px, 2.4vw, 36px); margin-left: auto; font-size: var(--step-small); font-weight: 600; }
.bar__nav a {
  text-decoration: none; padding: 14px 2px; position: relative;
  transition: color var(--t-hover) ease;
}
.bar__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform var(--t-ui) var(--ease-out);
}
.bar__nav a:hover::after, .bar__nav a:focus-visible::after, .bar__nav a[aria-current="true"]::after { transform: scaleX(1); }
.bar__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--surface-2); overflow: clip; }
.bar__progress::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 0 28px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 var(--step-small)/1 var(--font-text); text-decoration: none; border: 0; cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:hover { background: var(--accent-hover); transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(0.97); }

/* ---------- Hero ---------- */
.page { position: relative; z-index: 1; background: var(--bg); }
.hero {
  padding: calc(var(--bar-h) + 28px) var(--m) 40px;
  display: flex; flex-direction: column; gap: 44px;
  view-timeline: --hero block;
}
.hero__top { max-width: 38ch; }
.hero__lead { font-size: max(18px, var(--step-body)); line-height: 1.4; max-width: 36ch; }
.hero__top .button { margin-top: 16px; }
.hero__title { margin: 0; }
.hero__title { container-type: inline-size; overflow-x: clip; }
.mark { display: block; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; white-space: nowrap; margin: 0 0 0 -0.038em; line-height: 0.88; letter-spacing: 0.025em; font-size: 17vw; font-size: calc(100cqw / 2.61); transform-origin: 50% 50%; }
.hero__title .mark { color: var(--ink); }
.hero__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.hero__bottom { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-size: var(--step-small); font-weight: 600; text-align: right; }
.hero__bottom a { text-decoration: none; }
.hero__bottom a + a { margin-left: 20px; }
.hero__bottom a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.hero__bottom span { color: var(--ink); }
.hero__photo { display: none; }

/* ---------- Generic section frame ---------- */
.sec { padding: var(--section-gap) var(--m) 0; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.photo { margin: 0; overflow: clip; }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08) brightness(0.92); }

/* ---------- Intro ---------- */
.intro__row { align-items: end; }
.intro__row h2 { grid-column: 1 / 9; font-size: var(--step-d2); }
.intro__note { grid-column: 8 / 13; max-width: 52ch; font-size: var(--step-body); }
.facts { margin-top: clamp(56px, 7vw, 120px); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.fact__v { font-family: var(--font-display); font-size: var(--step-d3); line-height: 0.95; text-transform: uppercase; letter-spacing: -0.01em; }
.fact__d { margin-top: 12px; font-size: var(--step-small); color: var(--muted); max-width: 32ch; line-height: 1.45; }

/* ---------- Relay clock ---------- */
.relay {
  margin: clamp(56px, 7vw, 120px) calc(-1 * var(--m)) 0;
  padding: clamp(28px, 3.4vw, 56px) var(--m);
  background: var(--surface);
}
.relay__static { font-family: var(--font-display); font-size: var(--step-d3); text-transform: uppercase; line-height: 1; }
.js .relay__static { display: none; }
.relay__live { display: none; }
.js .relay__live { display: grid; }
.relay__live { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 40px; align-items: start; }
.relay__clocks { grid-column: 1 / 8; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); row-gap: 72px; }
.clock__city { font-size: var(--step-body); font-weight: 600; margin-top: 10px; }
.clock__time { font-family: var(--font-display); font-size: var(--step-clock); line-height: 0.95; letter-spacing: -0.01em; margin-top: 4px; }
.clock__meta { font-size: var(--step-small); color: var(--muted); margin-top: 2px; }
.clock--small { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.clock--small .clock__time { font-size: var(--step-d3); margin: 0; }
.clock--small .clock__city { margin: 0; min-width: 9ch; }
.relay__control { grid-column: 8 / 13; display: flex; flex-direction: column; gap: 24px; }
.slider__label { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-weight: 600; font-size: var(--step-body); }
.slider__label output { font-family: var(--font-display); font-size: var(--step-d3); line-height: 1; letter-spacing: -0.01em; }
.slider__label span span { color: var(--muted); font-weight: 400; }
.slider__track { position: relative; height: 48px; margin-top: 12px; --p: 0.9565; }
.slider__rail, .slider__fill { position: absolute; left: 0; top: 18px; height: 12px; border-radius: 6px; }
.slider__rail { right: 0; background: var(--surface-2); }
.slider__fill { background: var(--accent); width: calc(var(--p) * (100% - 40px) + 20px); }
.slider input { position: absolute; inset: 0; width: 100%; height: 48px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.slider input::-webkit-slider-runnable-track { height: 48px; background: transparent; }
.slider input::-moz-range-track { height: 48px; background: transparent; }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 40px; height: 40px; margin-top: 4px; border-radius: 50%; background: var(--paper); border: 0; transition: transform var(--t-press) var(--ease-out); }
.slider input::-moz-range-thumb { width: 40px; height: 40px; border-radius: 50%; background: var(--paper); border: 0; }
.slider input:active::-webkit-slider-thumb { transform: scale(1.12); }
.slider input:focus-visible { outline: none; }
.slider input:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--ink); outline-offset: 3px; }
.slider input:focus-visible::-moz-range-thumb { outline: 3px solid var(--ink); outline-offset: 3px; }
.relay__out { font-size: var(--step-body); margin-top: 14px; }
.relay__out b { font-weight: 600; }
.relay__moment { font-family: var(--font-display); font-size: var(--step-d2); text-transform: uppercase; line-height: 0.9; letter-spacing: -0.01em; }
.relay__day { font-size: var(--step-small); color: var(--muted); margin-top: 8px; }

/* ---------- Statement fields ---------- */
.fields { margin-top: var(--section-gap); }
.field {
  min-height: 76svh; padding: 28px var(--m);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: var(--gutter);
}
.field p { grid-row: 1; grid-column: 8 / 12; font-size: var(--step-body); max-width: 34ch; line-height: 1.45; }
.field h2 { grid-row: 2; grid-column: 1 / -1; align-self: end; font-size: var(--step-d1); }

.field--paper { background: var(--paper); color: var(--paper-ink); }
.field--paper p { grid-column: 2 / 6; }
.field--paper h2 { justify-self: end; text-align: right; }
.field--dark { background: var(--surface); }

/* ---------- Photo band ---------- */
.band { margin: 0; aspect-ratio: 12 / 5; overflow: clip; view-timeline: --band block; }
.band img { width: 100%; height: 118%; object-fit: cover; filter: grayscale(1) contrast(1.08) brightness(0.9); }

/* ---------- Itinerary slip ---------- */
.how__grid { align-items: start; }
.how__text { grid-column: 1 / 6; }
.how__text h2 { font-size: var(--step-d2); }
.how__text p { margin-top: 28px; max-width: 30ch; }
.how__photo { margin-top: clamp(40px, 5vw, 80px); aspect-ratio: 4 / 3; }
.slip {
  grid-column: 7 / 13; justify-self: end; width: min(100%, 480px);
  background: var(--paper); color: var(--paper-ink);
  padding: 32px 28px 52px; font-size: 1rem; font-variant-numeric: tabular-nums;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px),
    97.5% 100%, 95% calc(100% - 14px), 92.5% 100%, 90% calc(100% - 14px), 87.5% 100%, 85% calc(100% - 14px), 82.5% 100%, 80% calc(100% - 14px), 77.5% 100%, 75% calc(100% - 14px), 72.5% 100%, 70% calc(100% - 14px), 67.5% 100%, 65% calc(100% - 14px), 62.5% 100%, 60% calc(100% - 14px), 57.5% 100%, 55% calc(100% - 14px), 52.5% 100%, 50% calc(100% - 14px), 47.5% 100%, 45% calc(100% - 14px), 42.5% 100%, 40% calc(100% - 14px), 37.5% 100%, 35% calc(100% - 14px), 32.5% 100%, 30% calc(100% - 14px), 27.5% 100%, 25% calc(100% - 14px), 22.5% 100%, 20% calc(100% - 14px), 17.5% 100%, 15% calc(100% - 14px), 12.5% 100%, 10% calc(100% - 14px), 7.5% 100%, 5% calc(100% - 14px), 2.5% 100%, 0 calc(100% - 14px));
}
.slip h3 { font-size: var(--step-body); font-weight: 600; margin-top: 28px; }
.slip h3:first-child { margin-top: 0; }
.slip li, .slip__result { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.slip li span:first-child, .slip__result span:first-child { flex: 0 1 auto; }
.slip .dots {
  flex: 1 1 24px; min-width: 24px; height: 4px; align-self: center; margin-top: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='4'%3E%3Ccircle cx='2' cy='2' r='2' fill='%230a0a0a'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-size: 10px 4px;
}
.slip__val { font-weight: 600; white-space: nowrap; }
.slip__result { background: var(--paper-ink); color: var(--paper); height: 44px; align-items: center; margin: 28px -28px 0; padding: 0 28px; font-weight: 600; }
.slip__result .dots { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='4'%3E%3Ccircle cx='2' cy='2' r='2' fill='%23efefef'/%3E%3C/svg%3E"); margin-top: 0; }

/* ---------- About ---------- */
.about { padding-bottom: 0; }
.about__row { display: grid; grid-template-columns: 34% 1fr; column-gap: 0; }
.about__side { display: grid; gap: 20px; align-content: start; padding-right: 32px; }
.about__side dt { font-size: var(--step-small); color: var(--muted); }
.about__side dd { font-size: var(--step-body); font-weight: 600; }
.about__lead { font-size: var(--step-lead); line-height: 1.35; max-width: 56ch; }
.about__pics { margin-top: clamp(48px, 5vw, 88px); display: grid; grid-template-columns: 34% 1fr; }
.about__pics > div { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.about__pics .photo { aspect-ratio: 4 / 3; }
.about__svc { margin-top: clamp(80px, 8vw, 140px); align-items: start; }
.about__svc > h3 { font-size: var(--step-small); font-weight: 600; padding-top: 4px; }
.lists { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 5vw, 72px); row-gap: 40px; max-width: 900px; }
.lists h4 { font-size: var(--step-body); font-weight: 600; margin: 0 0 12px; }
.lists li { display: flex; justify-content: space-between; gap: 20px; padding: 5px 0; font-size: var(--step-body); }
.lists li span:last-child { color: var(--muted); text-align: right; white-space: nowrap; }

/* ---------- Contact ---------- */
.contact { margin-top: var(--section-gap); view-timeline: --contact block; }
.crow {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  min-height: clamp(120px, 11vw, 168px); padding: 30px var(--m) 14px;
  font-family: var(--font-display); font-size: var(--step-d2); line-height: 1; text-transform: uppercase; letter-spacing: -0.005em;
  text-decoration: none; color: var(--ink); background: var(--bg);
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.crow--alt { background: var(--surface); }
a.crow:hover, a.crow:focus-visible { background: var(--accent); color: var(--accent-ink); }
a.crow:focus-visible { outline-offset: -6px; }
.crow > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.crow__photo { flex: none; width: 1.05em; height: 1.05em; border-radius: 50%; overflow: clip; align-self: center; margin-bottom: 0.08em; }
.crow__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08) brightness(0.92); }
.crow--hello { justify-content: flex-start; align-items: center; gap: 0.4em; }
.crow__go {
  width: 0.9em; height: 0.9em; border-radius: 50%;
  display: grid; place-items: center; transition: transform var(--t-ui) var(--ease-out);
}
.crow__go svg { width: 46%; height: 46%; }
a.crow--hello:hover .crow__go { transform: translateX(10px) rotate(-45deg); }
a.crow--hello:hover { background: var(--hello-hover) !important; }

/* ---------- Footer (inverted, sticky reveal) ---------- */
.foot {
  position: sticky; bottom: 0; z-index: 0;
  min-height: 100svh; background: var(--paper); color: var(--paper-ink);
  display: grid; grid-template-rows: auto 1fr auto; padding: 40px var(--m) 20px;
}
.foot__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); font-size: var(--step-body); line-height: 1.5; }
.foot__cols ul { display: grid; }
.foot__cols li:first-child, .foot__cols li:first-child a { font-weight: 600; }
.foot__cols li { color: var(--paper-muted); }
.foot__cols li:first-child { color: var(--paper-ink); }
.foot__cols a { text-decoration: none; }
.foot__cols a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; color: var(--paper-ink); }
.foot__mark { align-self: end; }
.foot__mark svg { width: 100%; height: auto; overflow: visible; color: var(--paper-ink); transform-origin: 50% 100%; }
.foot__legal { margin-top: 20px; font-size: var(--step-small); color: var(--paper-muted); max-width: 90ch; line-height: 1.5; }

/* ---------- Legal and 404 ---------- */
.doc { padding: calc(var(--bar-h) + clamp(48px, 7vw, 120px)) var(--m) var(--section-gap); }
.doc h1 { font-size: var(--step-d1); max-width: 14ch; }
.doc__eff { margin-top: 24px; font-size: var(--step-lead); }
.doc__grid { margin-top: clamp(56px, 7vw, 112px); align-items: start; }
.doc__toc { grid-column: 1 / 4; position: sticky; top: calc(var(--bar-h) + 24px); display: grid; gap: 4px; font-size: var(--step-small); font-weight: 600; }
.doc__toc a { text-decoration: none; padding: 8px 0; color: var(--muted); transition: color var(--t-hover) ease; }
.doc__toc a:hover, .doc__toc a:focus-visible { color: var(--ink); }
.doc__body { grid-column: 5 / 13; justify-self: end; width: 100%; max-width: 72ch; font-size: var(--step-body); line-height: 1.65; }
.doc__body h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.95; font-size: var(--step-d3); margin: 64px 0 20px; scroll-margin-top: calc(var(--bar-h) + 16px); }
.doc__body h2:first-child { margin-top: 0; }
.doc__body p + p { margin-top: 1em; }
.doc__body ul { margin: 1em 0; display: grid; gap: 8px; list-style: disc; padding-left: 1.3em; }
.doc__body a { text-underline-offset: 4px; text-decoration-thickness: 2px; }
.doc__body a:hover { color: #fff; }
.err { min-height: 100svh; padding: calc(var(--bar-h) + 40px) var(--m) 60px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.err h1 { font-size: clamp(7rem, 38vw, 40rem); line-height: 0.82; }
.err p { font-size: var(--step-lead); max-width: 28ch; }
.err .button { margin-top: 20px; }

/* ---------- Motion: entrances (play once; content visible without JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.reveal-all) [data-r]:not(.is-in) { opacity: 0; transform: translateY(28px); }
  .js:not(.reveal-all) [data-r="row"]:not(.is-in) { transform: translateX(-16px); }
  .js:not(.reveal-all) [data-r="open"]:not(.is-in) { opacity: 1; transform: none; }
  .js:not(.reveal-all) [data-r="open"]:not(.is-in) img { clip-path: inset(0 0 100% 0); }
  [data-r] { transition: opacity 700ms var(--ease-expo), transform 900ms var(--ease-expo); transition-delay: calc(var(--i, 0) * var(--stagger)); }
  [data-r="open"] img { clip-path: inset(0); transition: clip-path 800ms var(--ease-expo); transition-delay: calc(var(--i, 0) * var(--stagger)); }

  /* load sequence on the first screen */
  .js .hero__title { clip-path: inset(0 0 100% 0); animation: load-open 650ms var(--ease-expo) 0ms forwards; }
  .js .hero [data-load] { opacity: 0; transform: translateY(14px); animation: load-rise 600ms var(--ease-out) forwards; animation-delay: var(--d, 300ms); }
  .js .bar__nav a { opacity: 0; animation: load-rise 500ms var(--ease-out) forwards; animation-delay: calc(500ms + var(--n, 0) * 70ms); }
}
@keyframes load-open { to { clip-path: inset(0); } }
@keyframes load-rise { to { opacity: 1; transform: none; } }

/* ---------- Motion: scroll-linked (timing bar, scaling wordmark, band drift) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @media (min-width: 769px) and (pointer: fine) {
      .bar__progress::after { animation: bar-fill linear both; animation-timeline: scroll(root block); }
      .hero__title .mark { animation: mark-shrink linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
      .foot__mark svg { animation: mark-grow linear both; animation-timeline: --contact; animation-range: exit 0% exit 100%; }
      .band img { animation: drift linear both; animation-timeline: --band; animation-range: cover 0% cover 100%; }
    }
  }
}
@keyframes bar-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mark-shrink { from { transform: scale(1); } to { transform: scale(0.93); } }
@keyframes mark-grow { from { transform: scale(0.94); } to { transform: scale(1); } }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-15%); } }
.band img { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar__progress { display: none; }
  .bar__mark { transition: none; }
}
@media (max-width: 768px), (pointer: coarse) {
  .bar__progress { display: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .intro__row h2 { grid-column: 1 / -1; }
  .intro__note { grid-column: 1 / 10; margin-top: 28px; }
  .facts { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .relay__clocks { grid-column: 1 / -1; }
  .clock__meta { display: none; }
  .relay__control { grid-column: 1 / -1; }
  .how__text { grid-column: 1 / -1; }
  .how__text h2 { max-width: 12ch; }
  .slip { grid-column: 1 / -1; justify-self: start; margin-top: 56px; }
  .how__photo { display: none; }
  .field h2 { font-size: 15vw; }
  .about__row, .about__pics { grid-template-columns: 1fr; row-gap: 40px; }
  .about__side { grid-template-columns: repeat(3, 1fr); padding-right: 0; }
  .about__pics > div { grid-column: 1; }
  .foot__cols { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .doc__toc { grid-column: 1 / -1; position: static; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 28px; }
  .doc__body { grid-column: 1 / -1; justify-self: start; margin-top: 40px; }
}

/* ---------- Phone: its own composition ---------- */
@media (max-width: 768px) {
  :root { --bar-h: 52px; --section-gap: 88px; }
  .bar__nav { gap: 14px; }
  .hero { gap: 0; padding-bottom: 0; min-height: 100svh; }
  .hero__title { margin-top: calc(10svh - 8px); }
  .hero__row { margin-top: 36px; }
  .hero__top { max-width: none; width: 100%; }
  .hero__top .button { width: 100%; }
  .hero__bottom { display: none; }
  .hero__photo { display: block; flex: 1 1 auto; min-height: 240px; margin: 28px 0 0; }
  .field { min-height: 64svh; padding-block: 24px; }
  .field p { grid-column: 1 / 11; }
  .field--paper p { grid-column: 1 / -1; text-align: right; justify-self: end; max-width: 30ch; }
  .field--paper h2 { justify-self: start; text-align: left; }
  .facts { grid-template-columns: 1fr 1fr; gap: 32px var(--gutter); }
  .relay__clocks { row-gap: 24px; }
  .band { aspect-ratio: 4 / 3; }
  .slip { padding-inline: 20px; }
  .slip__result { margin-inline: -20px; padding-inline: 20px; }
  .about__side { grid-template-columns: 1fr 1fr; }
  .about__pics > div { grid-template-columns: 1fr; }
  .lists { grid-template-columns: 1fr; }
  .crow { font-size: 9vw; min-height: 84px; padding-top: 18px; }
  .crow:first-of-type { font-size: 7.4vw; }
  .crow__photo { display: none; }
  .crow--hello { min-height: 120px; }
  .crow__go { width: 56px; height: 56px; margin-left: auto; }
  .foot { padding-top: 32px; }
  .foot__cols { row-gap: 32px; }
  .doc__toc { grid-template-columns: 1fr; }
  .doc__body h2 { font-size: 2rem; margin-top: 48px; }
}


/* ===================================================================
   Glass layer (owner request: frosted glass, real texture).
   Panels: sticky bar, Relay clock, itinerary slip, contact rows.
   Each sits over a night photo so the blur has something to blur.
   =================================================================== */

/* photos pick up the palette (colour blend over the grayscale image) */
.photo, .crow__photo { position: relative; isolation: isolate; }
.photo::after, .crow__photo::after { content: ""; position: absolute; inset: 0; background: var(--tint-c); mix-blend-mode: color; pointer-events: none; }

/* shared glass recipe */
.js .bar, .relay__live, .relay__static, .slip, .crow:not(.crow--hello) {
  background-color: var(--glass-fill);
  background-image: var(--glass-sheen), var(--glass-tex, none), linear-gradient(rgba(0,0,0,.22), rgba(0,0,0,.22));
  background-size: auto, var(--glass-tex-size, auto), auto;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 rgba(0,0,0,.28), 0 28px 56px -28px rgba(0,0,0,.75);
}

/* sticky bar: dark enough that light text holds over the paper fields */
.js .bar { background-color: var(--bar-fill); border-width: 0 0 1px; border-radius: 0; box-shadow: inset 0 1px 0 var(--glass-hi), 0 12px 32px -16px rgba(0,0,0,.7); }
.bar__nav a::after { background: var(--nav-line); }
::selection { background: var(--sel-bg); color: var(--sel-ink); }

/* buttons: one shape (pill) */
.button:hover { background: var(--accent-hover); }

/* Relay clock: a night street behind a glass panel */
.relay {
  position: relative; isolation: isolate; overflow: clip; background: var(--bg);
  padding-block: clamp(40px, 6vw, 104px);
}
.relay::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--tint-c), var(--tint-c)), url("../img/street-579.jpg");
  background-blend-mode: color, normal; background-size: cover; background-position: 62% 58%;
  filter: brightness(var(--layer-dim)) contrast(1.12);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
}
.relay__live, .relay__static { padding: clamp(24px, 3.2vw, 52px); border-radius: calc(var(--glass-r) + 6px); }
.slider__rail { background: rgba(255,255,255,.16); box-shadow: inset 0 1px 2px rgba(0,0,0,.35); }
.slider__fill { background: var(--slider-fill); }
.slider input::-webkit-slider-thumb { box-shadow: 0 2px 10px rgba(0,0,0,.45), inset 0 -2px 0 rgba(0,0,0,.12); }
.clock__meta, .relay__day { color: var(--muted); }

/* statement field */
.field--accent { background-color: var(--field); color: var(--field-ink); }
.field--accent :focus-visible { outline-color: var(--field-ink); }

/* itinerary slip: bridge lights behind a glass ticket */
.how__grid { position: relative; isolation: isolate; }
.how__grid::after {
  content: ""; position: absolute; z-index: -1; top: -56px; bottom: -56px; right: calc(-1 * var(--m)); width: min(66%, 860px); pointer-events: none;
  background-image: linear-gradient(var(--tint-c), var(--tint-c)), url("../img/bridge-43.jpg");
  background-blend-mode: color, normal; background-size: cover; background-position: 45% 60%;
  filter: brightness(calc(var(--layer-dim) + .08)) contrast(1.1);
  -webkit-mask-image: linear-gradient(to left, #000 55%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to left, #000 55%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-composite: intersect;
}
.slip {
  clip-path: none; color: var(--ink); border-radius: var(--glass-r); overflow: clip;
  padding: 32px 28px 0;
}
.slip .dots, .slip__result .dots {
  background-image: none; background-color: currentColor; opacity: .42;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='4'%3E%3Ccircle cx='2' cy='2' r='2' fill='%23000'/%3E%3C/svg%3E") repeat-x 0 0 / 10px 4px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='4'%3E%3Ccircle cx='2' cy='2' r='2' fill='%23000'/%3E%3C/svg%3E") repeat-x 0 0 / 10px 4px;
}
.slip__result { background: rgba(0,0,0,.4); color: var(--ink); border-top: 1px solid var(--glass-line); margin-top: 32px; height: 52px; }
.slip__result .slip__val { color: var(--result-val); }

/* contact rows: glass cards over an alley at night */
.contact {
  position: relative; isolation: isolate; display: grid; gap: 10px;
  padding: clamp(10px, 1.6vw, 24px) var(--gutter);
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--tint-c), var(--tint-c)), url("../img/alley-195.jpg");
  background-blend-mode: color, normal; background-size: cover; background-position: 50% 38%;
  filter: brightness(var(--layer-dim)) contrast(1.1);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14%);
}
.crow { border-radius: var(--glass-r); }
.crow--alt { background-color: var(--glass-fill); }
a.crow:hover, a.crow:focus-visible { background: var(--hover-bg); color: var(--hover-ink); border-color: transparent; }
.crow--hello { background: var(--hello-bg) !important; color: var(--hello-ink); border: 1px solid transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
a.crow--hello:hover { background: var(--hello-hover) !important; }
.crow__go { background: var(--go-bg); color: var(--go-ink); }


/* hero: a dim night photo behind the wordmark (so the glass bar has something to blur) */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--tint-c), var(--tint-c)), var(--hero-img);
  background-blend-mode: color, normal; background-size: cover; background-position: 50% var(--hero-y, 60%);
  opacity: var(--hero-op); filter: brightness(.9) contrast(1.1);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 55%, transparent 100%);
}

/* no glass support / reduced transparency: solid surfaces, same layout */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .js .bar { background-color: var(--bg); background-image: none; }
  .relay__live, .relay__static, .slip, .crow:not(.crow--hello) { background-color: var(--surface); background-image: none; }
  .contact::before, .relay::before, .how__grid::after, .hero::before { opacity: .5; }
}
@media (prefers-reduced-transparency: reduce) {
  .js .bar { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: var(--bg); background-image: none; }
  .relay__live, .relay__static, .slip, .crow:not(.crow--hello) { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: var(--surface); background-image: none; }
}

@media (max-width: 1100px) {
  .how__grid::after { left: calc(-1 * var(--m)); right: calc(-1 * var(--m)); width: auto; top: 36%; bottom: -56px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 86%, transparent 100%); -webkit-mask-composite: source-over;
    mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 86%, transparent 100%); mask-composite: add; }
}
@media (max-width: 768px) {
  .relay { padding-block: 32px; }
  .relay__live, .relay__static { padding: 20px 18px; border-radius: var(--glass-r); }
  .slip { padding: 24px 20px 0; }
  .slip__result { margin-top: 24px; }
  .contact { padding-inline: 10px; }
  .crow { border-radius: 18px; }
  .crow:first-of-type { font-size: 6.6vw; }
  .hero::before { opacity: calc(var(--hero-op) * .6); }
}

/* Graphite: carbon twill and fine noise inside the glass, brushed grain on the fields. */
:root {
  --glass-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath d='M0 6L6 0M-1.5 1.5L1.5-1.5M4.5 7.5L7.5 4.5' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1.1'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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 .55 -.18'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  --glass-tex-size: 6px 6px, 160px 160px;
}
.field--accent {
  background-image:
    linear-gradient(115deg, rgba(255,255,255,.10) 0, rgba(255,255,255,0) 38%, rgba(255,255,255,.04) 72%, rgba(255,255,255,0) 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.028) 0 1px, transparent 1px 3px);
}
.field--paper, .foot { background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.03) 0 1px, transparent 1px 3px); }
