/* ============================================================
   Webrivio — site system (Nov 2026 rebuild)
   Everything after the home hero + Selected work, and every inner page.
   Built from five references, re-cut in Webrivio's navy, serif and blue:
     Rejouice  : giant line-revealed statements, hairline rule rows,
                 expanding "highlight" media, 2-up panels, the light
                 section switch, the giant wordmark footer
     Lusion    : the blue ribbon that draws through the page, dot links
     Linear    : two-tone statements, FIG columns with hairlines
     Apple     : giant stats, the rounded tile rail
     Noxediem /
     Oaksun    : full-screen case files that stack as you scroll
   Motion lives in assets/motion.js. Nothing here hides content: every
   element is complete and readable with JS off.
   ============================================================ */

:root {
  --paper: #EEF1FA;
  --paper-2: #E2E7F6;
  --paper-ink: #0B1430;
  --paper-mute: #4A5574;
  --paper-line: rgba(11, 20, 48, 0.14);
  --blue: #2B52DB;          /* ribbon + light-section accent (5.3:1 on --paper) */
  --night: #03070F;         /* footer band */
  --wrap: 1440px;
  --pad-x: calc(var(--gutter) + var(--safe-l));
  --pad-xr: calc(var(--gutter) + var(--safe-r));
}

/* ---------- section shells ---------- */
.sx { position: relative; padding: clamp(88px, 11vw, 168px) 0; }
.sx--tight { padding: clamp(64px, 8vw, 112px) 0; }
.sx-in { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-xr); position: relative; z-index: 1; }
.sx--light {
  background: var(--paper); color: var(--paper-ink);
  --ink: var(--paper-ink); --ink-soft: var(--paper-mute); --mute: var(--paper-mute); --mute-2: var(--paper-mute);
  --border: var(--paper-line); --border-strong: rgba(11, 20, 48, 0.24);
  --accent-glow: var(--blue);
}
.sx--light ::selection { background: rgba(58, 99, 240, 0.2); }
.sx + .sx--light, .sx--light + .sx--light { }

/* labels */
.lbl {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-glow);
}
.lbl::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lbl--plain::before { display: none; }

/* ---------- Rejouice statement ---------- */
.statement {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 5.4vw, 92px); line-height: 1.03; letter-spacing: -0.022em;
  max-width: 21ch; text-wrap: balance;
}
.statement--wide { max-width: 26ch; }
.statement .it { font-style: italic; color: var(--accent-glow); }
.statement .dim { color: var(--mute); }
.statement a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.statement a:hover { color: var(--accent-glow); }
/* the line masks are added by motion.js */
.ln { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.ln > span { display: inline-block; will-change: transform; }

/* Linear two-tone paragraph */
.twotone { font-family: var(--sans); font-weight: 500; font-size: clamp(22px, 2.3vw, 34px); line-height: 1.25; letter-spacing: -0.015em; max-width: 34ch; }
.twotone .dim { color: var(--mute); }

/* hairline rule row: left label, right copy (Rejouice) */
.rule-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  border-top: 1px solid var(--border);
  margin-top: clamp(40px, 6vw, 80px); padding-top: 22px;
}
.rule-row > :first-child { font-size: 15px; color: var(--ink-soft); }
.rule-row p { color: var(--ink-soft); font-size: 16px; max-width: 46ch; }
.rule-row p + p { margin-top: 14px; }
.u-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 20px;
  color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
  font-size: 16px;
}
.sx--light .u-link { color: var(--paper-ink); }
.u-link:hover { color: var(--accent-glow); }
.u-link .ar { display: inline-block; transition: transform .3s var(--ease-out); }
.u-link:hover .ar { transform: translate(2px, -2px); }

/* section head row: title left, link right (Rejouice "Highlights / See the work") */
.head-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: clamp(20px, 3vw, 32px); }
.head-row h2 { font-family: var(--sans); font-weight: 500; font-size: 18px; letter-spacing: -0.01em; }
.head-row a { color: var(--ink); font-size: 16px; text-decoration: underline; text-underline-offset: 4px; }
.sx--light .head-row a { color: var(--paper-ink); }
.big-h2 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.022em; line-height: 0.98;
  font-size: clamp(44px, 6.6vw, 110px); text-wrap: balance;
}
.big-h2 .it { font-style: italic; color: var(--accent-glow); }

