/* NightForward: site styles (phase 2) */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2-variations"), url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2-variations"), url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --ink: #0E1726;
  --ink-2: #1A2537;
  --ink-3: #243149;
  --paper: #F6F3EE;
  --paper-2: #ECE6DC;
  --amber: #F5A524;
  --amber-ink: #8A5300;
  --slate: #56606E;
  --line: #D6CEC0;
  --line-dark: #2C3850;
  --ok: #1F6B3A;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(5rem, 11vw, 9rem);
  --radius: 6px;
  --r-lg: clamp(14px, 2vw, 24px);
  --ease: cubic-bezier(.2, .7, .15, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 1px 2px rgba(14, 23, 38, .06), 0 12px 32px -8px rgba(14, 23, 38, .18), 0 40px 80px -24px rgba(14, 23, 38, .22);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  font-family: var(--sans); font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0875rem); line-height: 1.6;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--amber); color: var(--ink); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--radius); }
.skip:focus { top: 1rem; }

/* Scroll progress */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress__bar { display: block; height: 100%; background: var(--amber); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 50; transition: transform .5s var(--ease), background-color .4s, box-shadow .4s, backdrop-filter .4s; }
.home .masthead { position: fixed; inset: 0 0 auto 0; }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.masthead.is-scrolled, body:not(.home) .masthead { background: rgba(246, 243, 238, .82); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 rgba(14, 23, 38, .08); }
.masthead.is-hidden { transform: translateY(-105%); }
.wordmark { white-space: nowrap; font-family: var(--serif); font-weight: 700; font-size: 1.65rem; letter-spacing: -0.03em; text-decoration: none; color: var(--ink); line-height: 1; }
.wordmark__dot { color: var(--amber); display: inline-block; transition: transform .5s var(--ease-out); }
.wordmark:hover .wordmark__dot { transform: translateY(-.18em) scale(1.25); }
.wordmark--light { color: var(--paper); }
.nav { display: flex; align-items: center; gap: clamp(.8rem, 2.4vw, 2rem); }
.nav__link { text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; padding-block: .3rem; }
.nav__link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--amber); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .45s var(--ease-out); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
@media (max-width: 760px) { .nav__link { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font: inherit; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer;
  color: var(--fg); background: var(--bg); border: 0; border-radius: 999px;
  padding: 1.05rem 1.6rem; min-height: 3.2rem;
  transition: color .4s var(--ease), box-shadow .4s var(--ease), transform .25s var(--ease);
  will-change: transform;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--amber); border-radius: inherit; transform: translateY(101%); transition: transform .55s var(--ease-out); }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--ink); box-shadow: 0 12px 30px -10px rgba(245, 165, 36, .7); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--small { padding: .75rem 1.15rem; min-height: 2.6rem; font-size: .92rem; }
.btn--light { --bg: var(--paper); --fg: var(--ink); }
.btn__arrow { display: inline-block; transition: transform .45s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(5px); }
.link-quiet { font-weight: 600; text-decoration: none; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 2px no-repeat; padding-bottom: 3px; transition: background-size .45s var(--ease-out); }
.link-quiet:hover { background-size: 0 2px; background-position: 100% 100%; }

/* ---------- Shared type ---------- */
.eyebrow, .kicker { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--amber-ink); }
.kicker { margin-bottom: 1.1rem; }
.kicker--light { color: var(--amber); }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .85rem .45rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .55); color: var(--ink); letter-spacing: .08em; }
.eyebrow__dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(245, 165, 36, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 165, 36, .6); } 70% { box-shadow: 0 0 0 10px rgba(245, 165, 36, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 165, 36, 0); } }
.section-title { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4.2rem); }
.caption { margin-top: .9rem; font-size: .88rem; color: var(--slate); }