/* ---------- Lusion ribbon ---------- */
.ribbon-host { position: relative; isolation: isolate; }
.ribbon {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: visible;
}
.ribbon path { fill: none; stroke: var(--accent); stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.sx--light .ribbon path { stroke: var(--blue); }
@media (max-width: 760px) { .ribbon path { stroke-width: 16; } }

/* ---------- Rejouice highlight (expanding media) ---------- */
.hl { display: block; position: relative; color: #fff; }
.hl-frame {
  position: relative; overflow: hidden; border-radius: 20px;
  aspect-ratio: 16 / 9; background: var(--surface);
  clip-path: inset(0 0 0 0 round 20px);
}
.hl-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transform-origin: 50% 30%; }
.hl-frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,7,15,0) 45%, rgba(3,7,15,0.62)); }
.hl-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: clamp(18px, 3vw, 36px);
}
.hl-cap b { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 64px); line-height: 1; letter-spacing: -0.02em; }
.hl-cap b .it { font-style: italic; }
.hl-cap > span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; text-align: right; }
.hl:hover .hl-frame img { transform: scale(1.025); transition: transform 1.2s var(--ease-out); }

/* 2-up panels */
.split2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.2vw, 16px); margin-top: clamp(10px, 1.2vw, 16px); }
.panel { position: relative; display: block; overflow: hidden; border-radius: 20px; aspect-ratio: 4 / 5; background: var(--surface); color: #fff; }
.panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1.2s var(--ease-out); }
.panel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,7,15,0) 55%, rgba(3,7,15,0.72)); }
.panel:hover img { transform: scale(1.03); }
.panel-cap { position: absolute; left: 0; right: 0; bottom: 22px; z-index: 2; text-align: center; display: grid; gap: 6px; }
.panel-cap b { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 40px); line-height: 1; }
.panel-cap > span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.86); }
@media (max-width: 760px) { .split2 { grid-template-columns: 1fr; } .panel { aspect-ratio: 4 / 4.4; } }

/* ---------- Apple stats ---------- */
.stats { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.stat { display: grid; gap: 8px; align-content: start; }
.stat > small { font-size: 15px; color: var(--ink-soft); }
.stat b {
  font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 8.6vw, 148px); line-height: 0.9; letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.stat b sup { font-size: 0.32em; vertical-align: top; position: relative; top: 0.35em; letter-spacing: 0; }
.stat > span { font-size: 15px; color: var(--ink-soft); max-width: 26ch; }
.stat b span { font: inherit; color: inherit; }
.stat-note { margin-top: 24px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--mute-2); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }

/* ---------- Linear FIG columns ---------- */
.figs { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); border-top: 1px solid var(--border); }
.fig { padding: 22px clamp(14px, 2vw, 28px) 8px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.fig + .fig { border-left: 1px solid var(--border); }
.fig:first-child { padding-left: 0; }
.fig-n { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--mute-2); }
.fig-art { height: clamp(150px, 15vw, 210px); display: grid; place-items: center; color: var(--ink-soft); }
.fig-art svg { width: min(100%, 220px); height: 100%; overflow: visible; }
.fig-art svg * { fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fig-art svg .acc { stroke: var(--accent-glow); stroke-width: 1.6; }
.fig h3 { font-family: var(--sans); font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }
.fig p { color: var(--ink-soft); font-size: 15px; max-width: 34ch; }
@media (max-width: 900px) {
  .figs { grid-template-columns: 1fr 1fr; }
  .fig:nth-child(odd) { padding-left: 0; border-left: 0; }
  .fig:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .figs { grid-template-columns: 1fr; }
  .fig { padding-left: 0 !important; border-left: 0 !important; }
  .fig + .fig { border-top: 1px solid var(--border); }
}

/* Linear two-column row: title left, copy right */
.lrow {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 96px); padding: clamp(40px, 5vw, 72px) 0;
  border-top: 1px solid var(--border);
}
.lrow:last-child { border-bottom: 1px solid var(--border); }
.lrow-t { display: grid; gap: 14px; align-content: start; }
.lrow-t h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 3.8vw, 60px); line-height: 0.98; letter-spacing: -0.02em; }
.lrow-t h3 .it { font-style: italic; color: var(--accent-glow); }
.lrow-c { display: grid; gap: 22px; align-content: start; }
.lrow-c > p { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; color: var(--ink); max-width: 46ch; }
.sx--light .lrow-c > p { color: var(--paper-ink); }
.ticks { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: var(--ink-soft); }
.ticks li::before { content: '+'; font-family: var(--mono); color: var(--accent-glow); }
@media (max-width: 860px) { .lrow { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .ticks { grid-template-columns: 1fr; } }

/* ---------- Apple tile rail ---------- */
.tiles-wrap { position: relative; }
.tiles {
  list-style: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(260px, 28vw, 400px);
  gap: clamp(12px, 1.4vw, 20px);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 4px var(--pad-xr) 18px var(--pad-x);
  margin: 0 calc(-1 * var(--pad-xr)) 0 calc(-1 * var(--pad-x));
  scroll-padding-inline: var(--pad-x);
  scrollbar-width: none;
}
.tiles::-webkit-scrollbar { display: none; }
.tile {
  scroll-snap-align: start; position: relative; overflow: hidden;
  border-radius: 26px; aspect-ratio: 3 / 4; min-height: 0;
  background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column;
}
.sx--light .tile { background: #fff; color: var(--paper-ink); }
.tile-top { padding: 26px 26px 0; display: grid; gap: 6px; position: relative; z-index: 2; }
.tile-top small { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-glow); }
.tile-top h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.4vw, 36px); line-height: 1; letter-spacing: -0.015em; }
.tile-top p { font-size: 14.5px; color: var(--ink-soft); max-width: 30ch; }
.tile-vis { position: relative; flex: 1; min-height: 0; margin-top: 18px; }
.tile-vis > img, .tile-vis > picture img { position: absolute; left: 26px; right: 0; top: 0; bottom: 0; width: calc(100% - 26px); height: 100%; object-fit: cover; object-position: left top; border-top-left-radius: 12px; }
.tile-vis .ph-row { position: absolute; inset: 0 0 -24px; display: flex; justify-content: center; gap: 10px; padding: 0 18px; }
.tile-vis .ph-row img { width: 30%; height: auto; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 14px; align-self: flex-end; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.tile-vis .ph-row img:nth-child(2) { margin-bottom: 28px; }
.tile-vis svg { position: absolute; inset: 10% 12%; width: 76%; height: 80%; color: var(--accent-glow); }
.tile-vis svg * { fill: none; stroke: currentColor; stroke-width: 1.3; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.tile-chips { position: absolute; left: 20px; right: 20px; bottom: 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.tile-chips span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--ink-soft); }
.tiles-nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.tiles-nav button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center;
}
.tiles-nav button:hover { border-color: var(--accent-glow); color: var(--accent-glow); }
.tiles-nav button:disabled { opacity: 0.35; cursor: default; }
.tiles-nav svg { width: 16px; height: 16px; }

/* ---------- Rejouice "at a glance" rail (pinned horizontally on desktop) ---------- */
.glance { overflow: hidden; }
.glance-track {
  display: flex; gap: clamp(12px, 1.4vw, 20px);
  padding: 0 var(--pad-xr) 0 var(--pad-x);
  will-change: transform;
}
.gcard {
  flex: none; width: clamp(280px, 30vw, 440px); aspect-ratio: 1 / 1.05;
  border-radius: 20px; padding: clamp(22px, 2.2vw, 32px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
  background: var(--surface); border: 1px solid var(--border);
}
.gcard:nth-child(2) { background: linear-gradient(160deg, #142a63, #0b1840); }
.gcard:nth-child(4) { background: var(--blue); border-color: transparent; color: #fff; }
.gcard:nth-child(4) .gcard-when, .gcard:nth-child(4) p { color: rgba(255,255,255,0.9); }
.gcard-when { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-glow); }
.gcard h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 3.2vw, 52px); line-height: 0.98; letter-spacing: -0.02em; }
.gcard h3 .it { font-style: italic; }
.gcard p { color: var(--ink-soft); font-size: 15.5px; max-width: 32ch; }
.gcard-n { font-family: var(--serif); font-size: clamp(72px, 7vw, 120px); line-height: 0.8; opacity: 0.16; }
.gcard-n::before { content: attr(data-n); } /* decorative numeral: drawn by CSS, outside the text tree */
@media (max-width: 899px) {
  .glance { overflow: visible; }
  .glance-track { overflow-x: auto; scroll-snap-type: x mandatory; margin: 0; scrollbar-width: none; scroll-padding-inline: var(--pad-x); }
  .glance-track::-webkit-scrollbar { display: none; }
  .gcard { scroll-snap-align: start; width: min(82vw, 360px); }
}

/* ---------- people / founders (Rejouice 2-up portraits) ---------- */
.founders { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.2vw, 16px); max-width: 860px; }
.founder-card { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 1 / 1.08; background: var(--paper-2); }
.founder-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.founder-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,7,15,0) 55%, rgba(3,7,15,0.78)); }
.founder-cap { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 2; color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.founder-cap b { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 40px); line-height: 1; display: block; }
.founder-cap span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.86); }
.founder-cap a { color: #fff; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 640px) { .founders { grid-template-columns: 1fr; } }

/* ---------- comparison (Linear hairline columns) ---------- */
.vs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.vs-col { padding: 26px clamp(14px, 2vw, 30px) 8px; display: grid; gap: 14px; align-content: start; }
.vs-col + .vs-col { border-left: 1px solid var(--border); }
.vs-col:first-child { padding-left: 0; }
.vs-col h3 { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 32px; line-height: 1; }
.vs-col small { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute-2); }
.vs-col ul { list-style: none; display: grid; gap: 10px; margin-top: 6px; }
.vs-col li { font-size: 15px; color: var(--ink-soft); display: flex; gap: 10px; }
.vs-col li::before { content: '\2013'; color: var(--mute-2); }
.vs-col.us { background: linear-gradient(180deg, rgba(77,126,255,0.12), transparent 80%); border-radius: 0 0 18px 18px; }
.vs-col.us h3 { color: var(--accent-glow); }
.vs-col.us li { color: var(--ink); }
.vs-col.us li::before { content: '+'; color: var(--accent-glow); font-family: var(--mono); }
@media (max-width: 860px) {
  .vs { grid-template-columns: 1fr; }
  .vs-col { padding-left: 0; }
  .vs-col + .vs-col { border-left: 0; border-top: 1px solid var(--border); }
  .vs-col.us { padding: 26px 18px 18px; border-radius: 18px; }
}