/* ---------- Frames (parallax images) ---------- */
.frame { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--paper-2); isolation: isolate; }
.frame--tall { aspect-ratio: 4 / 5; }
.frame--portrait { aspect-ratio: 8 / 9; }
.frame--wide { aspect-ratio: 3 / 2; }
.frame__inner { position: absolute; inset: -14% 0; will-change: transform; }
.frame__inner img, .hero__photo-inner img, .band__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.frame:hover .frame__inner img { transform: scale(1.04); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: clamp(7rem, 12vw, 9rem) 0 clamp(4rem, 8vw, 6rem); overflow: clip; }
.hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__glow { position: absolute; width: 60vw; height: 60vw; right: -12vw; top: -18vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(245, 165, 36, .32), rgba(245, 165, 36, 0)); filter: blur(10px); }
.hero__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(14, 23, 38, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(14, 23, 38, .05) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%); }
.hero__grid-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
.hero__copy { display: grid; gap: 1.6rem; justify-items: start; }
.hero__title { font-size: clamp(2.7rem, 1.4rem + 5.2vw, 5.6rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.0; }
.hero__lede { font-size: clamp(1.08rem, 1rem + .35vw, 1.25rem); color: #37404D; max-width: 34em; }
.hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.1rem 1.75rem; margin-top: .4rem; }

.hero__visual { position: relative; padding: 2rem 0 4rem 2.5rem; }
.hero__photo { position: relative; border-radius: calc(var(--r-lg) + 6px); overflow: hidden; aspect-ratio: 1 / 1.02; box-shadow: var(--shadow); will-change: transform; background: var(--paper-2); }
.hero__photo-inner { position: absolute; inset: -8%; will-change: transform; }
.hero__photo-inner img { object-position: 55% 50%; }
.js .hero__photo { clip-path: inset(100% 0 0 0 round 30px); transition: clip-path 1.5s var(--ease-out) .15s; }
.js .hero__photo .hero__photo-inner img { transform: scale(1.25); transition: transform 2s var(--ease-out) .15s; }
.js.is-loaded .hero__photo { clip-path: inset(0 0 0 0 round 30px); }
.js.is-loaded .hero__photo .hero__photo-inner img { transform: scale(1); }

.chip { position: absolute; display: flex; align-items: center; gap: .7rem; padding: .75rem 1rem .75rem .75rem; border-radius: 14px; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow); font-size: .85rem; line-height: 1.3; color: var(--slate); will-change: transform; }
.chip strong { color: var(--ink); font-weight: 600; }
.chip__icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 10px; background: var(--ink); color: var(--amber); font-weight: 700; }
.chip__icon--ok { background: #E3F1E8; color: var(--ok); }
.chip--a { top: .5rem; right: -1rem; }
.chip--b { top: 42%; right: -2rem; }
.js .chip, .js .day { opacity: 0; translate: 0 30px; transition: opacity .9s var(--ease-out), translate 1.1s var(--ease-out); }
.js.is-loaded .chip, .js.is-loaded .day { opacity: 1; translate: 0 0; }
.js.is-loaded .chip--a { transition-delay: .9s; }
.js.is-loaded .chip--b { transition-delay: 1.1s; }
.js.is-loaded .day { transition-delay: .7s; }

/* The day card */
.day { position: absolute; left: -1rem; bottom: 0; width: min(24rem, 78%); background: var(--paper); border-radius: 18px; padding: 1.2rem 1.25rem 1rem; box-shadow: var(--shadow); border: 1px solid rgba(214, 206, 192, .7); will-change: transform; }
.day__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); margin-bottom: .35rem; }
.day__time { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.day__who { font-size: .78rem; color: var(--slate); }
.day__list { list-style: none; padding: 0; }
.task { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .5rem 0; font-size: .86rem; border-bottom: 1px dashed rgba(214, 206, 192, .8); }
.task:last-child { border-bottom: 0; }
.task__text { flex: 1; }
.strike { background: linear-gradient(currentColor, currentColor) 0 55% / 100% 1.5px no-repeat; color: #8b929c; transition: background-size .7s var(--ease), color .7s; }
.task--keep .strike { background-size: 0 1.5px; color: var(--ink); font-weight: 600; }
.task__tag { flex: none; font-size: .68rem; font-weight: 600; letter-spacing: .04em; padding: .22rem .5rem; border-radius: 999px; background: #E3F1E8; color: var(--ok); transition: opacity .4s, transform .5s var(--ease-out); }
.task--keep .task__tag { background: var(--amber); color: var(--ink); }
.js .task:not(.is-done) .strike { background-size: 0 1.5px; color: var(--ink); font-weight: 400; }
.js .task:not(.is-done) .task__tag { opacity: 0; transform: scale(.8); }

.scroll-cue { position: absolute; left: 50%; bottom: 1.6rem; width: 26px; height: 42px; border: 2px solid rgba(14, 23, 38, .35); border-radius: 14px; translate: -50% 0; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ink); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; background: var(--ink); color: var(--paper); padding: 1.15rem 0; border-block: 1px solid var(--line-dark); }
.ticker__track { display: flex; width: max-content; gap: 2.2rem; align-items: center; font-family: var(--serif); font-size: clamp(1.2rem, 1rem + 1vw, 1.9rem); font-weight: 500; white-space: nowrap; animation: ticker 38s linear infinite; }
.ticker__track i { font-style: normal; color: var(--amber); font-size: .7em; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Problem ---------- */
.problem { padding: var(--section) 0; }
.problem__layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.problem__media { position: sticky; top: 6.5rem; }
.problem__copy .section-title { margin-bottom: clamp(2rem, 4vw, 3rem); }
.problem__grid { display: grid; gap: 1rem; }
.problem__item { position: relative; padding: 1.6rem 1.6rem 1.6rem 5rem; border-radius: 16px; background: #fff; border: 1px solid var(--line); transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .4s; }
.problem__item:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.problem__num { position: absolute; left: 1.5rem; top: 1.45rem; font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--amber); transition: transform .5s var(--ease-out); }
.problem__item:hover .problem__num { transform: rotate(-8deg) scale(1.15); }
.problem__item h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.problem__item p { color: #454E5B; }

/* ---------- Services ---------- */
.services { position: relative; padding: var(--section) 0; background: var(--ink); color: var(--paper); overflow: hidden; }
.services::before { content: ""; position: absolute; width: 70vw; height: 70vw; left: -30vw; bottom: -40vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(245, 165, 36, .14), transparent); pointer-events: none; }
.services__head { display: flex; flex-direction: column; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.services__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.service {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(1.6rem, 3vw, 2.4rem); border-radius: 20px;
  background: var(--ink-2); border: 1px solid var(--line-dark);
  transition: transform .6s var(--ease-out), border-color .4s;
}
.service::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(245, 165, 36, .18), transparent 60%); }
.service:hover { transform: translateY(-6px); border-color: rgba(245, 165, 36, .45); }
.service:hover::before { opacity: 1; }
.service__icon { width: 3rem; height: 3rem; margin-bottom: 1.8rem; fill: none; stroke: var(--amber); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.service__icon * { stroke-dasharray: 120; stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease-out); }
.service:hover .service__icon * { animation: draw 1.2s var(--ease-out); }
@keyframes draw { from { stroke-dashoffset: 120; } to { stroke-dashoffset: 0; } }
.service h3 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); margin-bottom: .75rem; }
.service p { color: #C9CFD9; max-width: 32em; }

/* ---------- Parallax band ---------- */
.band { position: relative; min-height: clamp(28rem, 90vh, 52rem); display: grid; align-items: end; overflow: hidden; color: #fff; isolation: isolate; }
.band__media { position: absolute; inset: 0; z-index: -1; }
.band__img { position: absolute; inset: -22% 0; will-change: transform; }
.band__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 23, 38, .15) 0%, rgba(14, 23, 38, .25) 45%, rgba(14, 23, 38, .88) 100%); }
.band__copy { padding-block: clamp(3rem, 8vw, 6rem); }
.band__quote { font-family: var(--serif); font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; font-size: clamp(2.4rem, 1.2rem + 5.4vw, 6rem); max-width: 14ch; text-wrap: balance; }