/* ---------- Noxediem / Oaksun: full-screen case files that stack ---------- */
.cfs { position: relative; }
.cf {
  position: sticky; top: 0;
  min-height: 100vh; min-height: 100svh;
  display: grid; align-items: center;
  padding: clamp(92px, 11vh, 128px) 0 clamp(40px, 6vh, 72px);
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.cf:nth-child(even) { background: #071022; }
.cf-in { max-width: var(--wrap); margin: 0 auto; width: 100%; padding-left: var(--pad-x); padding-right: var(--pad-xr); will-change: transform; transform-origin: 50% 0; }
.cf .proof { padding: 0; }
.cf .proof + .proof { border-top: 0; }
.cf-count { position: absolute; right: var(--pad-xr); top: clamp(92px, 11vh, 128px); font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--mute-2); }
@media (max-width: 960px) {
  .cf { position: relative; min-height: 0; padding: 56px 0; }
  .cf-count { display: none; }
}

/* ---------- page heads (inner pages) ---------- */
.ph { position: relative; padding: clamp(150px, 20vh, 210px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.ph-eyebrow { margin-bottom: 26px; }
.ph h1 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.03em; line-height: 0.92;
  font-size: clamp(56px, 10.4vw, 176px); max-width: 13ch; text-wrap: balance;
}
.ph h1 .it { font-style: italic; color: var(--accent-glow); }
.ph-lede { margin-top: clamp(26px, 3vw, 40px); }
.ph .rule-row { margin-top: clamp(40px, 5vw, 72px); }
.meta4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.meta4 div { display: grid; gap: 6px; }
.meta4 small { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute-2); }
.meta4 b { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(22px, 2vw, 30px); line-height: 1.05; }
.ph-note { margin-top: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--mute-2); }
@media (max-width: 760px) { .meta4 { grid-template-columns: 1fr 1fr; } }
/* the H1 is the LCP: its entrance is pure CSS, transform only */
.ph h1, .ph .ph-lede { animation: phRise 1s var(--ease-out) both; }
.ph .ph-lede { animation-delay: .08s; }
@keyframes phRise { from { transform: translateY(26px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ph h1, .ph .ph-lede { animation: none; } }

/* jump chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 9px 13px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--ink-soft);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.chips a:hover { border-color: var(--accent-glow); color: var(--ink); }

/* packages */
.pkgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); align-items: stretch; }
.pkg { border-radius: 22px; padding: clamp(24px, 2.4vw, 34px); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 18px; }
.pkg.feat { background: linear-gradient(170deg, #1a3684, #0d1d4a 70%); border-color: rgba(123,164,255,0.5); }
.pkg small { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-glow); }
.pkg h3 { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 0.95; }
.pkg .price { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--ink); }
.pkg p { color: var(--ink-soft); font-size: 15px; }
.pkg ul { list-style: none; display: grid; gap: 9px; flex: 1; }
.pkg li { font-size: 14.5px; color: var(--ink-soft); display: flex; gap: 10px; }
.pkg li::before { content: '+'; font-family: var(--mono); color: var(--accent-glow); }
.pkg li.muted { opacity: 0.6; text-decoration: line-through; }
.pkg li.muted::before { content: '\2013'; }
.pkg .btn { align-self: flex-start; }
@media (max-width: 960px) { .pkgs { grid-template-columns: 1fr; } }

/* numbered hairline list (what moves the price, what we need) */
.nlist { list-style: none; border-top: 1px solid var(--border); }
.nlist li { display: grid; grid-template-columns: 70px minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.nlist .n { font-family: var(--mono); font-size: 12px; color: var(--accent-glow); }
.nlist h3, .nlist h4 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.05; letter-spacing: -0.01em; }
.nlist p { color: var(--ink-soft); font-size: 15.5px; max-width: 52ch; }
@media (max-width: 760px) { .nlist li { grid-template-columns: 44px 1fr; } .nlist p { grid-column: 2; } }

/* process steps (stacking panels) */
.step-panel .sp-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 90px); align-items: start; }
.sp-num { font-family: var(--serif); font-size: clamp(120px, 16vw, 260px); line-height: 0.78; letter-spacing: -0.05em; color: var(--accent-glow); }
.sp-title { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.6vw, 76px); line-height: 0.95; letter-spacing: -0.02em; margin-top: 18px; }
.sp-dur { margin-top: 14px; }
.sp-desc { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; max-width: 40ch; }
.sp-points { list-style: none; display: grid; gap: 0; margin-top: 30px; border-top: 1px solid var(--border); }
.sp-points li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.sp-points .k { font-family: var(--mono); font-size: 11px; color: var(--accent-glow); padding-top: 4px; }
.sp-points h4 { font-family: var(--sans); font-weight: 500; font-size: 16px; margin-bottom: 4px; }
.sp-points p { color: var(--ink-soft); font-size: 15px; }
@media (max-width: 960px) { .step-panel .sp-grid { grid-template-columns: 1fr; } }

/* credential card */
.cred { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 22px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); position: relative; z-index: 2; margin-top: 28px; }
.sx--light .cred { background: #fff; }
.cred img { width: 120px; height: auto; border-radius: 10px; background: #fff; padding: 6px; }
.cred p { font-size: 14.5px; color: var(--ink-soft); }
.cred small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-glow); margin-bottom: 6px; }
@media (max-width: 520px) { .cred { grid-template-columns: 1fr; } }

.area-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.area-chips span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--ink-soft); }

.note-line { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14.5px; color: var(--ink-soft); max-width: 70ch; }
.note-line a { color: var(--accent-glow); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- finale (Rejouice "Get to know us") ---------- */
.fin { text-align: center; padding: clamp(120px, 16vw, 230px) 0; }
.fin .lbl { justify-content: center; }
.fin-link {
  display: inline-block; margin-top: 26px;
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.03em; line-height: 0.95;
  font-size: clamp(64px, 11vw, 190px); color: var(--paper-ink);
  text-decoration: underline; text-decoration-thickness: max(2px, 0.04em); text-underline-offset: 0.12em;
  transition: color .3s var(--ease);
}
.fin-link .it { font-style: italic; color: var(--blue); }
.fin-link:hover { color: var(--blue); }
.fin p { margin: 30px auto 0; max-width: 46ch; color: var(--paper-mute); font-size: 17px; }
.fin-meta { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-mute); }
.fin-meta a { color: var(--paper-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- footer (Rejouice) ---------- */
.ft { background: var(--night); color: var(--ink); padding: clamp(64px, 8vw, 110px) 0 0; position: relative; z-index: 1; overflow: hidden; }
.ft-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.6fr)); gap: clamp(24px, 3vw, 48px); }
.ft-tag { font-family: var(--serif); font-size: clamp(34px, 3.6vw, 56px); line-height: 1; letter-spacing: -0.02em; }
.ft-tag .it { font-style: italic; color: var(--accent-glow); }
.ft-about { margin-top: 22px; color: var(--ink-soft); font-size: 15px; max-width: 46ch; }
.ft-contact { margin-top: 22px; display: grid; gap: 4px; font-size: 15px; }
.ft-contact a { color: var(--ink); }
.ft h2 { font-family: var(--mono); font-weight: 400; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute-2); margin-bottom: 16px; }
.ft ul { list-style: none; display: grid; gap: 8px; }
.ft ul a { color: var(--ink); font-size: 15px; }
.ft ul a:hover, .ft-contact a:hover { color: var(--accent-glow); }
.ft-word {
  display: block; margin-top: clamp(56px, 7vw, 100px);
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.045em; line-height: 0.74;
  font-size: clamp(96px, 23.5vw, 400px); white-space: nowrap; text-align: center;
  padding-bottom: 0.06em;
  user-select: none;
}
.ft-word .it { font-style: italic; color: var(--accent-glow); }
.ft-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px 0 calc(22px + var(--safe-b)); border-top: 1px solid var(--border); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--mute-2); position: relative; z-index: 2; background: var(--night); }
.ft-bottom a { color: var(--ink-soft); }
@media (max-width: 860px) { .ft-top { grid-template-columns: 1fr 1fr; } .ft-top > :first-child { grid-column: 1 / -1; } }