/* ---------- How ---------- */
.how { padding: var(--section) 0; }
.how__layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.how__media { position: sticky; top: 6.5rem; }
.how__copy .section-title { margin-bottom: clamp(2rem, 4vw, 3rem); }
.steps { list-style: none; padding: 0 0 0 3.5rem; position: relative; counter-reset: step; display: grid; gap: clamp(1.5rem, 3vw, 2.4rem); }
.steps::before, .steps__fill { content: ""; position: absolute; left: 1.1rem; top: .6rem; bottom: .6rem; width: 2px; background: var(--line); }
.steps__fill { background: var(--amber); transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
.step { position: relative; counter-increment: step; padding-bottom: clamp(1.5rem, 3vw, 2.4rem); border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step::before { content: counter(step); position: absolute; z-index: 1; left: -3.5rem; top: -.1rem; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); font-weight: 700; font-size: .9rem; transition: background-color .5s, border-color .5s, color .5s, transform .5s var(--ease-out); }
.step.is-active::before { background: var(--amber); border-color: var(--amber); transform: scale(1.1); }
.step h3 { font-size: clamp(1.4rem, 1.2rem + .9vw, 2rem); margin-bottom: .45rem; }
.step p { color: #454E5B; max-width: 34em; }

/* ---------- Examples ---------- */
.examples { padding: var(--section) 0; background: var(--paper-2); }
.examples__head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.examples__intro { color: #454E5B; }
.table-scroll { overflow-x: auto; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.swap { width: 100%; border-collapse: collapse; min-width: 40rem; }
.swap th, .swap td { text-align: left; vertical-align: top; padding: 1.25rem 1.5rem; border-bottom: 1px solid #EEE8DE; }
.swap thead th { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); background: #FBF9F5; }
.swap tbody th { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; width: 18%; }
.swap tbody td:nth-of-type(1) { color: var(--slate); width: 38%; }
.swap tbody td:nth-of-type(2) { position: relative; font-weight: 500; }
.swap tbody tr:last-child > * { border-bottom: 0; }
.swap tbody tr { transition: background-color .35s; }
.swap tbody tr:hover { background: #FFF8EA; }
.swap tbody td:nth-of-type(2)::before { content: ""; position: absolute; left: 0; top: 1.1rem; bottom: 1.1rem; width: 3px; border-radius: 2px; background: var(--amber); transform: scaleY(0); transition: transform .45s var(--ease-out); }
.swap tbody tr:hover td:nth-of-type(2)::before { transform: scaleY(1); }
.swap tbody tr:hover td:nth-of-type(1) { text-decoration: line-through; text-decoration-color: rgba(86, 96, 110, .5); }

/* Phones: each row becomes a before/after card */
@media (max-width: 720px) {
  .table-scroll { overflow: visible; background: transparent; border: 0; border-radius: 0; }
  .swap { min-width: 0; display: block; }
  .swap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .swap tbody { display: grid; gap: .9rem; }
  .swap tbody tr { display: grid; gap: .55rem; padding: 1.2rem; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
  .swap tbody tr:hover { background: #fff; }
  .swap th, .swap td { display: block; width: auto !important; padding: 0; border: 0; }
  .swap tbody th { font-size: 1.3rem; margin-bottom: .2rem; }
  .swap tbody td::before { content: attr(data-label); display: block; margin-bottom: .2rem; font-family: var(--sans); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .swap tbody td:nth-of-type(1) { color: var(--slate); padding: .8rem .9rem; border-radius: 12px; background: #F4F1EC; }
  .swap tbody td:nth-of-type(1)::before { color: var(--slate); }
  .swap tbody td:nth-of-type(2) { padding: .8rem .9rem; border-radius: 12px; background: #FFF4DF; color: var(--ink); }
  .swap tbody td:nth-of-type(2)::before { content: attr(data-label); color: var(--amber-ink); position: static; width: auto; height: auto; border-radius: 0; background: none; transform: none; }
  .swap tbody td:nth-of-type(2)::after { content: "↓"; position: absolute; left: 50%; top: -1.05rem; translate: -50% 0; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%; background: var(--amber); color: var(--ink); font-size: .8rem; font-weight: 700; }
  .swap tbody tr:hover td:nth-of-type(1) { text-decoration: none; }
}

/* ---------- Safe ---------- */
.safe { padding: var(--section) 0; }
.safe__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.safe__copy .section-title { margin-bottom: 2rem; }
.safe__list { display: grid; gap: 1.4rem; }
.safe__list > div { padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.safe__list > div:last-child { border-bottom: 0; }
.safe__list dt { display: flex; align-items: center; gap: .8rem; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin-bottom: .35rem; }
.safe__list dt svg { width: 1.6rem; height: 1.6rem; flex: none; fill: none; stroke: var(--amber-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease-out); }
.safe__list > div:hover dt svg { transform: rotate(-10deg) scale(1.15); }
.safe__list dd { color: #454E5B; padding-left: 2.4rem; }

/* ---------- Enterprise ---------- */
.enterprise { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); padding: clamp(4rem, 9vw, 7rem) 0; isolation: isolate; }
.enterprise__bg { position: absolute; inset: 0; z-index: -1; }
.enterprise__bg span { position: absolute; inset: -30% -10%; background: radial-gradient(40% 60% at 85% 50%, rgba(245, 165, 36, .22), transparent 70%), repeating-linear-gradient(115deg, transparent 0 38px, rgba(255, 255, 255, .025) 38px 39px); }
.enterprise__inner { display: flex; justify-content: space-between; align-items: center; gap: 2.5rem; flex-wrap: wrap; }
.enterprise__inner > div { max-width: 44rem; }
.enterprise__title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); }
.enterprise p:not(.kicker) { margin-top: 1rem; color: #D7DCE4; font-size: 1.08rem; }

/* ---------- Enquiry ---------- */
.enquire { background: var(--paper-2); padding: var(--section) 0; }
.enquire__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.enquire__intro { position: sticky; top: 7rem; }
.enquire__intro p { margin-top: 1.25rem; max-width: 30em; }
.enquire__intro .kicker { margin-top: 0; }
.enquire__small { color: var(--slate); font-size: .95rem; }
.form { background: var(--paper); padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 20px; border: 1px solid var(--line); display: grid; gap: 1.1rem; box-shadow: var(--shadow); }
.form__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form__row { display: grid; gap: .4rem; }
.form label { font-size: .92rem; font-weight: 600; }
.form input, .form select, .form textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #BDB4A5; border-radius: 10px; padding: .75rem .85rem; min-height: 3rem; transition: border-color .3s, box-shadow .3s; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--ink); }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(245, 165, 36, .45); }
.form textarea { resize: vertical; min-height: 8rem; }
.form [aria-invalid="true"] { border-color: #B3261E; }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__consent { font-size: .875rem; color: var(--slate); }
.form .btn { justify-self: start; }
.form__status { font-weight: 500; min-height: 1.5em; }
.form__status[data-state="error"] { color: #B3261E; }
.form__status[data-state="ok"] { color: var(--ok); }

/* Contact preferences, phone */
.form__group { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: .55rem; }
.form__group legend { font-size: .92rem; font-weight: 600; padding: 0; margin-bottom: .55rem; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.check { display: inline-flex; align-items: flex-start; gap: .6rem; cursor: pointer; font-size: .95rem; line-height: 1.4; }
.checks .check { align-items: center; padding: .6rem .9rem; border: 1px solid #BDB4A5; border-radius: 999px; background: #fff; transition: border-color .25s, background-color .25s; }
.checks .check:hover { border-color: var(--ink); }
.checks .check:has(input:checked) { border-color: var(--ink); background: #FFF4DF; }
.form .check input { appearance: none; -webkit-appearance: none; flex: none; width: 1.15rem; height: 1.15rem; min-height: 0; padding: 0; margin: .1rem 0 0; border: 1.5px solid #8C8374; border-radius: 5px; background: #fff; display: grid; place-items: center; cursor: pointer; transition: background-color .2s, border-color .2s; }
.form .checks .check input { margin: 0; }
.form .check input::after { content: ""; width: .32rem; height: .6rem; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); margin-top: -2px; transition: transform .2s var(--ease-out); }
.form .check input:checked { background: var(--amber); border-color: var(--amber); }
.form .check input:checked::after { transform: rotate(45deg) scale(1); }
.form .check input:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.form .check--updates { font-size: .9rem; font-weight: 400; color: #454E5B; }
.form .checks .check { font-weight: 500; }
.form__hint { font-size: .82rem; color: var(--slate); }
.form__opt { font-weight: 400; color: var(--slate); font-size: .85rem; }

.phone { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; }
.phone__cc { display: flex; align-items: stretch; border: 1px solid #BDB4A5; border-radius: 10px; background: #fff; transition: border-color .3s, box-shadow .3s; }
.phone__cc:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(245, 165, 36, .45); }
.phone__flag { display: none; align-items: center; gap: .25rem; padding: 0 .35rem 0 .7rem; border: 0; background: none; font: inherit; cursor: pointer; border-radius: 10px 0 0 10px; }
.js .phone__flag { display: inline-flex; }
.phone__flag:hover { background: #F4F1EC; }
.phone__flag:focus-visible { outline: 0; }
.phone__flag-icon { font-size: 1.25rem; line-height: 1; min-width: 1.5rem; text-align: center; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.phone__caret { font-size: .7rem; color: var(--slate); }
.form .phone__cc input { width: 4.4rem; border: 0; box-shadow: none; background: transparent; padding-left: .4rem; min-height: 3rem; font-variant-numeric: tabular-nums; }
.form .phone__cc input:focus-visible { box-shadow: none; }
.cc-pop { position: absolute; z-index: 20; top: calc(100% + .4rem); left: 0; width: min(22rem, 100%); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .5rem; }
.form .cc-pop input { min-height: 2.6rem; }
.cc-pop ul { list-style: none; padding: 0; margin: .4rem 0 0; max-height: 15rem; overflow-y: auto; overscroll-behavior: contain; }
.cc-pop li[role="option"] { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: 8px; cursor: pointer; font-size: .92rem; }
.cc-pop li[role="option"]:hover, .cc-pop li.is-active { background: #FFF4DF; }
.cc-pop li[aria-selected="true"] { font-weight: 600; }
.cc-opt__flag { font-size: 1.15rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.cc-opt__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-opt__code { color: var(--slate); font-variant-numeric: tabular-nums; }
.cc-none { padding: .6rem; font-size: .88rem; color: var(--slate); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #C9CFD9; padding: clamp(3rem, 6vw, 5rem) 0 6rem; font-size: .925rem; overflow: hidden; }
.footer__big { font-family: var(--serif); font-weight: 700; letter-spacing: -0.05em; line-height: .85; font-size: clamp(3rem, 13.5vw, 12.5rem); color: var(--ink-3); overflow-wrap: anywhere; margin-bottom: clamp(2rem, 4vw, 3rem); user-select: none; }
.footer__big .wordmark__dot { color: var(--amber); }
.footer__inner { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; padding-top: 2rem; border-top: 1px solid var(--line-dark); }
.footer__tag { margin-top: .5rem; font-family: var(--serif); font-size: 1.05rem; color: var(--paper); }
.footer__meta { display: grid; gap: .6rem; justify-items: end; text-align: right; }
.footer__meta nav { display: flex; gap: 1.5rem; }
.footer__meta a { text-decoration: none; background: linear-gradient(var(--amber), var(--amber)) 0 100% / 0 1px no-repeat; transition: background-size .4s var(--ease-out), color .3s; }
.footer__meta a:hover { color: var(--paper); background-size: 100% 1px; }

/* ---------- Prose pages (privacy, 404) ---------- */
.prose { padding: clamp(4rem, 9vw, 7rem) 0; }
.prose .wrap { max-width: 46rem; }
.prose h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 1rem; }
.prose h2 { font-size: 1.5rem; margin: 2.4rem 0 .8rem; }
.prose p, .prose ul { margin-top: 1rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-top: .5rem; }
.prose a { color: var(--amber-ink); text-underline-offset: 3px; }
.updated { color: var(--slate); font-size: .95rem; }

/* ---------- Custom cursor (fine pointers only) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1.5px solid rgba(14, 23, 38, .55); transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background-color .35s, border-color .35s, opacity .3s; mix-blend-mode: normal; opacity: 0; }
.cursor.is-on { opacity: 1; }
.cursor.is-link { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(245, 165, 36, .18); border-color: var(--amber); }
.cursor.is-dark { border-color: rgba(246, 243, 238, .7); }
.cursor.is-hidden { opacity: 0; }

/* ---------- Motion: reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 56px, 0); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="image"] { opacity: 1; transform: none; clip-path: inset(22% 0 0 0 round var(--r-lg)); transition: clip-path 1.4s var(--ease-out); }
.js [data-reveal="image"] img { transform: scale(1.22); transition: transform 1.8s var(--ease-out); }
.js [data-reveal="image"].is-in { clip-path: inset(0 0 0 0 round var(--r-lg)); }
.js [data-reveal="image"].is-in img { transform: scale(1); }
.js [data-reveal="image"].is-in:hover img { transform: scale(1.04); }
.js tr[data-reveal] { transform: translate3d(0, 24px, 0); }

/* split headings */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w__i { display: inline-block; transform: translate3d(0, 105%, 0); transition: transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
.is-in .w__i, .is-in.w__i { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid-layout, .problem__layout, .how__layout, .safe__layout, .enquire__grid, .examples__head { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: auto; }
  .hero__visual { padding: 1rem 0 6rem 0; }
  .hero__photo { aspect-ratio: 4 / 3.4; }
  .chip--a { right: .5rem; }
  .chip--b { right: .5rem; top: auto; bottom: 7rem; display: none; }
  .hero__visual { padding-bottom: 0; }
  .day { position: relative; left: auto; bottom: auto; margin: -4.5rem auto 0; width: calc(100% - 1.5rem); max-width: 26rem; }
  .problem__media, .how__media, .enquire__intro { position: relative; top: 0; }
  .frame--tall { aspect-ratio: 3 / 2; }
  .frame--portrait { aspect-ratio: 4 / 3; }
  .services__list { grid-template-columns: minmax(0, 1fr); }
  .scroll-cue { display: none; }
}
@media (max-width: 560px) {
  .form__pair { grid-template-columns: minmax(0, 1fr); }
  .problem__item { padding: 1.4rem 1.2rem 1.4rem 3.8rem; }
  .problem__num { left: 1.1rem; font-size: 1.3rem; }
  .steps { padding-left: 3rem; }
  .step::before { left: -3rem; }
  .steps::before, .steps__fill { left: .95rem; }
  .footer__meta { justify-items: start; text-align: left; }
  .day { width: calc(100% - 1rem); }
  .chip--a { top: .5rem; right: .5rem; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js [data-reveal], .js [data-reveal="image"], .js .hero__photo, .js .chip, .js .day { opacity: 1 !important; transform: none !important; translate: none !important; clip-path: none !important; }
  .js [data-reveal="image"] img, .js .hero__photo img { transform: none !important; }
  .w__i { transform: none !important; }
  .task .task__tag { opacity: 1; transform: none; }
  .cursor { display: none; }
}

/* Longer NightForward wordmark: keep the header on one line on small phones */
@media (max-width: 430px) {
  .masthead .wordmark { font-size: 1.3rem; }
  .masthead .btn--small { white-space: nowrap; padding-inline: .9rem; font-size: .85rem; }
}