/* phones get room above the sticky CTA bar */
@media (max-width: 860px) { .ft-bottom { padding-bottom: calc(96px + var(--safe-b)); } }

/* ---------- carried over from the first flow pass ---------- */
/* ---------- case-file modal ---------- */
.case-modal {
  position: fixed; inset: 0;
  width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--ink);
  overflow-y: auto; overscroll-behavior: contain;
}
.case-modal::backdrop { background: rgba(3,7,16,0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .3s var(--ease); }
.case-modal.is-open::backdrop { opacity: 1; }
.case-modal-panel {
  position: relative;
  width: min(1240px, calc(100% - 2 * var(--gutter)));
  margin: clamp(16px, 5vh, 56px) auto;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #0E1C38, #081226);
  box-shadow: 0 60px 140px -40px rgba(0,0,0,0.9);
  padding: clamp(22px, 3.4vw, 48px);
  transform: translateY(40px) scale(0.98); opacity: 0;
  transition: transform .45s var(--ease-out), opacity .3s var(--ease);
}
.case-modal.is-open .case-modal-panel { transform: none; opacity: 1; }
.case-modal-top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: clamp(12px, 2vw, 24px);
}
.case-modal-top .tiny-mono { color: var(--mute); }
.case-close {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong); background: rgba(5,11,24,0.6); color: var(--ink);
  cursor: pointer;
}
.case-close:hover { border-color: var(--accent-glow); }
.case-close svg { width: 16px; height: 16px; }
.case-modal .proof { padding: 0; }
.case-modal .case-ba { padding: 0; margin: 0; }
.case-modal-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px;
  margin-top: clamp(24px, 3vw, 40px); padding-top: 24px; border-top: 1px solid var(--border);
}
.case-modal-foot .acts { display: flex; gap: 10px; flex-wrap: wrap; }
html.modal-open { overflow: hidden; }
@media (max-width: 860px) {
  .case-modal-panel { width: calc(100% - 20px); margin: 10px auto 90px; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .case-modal-panel, .case-modal::backdrop { transition: none; }
}

.proof-screen.scrubbed img.proof-scroll-img { animation: none !important; }

/* ---------- work gallery ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}
.gallery-item { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 110px; }
.gallery-shot {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--border-strong); background: var(--surface);
}
.gallery-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform 1.2s var(--ease-out);
}
@media (hover: hover) { .gallery-item:hover .gallery-shot img { transform: scale(1.04); } }
.gallery-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.gallery-cap h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: -0.01em; line-height: 1.1; }
.gallery-cap span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); text-align: right; }
.gallery-item p { color: var(--mute); font-size: 15px; }
@media (max-width: 1000px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- small layout helpers for the rebuilt sections ---------- */
.cost-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 96px); align-items: end; margin-top: 30px; }
@media (max-width: 860px) { .cost-grid { grid-template-columns: 1fr; } }
.fin-h { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 40px); line-height: 1.1; letter-spacing: -0.01em; color: var(--paper-mute); margin-top: 22px; }
.quote-fig { margin: 28px 0 0; }
.quote-fig .statement { quotes: none; }
.how-head { margin-bottom: clamp(36px, 5vw, 64px); }
.how .glance { padding-bottom: 4px; }

/* inline links inside running copy are always underlined, not colour-only */
.proof-info p a, .rule-row p a, .lrow-c p a, .note-line a, .stat-note a { text-decoration: underline; text-underline-offset: 3px; }
