/* =========================================================
   Inner pages: scroll-driven galleries + page-specific bits.
   Loaded after style.css on every page except index.html.
   ========================================================= */

/* ---------- Scroll-driven gallery ----------
   Rows slide sideways as you scroll down the page (main.js).
   Odd rows travel left, even rows travel right.            */
.gstage { position: relative; height: 340vh; }
.gstage__sticky {
  position: sticky; top: 76px;
  height: calc(100vh - 76px);
  display: flex; flex-direction: column; justify-content: center; gap: var(--gutter);
  overflow: hidden;
  --rh: clamp(150px, calc((100vh - 76px - 80px) / 3), 320px);
}
.grow { width: 100%; overflow: visible; }
.gtrack { display: flex; gap: var(--gutter); width: max-content; padding-inline: var(--margin); will-change: transform; }

.gtile {
  position: relative; flex: none;
  height: var(--rh); aspect-ratio: var(--ar, 1);
  display: grid; place-items: center; text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 12px; color: var(--muted);
}
.gtile b { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.gtile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gtile--soft   { background: var(--surface); }
.gtile--tint   { background: var(--accent-soft); }
.gtile--accent { background: var(--accent); border-color: var(--accent); color: rgba(255,255,255,.75); }
.gtile--accent b { color: #fff; }
.gtile--dark   { background: #1b1b1b; border-color: #1b1b1b; color: rgba(255,255,255,.6); }
.gtile--dark b { color: #fff; }

/* ---------- Thesis page ---------- */
.steps { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.steps > * { grid-column: span 4; }
.step-num { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .gstage { height: 300vh; }
  .gstage__sticky { top: 64px; height: calc(100vh - 64px); --rh: clamp(120px, calc((100vh - 64px - 60px) / 3), 220px); }
  .steps > * { grid-column: 1 / -1; }
}

/* No motion: show the gallery as a normal wrapping grid */
@media (prefers-reduced-motion: reduce) {
  .gstage { height: auto; }
  .gstage__sticky { position: static; height: auto; overflow: visible; padding-block: 24px; }
  .gtrack { flex-wrap: wrap; width: auto; transform: none !important; }
}

/* ---------- Colour palette (same 4:3 box as an image slot) ---------- */
.palette {
  aspect-ratio: 4 / 3;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
.swatch { display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; padding: 16px; min-width: 0; }
.swatch b { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.swatch span { font-size: 12px; line-height: 1.5; opacity: .85; }
.swatch--dark  { color: #fff; }
.swatch--light { color: var(--ink); }

/* ---------- Typography section (full-width, not a card) ----------
   Without JS / with reduced motion the three parts simply stack.
   main.js adds .is-staged: one part at a time fades in as you scroll. */
.f-archivo { font-family: "Archivo", var(--font); }
.f-inter   { font-family: "Inter", var(--font); }

.type { border-top: 1px solid var(--line); margin-top: 48px; }
.type > .wrap { padding-block: 72px 24px; }
.type__intro { display: flex; flex-direction: column; gap: 18px; }
.type__lead { font-family: "Archivo", var(--font); font-size: clamp(40px, 6vw, 92px); font-weight: 800; letter-spacing: -.045em; line-height: .95; }

.type__stage { padding-bottom: 40px; }
.type__panels { display: flex; flex-direction: column; gap: 72px; }

.type__panel { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-top: 36px; border-top: 1px solid var(--line); }
.type__meta { grid-column: 1 / span 4; display: flex; flex-direction: column; gap: 12px; align-self: start; }
.type__meta h3 { font-size: 28px; }
.type__meta p:not(.eyebrow) { font-size: 15px; color: var(--muted); }
.type__meta .type__role { color: var(--accent); font-weight: 600; }
.type__body { grid-column: 6 / -1; display: flex; flex-direction: column; gap: 36px; min-width: 0; }

.type__giant { font-family: "Archivo", var(--font); font-size: clamp(60px, 9vw, 136px); font-weight: var(--w1, 800); letter-spacing: -.055em; line-height: .9; }
.type__giant--inter { font-family: "Inter", var(--font); letter-spacing: -.06em; }
.type__glyphs { font-size: clamp(18px, 2vw, 28px); line-height: 1.4; letter-spacing: -.01em; overflow-wrap: anywhere; }

.type__weights li { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: baseline; gap: 20px; padding-block: 14px; border-top: 1px solid var(--line); font-size: clamp(20px, 2.3vw, 32px); letter-spacing: -.02em; line-height: 1.15; }
.type__weights li span { font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.type__panel--pair .type__body { gap: 24px; }
.type__pair-head { font-size: clamp(36px, 5.4vw, 84px); font-weight: 800; letter-spacing: -.045em; line-height: .95; }
.type__pair-body { max-width: 58ch; font-size: 18px; line-height: 1.7; }
.type__status { display: none; }

/* staged mode: one panel at a time, each part fades in */
.type.is-staged .type__stage { height: calc(100vh + (var(--n, 3) - 1) * 70vh); padding: 0; }
.type.is-staged .type__sticky { position: sticky; top: 76px; height: calc(100vh - 76px); overflow: hidden; }
.type.is-staged .type__panels { position: relative; height: 100%; display: block; }
.type.is-staged .type__panel {
  position: absolute; left: var(--margin); right: var(--margin); top: 50%;
  transform: translateY(-50%);
  border-top: 0; padding-top: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .6s var(--ease), visibility .6s;
}
.type.is-staged .type__panel.is-active { opacity: 1; visibility: visible; }

.type.is-staged .fx { opacity: 0; transform: translateY(20px); transition: opacity .35s ease, transform .35s ease; }
.type.is-staged .is-active .fx {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 130ms + 200ms);
}
/* the big specimen grows heavier as it fades in */
.type.is-staged .type__giant { font-weight: var(--w0, 300); }
.type.is-staged .is-active .type__giant {
  font-weight: var(--w1, 800);
  transition: opacity .8s var(--ease), transform .8s var(--ease), font-weight 1.6s var(--ease);
  transition-delay: 330ms, 330ms, 330ms;
}

.type.is-staged .type__status {
  display: flex; justify-content: space-between;
  position: absolute; left: var(--margin); right: var(--margin); bottom: 24px;
  font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

@media (max-width: 860px) {
  .type > .wrap { padding-block: 48px 16px; }
  .type__panels { gap: 48px; }
  .type__meta, .type__body { grid-column: 1 / -1; }
  .type__body { margin-top: 24px; gap: 24px; }
  .type__weights li { grid-template-columns: 1fr; gap: 4px; }
  .type.is-staged .type__sticky { top: 64px; height: calc(100vh - 64px); }
  .type.is-staged .type__panel { top: 46%; }
  .type.is-staged .type__meta p:not(.eyebrow):not(.type__role) { font-size: 14px; }
  .type.is-staged .type__giant { font-size: clamp(48px, 16vw, 96px); }
  .type.is-staged .type__glyphs { display: none; }
}

/* ---------- Collateral gallery (on the 12-column grid, no boxes) ---------- */
.collateral { border-top: 1px solid var(--line); }
.collateral .wrap { padding-block: 100px 80px; display: flex; flex-direction: column; gap: 56px; }
.collateral__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 56px var(--gutter); align-items: end; }
.collateral__item { grid-column: span var(--span, 6); margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.collateral__item img { width: 100%; height: auto; border-radius: var(--radius); background: var(--surface); }
/* rows a and b share a height so each pair lines up; images are cropped to fit */
.collateral__item--a img { height: clamp(320px, 42vw, 600px); object-fit: cover; }
.collateral__item--b img { aspect-ratio: 4 / 3; object-fit: cover; }
.collateral__item figcaption { color: var(--muted); }

@media (max-width: 860px) {
  .collateral .wrap { padding-block: 56px 48px; gap: 36px; }
  .collateral__grid { gap: 36px var(--gutter); }
  .collateral__item { grid-column: 1 / -1; }
  .collateral__item--a img { height: auto; aspect-ratio: 4 / 3; }
}

/* ---------- Iconography specimen grid (12 columns, hairlines, no cards) ---------- */
.icons { border-top: 1px solid var(--line); }
.icons .wrap { padding-block: 100px 80px; display: flex; flex-direction: column; gap: 56px; }
.icons__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.icons__grid li {
  grid-column: span 2;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 16px;
  padding: 44px 0 28px;
  border-top: 1px solid var(--line);
  transition: transform .35s var(--ease);
}
.icons__grid li:hover { transform: translateY(-4px); }
.icons__grid img { height: 60px; width: auto; max-width: 84px; }
.icons__grid span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 860px) {
  .icons .wrap { padding-block: 56px 48px; gap: 36px; }
  .icons__grid li { grid-column: span 4; padding-block: 32px 20px; }
}
@media (max-width: 420px) { .icons__grid li { grid-column: span 6; } }

/* ---------- Social media: a wheel that turns as you scroll ----------
   Without JS (or with reduced motion) this is just a tidy grid.
   main.js adds .is-wheel to turn it into the scroll-driven wheel.   */
.social { border-top: 1px solid var(--line); }
.social > .wrap { padding-block: 100px 40px; }

.wheel__item { margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wheel__item img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.wheel__item figcaption { color: var(--muted); }
.wheel__status { display: none; }

.wheel__stage { padding-block: 24px 80px; }
.wheel__ring {
  max-width: var(--page-max); margin-inline: auto; padding-inline: var(--margin);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--gutter); align-items: start;
}
.wheel__item { grid-column: span 4; }
.wheel__item:nth-child(2) { grid-column: span 8; }

.wheel.is-wheel .wheel__stage { height: calc(100vh + (var(--n, 6) - 1) * 80vh); padding: 0; }
.wheel.is-wheel .wheel__sticky { position: sticky; top: 76px; height: calc(100vh - 76px); overflow: hidden; }
.wheel.is-wheel .wheel__ring { position: absolute; inset: 0; max-width: none; padding: 0; display: block; }
.wheel.is-wheel .wheel__item {
  position: absolute; left: 50%; top: 46%;
  width: min(calc(var(--w) * 1px), 56vw);
  opacity: 0; will-change: transform, opacity;
}
.wheel.is-wheel .wheel__item img { box-shadow: var(--shadow-lg); }
.wheel.is-wheel .wheel__item figcaption { display: none; }
.wheel.is-wheel .wheel__status {
  display: flex; justify-content: space-between;
  position: absolute; left: var(--margin); right: var(--margin); bottom: 28px;
  font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

@media (max-width: 860px) {
  .social > .wrap { padding-block: 56px 24px; }
  .wheel__item, .wheel__item:nth-child(2) { grid-column: 1 / -1; }
  .wheel.is-wheel .wheel__sticky { top: 64px; height: calc(100vh - 64px); }
  .wheel.is-wheel .wheel__item { width: min(calc(var(--w) * 1px), 78vw); }
}

/* ---------- Step dots (stage sections) ---------- */
.stepdots { display: flex; align-items: center; }
.stepdot { position: relative; width: 28px; height: 28px; border: 0; background: none; cursor: pointer; }
.stepdot::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--line); box-shadow: inset 0 0 0 1px #cfccc8;
  transition: transform .3s var(--ease), background .3s;
}
.stepdot.is-on::before { background: var(--accent); box-shadow: none; transform: scale(1.5); }
.stepdot:hover::before { background: var(--muted); }
.wheel.is-wheel .wheel__status, .type.is-staged .type__status { align-items: center; }


/* ---------- Logo section: the mark builds itself, then its construction ---------- */
.logo { border-top: 1px solid var(--line); }
.logo .wrap { padding-block: 64px 48px; display: flex; flex-direction: column; gap: 56px; }

.logo__top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
.logo__mark { grid-column: 1 / span 3; margin: 0; }
.logo__mark svg { width: 100%; height: auto; overflow: visible; }
.logo__intro { grid-column: 5 / span 7; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.logo__intro h2 { font-size: clamp(30px, 3.4vw, 48px); letter-spacing: -.04em; line-height: 1; }
.logo__intro p:not(.eyebrow) { max-width: 46ch; font-size: 16px; color: var(--muted); }
.logo__replay { margin-top: 8px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 100px; background: #fff; font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .25s, transform .25s var(--ease); }
.logo__replay:hover { border-color: var(--ink); transform: translateY(-2px); }

.logo__build { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
.logo__diagram { grid-column: 1 / span 4; margin: 0; }
.logo__diagram svg { width: 100%; height: auto; display: block; }
.logo__rules { grid-column: 6 / span 7; display: flex; flex-direction: column; gap: 16px; }
.logo__rules ol { display: flex; flex-direction: column; }
.logo__rules li { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 12px; padding-block: 16px; border-top: 1px solid var(--line); }
.logo__num { grid-row: 1 / span 2; font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--accent); padding-top: 4px; }
.logo__rules h3 { font-size: 18px; }
.logo__rules li p { grid-column: 2; margin-top: 4px; font-size: 14px; color: var(--muted); }

/* logomark colours */
.mark .c1 { fill: #555655; } .mark .c2 { fill: #101010; } .mark .c3 { fill: #a51e23; }
.mark .ping { fill: none; stroke-width: .6; }
.mark .ping.c1 { stroke: #555655; } .mark .ping.c2 { stroke: #101010; } .mark .ping.c3 { stroke: #a51e23; }
.mark .link { stroke: #a51e23; stroke-width: .5; opacity: 0; }
/* construction colours */
.diagram .k1 { fill: #101011; } .diagram .k2 { fill: #a51e24; } .diagram .k3 { fill: #565756; }
.diagram .k4, .diagram .k5 { fill: none; stroke: #70cddd; stroke-miterlimit: 10; }
.diagram .k4 { stroke-width: 2px; } .diagram .k5 { stroke-width: .75px; }

/* animation: hidden until the figure scrolls into view (and only when JS is on) */
.mark .dot, .mark .ping, .diagram .pop { transform-box: fill-box; transform-origin: center; }
.js [data-animate] .mark .dot, .js [data-animate] .diagram .pop { opacity: 0; transform: scale(0); }
.js [data-animate] .diagram .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js [data-animate] .mark .ping { opacity: 0; }

.js [data-animate].is-in .mark .dot { animation: dotIn .6s var(--ease) both; animation-delay: calc(var(--i) * 26ms + 200ms); }
.js [data-animate].is-in .mark .ping { animation: ping 1s ease-out both; animation-delay: calc(var(--i) * 26ms + 200ms); }
.js [data-animate].is-in .mark .link { animation: linkIn 1s ease-out both; animation-delay: calc(var(--i) * 26ms + 120ms); stroke-dasharray: var(--len); }
.js [data-animate].is-in .diagram .draw { animation: drawIn 1.2s var(--ease) both; animation-delay: var(--d); }
.js [data-animate].is-in .diagram .pop { animation: dotIn .6s var(--ease) both; animation-delay: var(--d); }

@keyframes dotIn { 0% { transform: scale(0); opacity: 0; } 55% { transform: scale(1.5); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(4.4); opacity: 0; } }
@keyframes linkIn { 0% { stroke-dashoffset: var(--len); opacity: .7; } 45% { stroke-dashoffset: 0; opacity: .7; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes drawIn { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .js [data-animate] .mark .dot, .js [data-animate] .diagram .pop { opacity: 1; transform: none; }
  .js [data-animate] .diagram .draw { stroke-dashoffset: 0; }
}

/* identity grid with a single box */
.grid > :only-child { grid-column: span 6; }

@media (max-width: 860px) {
  .logo .wrap { padding-block: 40px 32px; gap: 40px; }
  .logo__mark, .logo__intro, .logo__diagram, .logo__rules { grid-column: 1 / -1; }
  .logo__mark { max-width: 220px; margin-bottom: 20px; }
  .logo__diagram { max-width: 320px; margin-bottom: 20px; }
  .grid > :only-child { grid-column: 1 / -1; }
}

/* ---------- Wireframes (UI/UX): the home page in order, then the other pages ---------- */
.wf { border-top: 1px solid var(--line); }
.wf .wrap { padding-block: 80px 64px; display: flex; flex-direction: column; gap: 72px; }
.wf__group { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.wf__group + .wf__group { padding-top: 48px; border-top: 1px solid var(--line); }
.wf__side { grid-column: 1 / span 3; position: sticky; top: 110px; display: flex; flex-direction: column; gap: 10px; }
.wf__side h3 { font-size: 22px; }
.wf__side p:not(.eyebrow) { font-size: 15px; color: var(--muted); }

.wf__stack { grid-column: 4 / -1; display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.wf__grid { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--gutter); min-width: 0; }

.wf__item { margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wf__item img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.wf__item:hover img { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.wf__item figcaption { display: flex; gap: 14px; align-items: baseline; color: var(--muted); }
.wf__item figcaption span { color: var(--accent); font-weight: 600; }

@media (max-width: 860px) {
  .wf .wrap { padding-block: 48px 40px; gap: 48px; }
  .wf__side { grid-column: 1 / -1; position: static; margin-bottom: 20px; }
  .wf__stack, .wf__grid { grid-column: 1 / -1; }
  .wf__stack { gap: 32px; }
  .wf__grid { grid-template-columns: 1fr; gap: 32px; }
}


/* ---------- High-fidelity: final screens, mobile rail, prototype ---------- */
.hf, .mob, .proto { border-top: 1px solid var(--line); }
.hf .wrap, .mob > .wrap, .proto .wrap { padding-block: 80px 0; display: flex; flex-direction: column; gap: 40px; }
.hf .wrap { padding-bottom: 64px; }
.mob > .wrap { padding-bottom: 0; }
.proto .wrap { padding-bottom: 72px; }

/* final screens: one continuous page */
.hf__page { grid-column: 4 / -1; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.hf__page img { display: block; width: 100%; height: auto; }

/* mobile rail */
.mob__rail {
  display: flex; align-items: flex-start; gap: var(--gutter);
  padding: 40px var(--margin) 72px; margin-top: 8px;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--margin);
  -webkit-overflow-scrolling: touch;
}
.mob__rail:focus-visible { outline-offset: -4px; }
.mob__item { flex: none; width: 300px; margin: 0; display: flex; flex-direction: column; gap: 12px; scroll-snap-align: start; }
.mob__item img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); background: #fff; }
.mob__item figcaption { display: flex; gap: 14px; align-items: baseline; color: var(--muted); }
.mob__item figcaption span { color: var(--accent); font-weight: 600; }

/* prototype: a browser window you can scroll */
.proto__device { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; max-width: 1180px; width: 100%; margin-inline: auto; }
.proto__bar { display: flex; align-items: center; gap: 8px; height: 40px; padding-inline: 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.proto__bar i { width: 11px; height: 11px; border-radius: 50%; background: #d9d6d2; }
.proto__bar span { margin-left: 14px; font-size: 12px; color: var(--muted); }
.proto__view { position: relative; height: min(70vh, 680px); overflow-y: auto; overscroll-behavior: contain; background: #fff; }
.proto__view:focus-visible { outline-offset: -4px; }
.proto__nav { position: sticky; top: 0; z-index: 3; width: 100%; aspect-ratio: 1440 / 72; background-size: 100% auto; background-position: top left; background-repeat: no-repeat; }
.proto__shot { position: relative; }
.proto__shot img { display: block; width: 100%; height: auto; }
.proto__shot:first-of-type { margin-top: calc(-100% * 72 / 1440); }
.hot { position: absolute; top: 0; height: 100%; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; transition: box-shadow .2s, background .2s; }
.hot:hover, .hot:focus-visible { background: rgba(255,255,255,.14); box-shadow: 0 0 0 2px rgba(255,255,255,.7); outline: none; }
.hot--cue { z-index: 2; }
.proto__hint { text-align: center; font-size: 13px; color: var(--muted); }

@media (max-width: 860px) {
  .hf .wrap, .mob > .wrap, .proto .wrap { padding-block: 48px 0; gap: 28px; }
  .hf .wrap { padding-bottom: 40px; }
  .proto .wrap { padding-bottom: 48px; }
  .hf__page { grid-column: 1 / -1; }
  .mob__rail { padding-block: 28px 48px; }
  .proto__view { height: 62vh; }
}


/* ---------- User flow ---------- */
.flow { border-top: 1px solid var(--line); }
.flow .wrap { padding-block: 80px 72px; display: flex; flex-direction: column; gap: 32px; }
.flow__scroll { overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.flow__scroll:focus-visible { outline-offset: 2px; }
.flow__svg { display: block; width: 100%; min-width: 980px; height: auto; }
.flow__svg text { font-family: var(--font); fill: var(--ink); }
.flow__svg .n { fill: #fff; stroke: #cfccc8; stroke-width: 1.2; }
.flow__svg .n--soft { fill: var(--surface); stroke: #cfccc8; stroke-dasharray: 5 5; }
.flow__svg .n--start { fill: var(--ink); stroke: var(--ink); }
.flow__svg .n--end { fill: var(--accent); stroke: var(--accent); stroke-dasharray: none; }
.flow__svg .badge { fill: var(--accent); }
.flow__svg .badge--on { fill: #fff; }
.flow__svg .badge--on + .badge-t { fill: var(--ink); }
.flow__svg .badge-t { fill: #fff; font-size: 12px; font-weight: 600; }
.flow__svg .t { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.flow__svg .t--on { fill: #fff; }
.flow__svg .s { font-size: 12px; fill: var(--muted); }
.flow__svg .s--on { fill: rgba(255,255,255,.78); }
.flow__svg .e { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; fill: var(--muted); }
.flow__svg .c, .flow__svg .c2 { font-size: 12px; fill: var(--muted); }
.flow__svg .c2 { font-size: 13px; fill: var(--ink); }
.flow__svg .d { font-size: 13px; font-weight: 600; }
.flow__svg .lbl { font-size: 11px; font-weight: 600; fill: var(--accent); }
.flow__svg .dia { fill: #fff; stroke: var(--ink); stroke-width: 1.4; }
.flow__svg .frame { fill: none; stroke: #cfccc8; stroke-width: 1.2; }
.flow__svg .a { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.flow__svg .a--dash { stroke: #b9b5b0; stroke-dasharray: 4 5; }
.flow__legend { display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.flow__legend .k { display: inline-block; width: 22px; height: 12px; margin-right: -12px; border-radius: 4px; border: 1.2px solid #cfccc8; background: #fff; }
.flow__legend .k--dash { border-style: dashed; background: var(--surface); }
.flow__legend .k--end { background: var(--accent); border-color: var(--accent); }

.flow__journey { display: flex; flex-direction: column; gap: 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.flow__cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gutter); }
.flow__cols article { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.flow__num { font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--accent); }
.flow__cols h3 { font-size: 17px; }
.flow__quote { font-size: 14px; line-height: 1.6; color: var(--ink); }
.flow__opp { font-size: 13px; line-height: 1.6; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.flow__opp b { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

@media (max-width: 1100px) { .flow__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px var(--gutter); } }
@media (max-width: 860px) {
  .flow .wrap { padding-block: 48px 40px; gap: 24px; }
  .flow__cols { grid-template-columns: 1fr; }
}


/* Sketches use the same sideways rail as the mobile screens, with larger cards */
.sk .mob__item { width: 380px; }
.sk .mob__item img { border-radius: 12px; }
@media (max-width: 860px) { .sk .mob__item { width: 280px; } }


/* ---------- Tools field: logos only ---------- */
.meta dd .tool-logos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.meta dd .tool-logos li { display: block; }
.meta dd .tool-logos img { width: 36px; height: 36px; border-radius: 9px; box-shadow: var(--shadow); transition: transform .25s var(--ease); }
.meta dd .tool-logos li:hover img { transform: translateY(-3px); }


/* ---------- Aioni: typography, icons on dark, five-colour palette ---------- */
.f-gsf { font-family: "Google Sans Flex", var(--font); }
.f-ss4 { font-family: "Source Serif 4", Georgia, serif; }
.type--aioni .type__lead, .type--aioni .type__giant, .type--aioni .type__pair-head { font-family: "Google Sans Flex", var(--font); }
.type--aioni .type__giant { font-size: clamp(48px, 6.4vw, 96px); line-height: .95; letter-spacing: -.045em; }
.type--aioni .type__giant--serif { font-family: "Source Serif 4", Georgia, serif; letter-spacing: -.03em; }

.icons--dark .icons__grid { background: #161616; border-radius: 22px; box-shadow: 0 0 0 28px #161616; margin: 28px 0; }
.icons--dark .icons__grid li { border-top-color: rgba(255,255,255,.14); }
.icons--dark .icons__grid li:nth-child(-n+6) { border-top-color: transparent; }
.icons--dark .icons__grid span { color: #b9b9b9; }

.palette--5 { grid-template-columns: repeat(6, 1fr); }
.palette--5 .swatch:nth-child(-n+2) { grid-column: span 3; }
.palette--5 .swatch:nth-child(n+3) { grid-column: span 2; }
.palette--5 .swatch span { font-size: 11px; }
@media (max-width: 860px) {
  .type--aioni.is-staged .type__giant { font-size: clamp(34px, 10.5vw, 70px); }
}


/* ---------- Aioni: logo section ---------- */
.alogo { border-top: 1px solid var(--line); }
.alogo .wrap { padding-block: 80px 64px; display: flex; flex-direction: column; gap: 40px; }
.alogo__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--gutter); align-items: start; }
.alogo__item { margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.alogo__item figcaption { color: var(--muted); }
.alogo__panel { display: grid; place-items: center; height: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 40px; }
.alogo__panel img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.alogo__row--a .alogo__item { height: 100%; }
.alogo__full { grid-column: 1 / span 8; }
.alogo__mark { grid-column: 9 / -1; }
.alogo__row--a .alogo__panel { min-height: 360px; }
.alogo__full .alogo__panel img { width: min(100%, 520px); }
.alogo__mark .alogo__panel { background: #161616; border-color: #161616; }
.alogo__mark .alogo__panel img { width: min(100%, 220px); }
.alogo__third { grid-column: span 4; }
.alogo__row--b .alogo__panel { height: 400px; padding: 28px; }
.alogo__row--b .alogo__panel img { max-height: 344px; }

/* ---------- Aioni: illustration ---------- */
.ill { border-top: 1px solid var(--line); }
.ill .wrap { padding-block: 80px 64px; display: flex; flex-direction: column; gap: 40px; }
.ill__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--gutter); align-items: start; }
.ill__main { grid-column: 1 / span 5; margin: 0; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 100px; }
.ill__main img { width: 100%; height: auto; }
.ill__side { grid-column: 7 / -1; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.ill__side figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ill__card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 28px; display: grid; place-items: center; }
.ill__card img { width: 100%; max-width: 520px; height: auto; }
.ill figcaption { color: var(--muted); }

/* ---------- Aioni: email signature ---------- */
.collateral .sig { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

@media (max-width: 860px) {
  .alogo .wrap, .ill .wrap { padding-block: 48px 40px; gap: 28px; }
  .alogo__full, .alogo__mark, .alogo__third { grid-column: 1 / -1; }
  .alogo__row--a .alogo__panel { min-height: 240px; }
  .alogo__row--b .alogo__panel { height: 320px; }
  .ill__main, .ill__side { grid-column: 1 / -1; position: static; }
}


/* ---------- Aioni UI/UX: wide sketch sheet ---------- */
.sk-wide { border-top: 1px solid var(--line); }
.sk-wide > .wrap { padding-block: 80px 0; }
.sk-wide__scroll { overflow-x: auto; padding: 40px var(--margin) 72px; -webkit-overflow-scrolling: touch; }
.sk-wide__scroll:focus-visible { outline-offset: -4px; }
.sk-wide__scroll img { display: block; width: max(100%, 1500px); max-width: none; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); background: #fff; }
@media (max-width: 860px) { .sk-wide > .wrap { padding-block: 48px 0; } .sk-wide__scroll { padding-block: 28px 48px; } .sk-wide__scroll img { width: 1200px; } }

/* cropped screen (top bar removed) */
.crop { overflow: hidden; }
.crop img { display: block; width: 100%; height: auto; }

/* two-row galleries: taller tiles so the rows are wide enough to travel */
.gstage--2 .gstage__sticky { --rh: clamp(170px, calc((100vh - 76px - 64px) / 2), 440px); }
@media (max-width: 860px) { .gstage--2 .gstage__sticky { --rh: clamp(130px, calc((100vh - 64px - 48px) / 2), 280px); } }

/* Revey logo: a light panel for the plum mark */
.alogo__rmark { grid-column: 9 / -1; }
.alogo__rmark .alogo__panel img { width: min(100%, 200px); }
@media (max-width: 860px) { .alogo__rmark { grid-column: 1 / -1; } }

/* ---------- Revey ---------- */
.f-pacifico { font-family: "Pacifico", cursive; }
.f-poppins { font-family: "Poppins", var(--font); }
.type--revey .type__lead, .type--revey .type__giant, .type--revey .type__pair-head { font-family: "Pacifico", cursive; }
.type--revey .type__giant { font-size: clamp(48px, 7vw, 108px); line-height: 1.1; letter-spacing: 0; font-weight: 400; }
.type--revey .type__giant--poppins { font-family: "Poppins", var(--font); letter-spacing: -.04em; line-height: .95; font-weight: var(--w1, 600); }
.palette--4 { aspect-ratio: auto; grid-template-columns: repeat(4, 1fr); grid-template-rows: none; }
.palette--4 .swatch { min-height: 150px; }
.relements { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--gutter); }
.relements figure { grid-column: span 4; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.relements figure:nth-child(n+4) { grid-column: span 6; }
.relements__panel { display: grid; place-items: center; height: 280px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 32px; }
.relements__panel img { max-width: 100%; max-height: 216px; width: auto; height: auto; }
.relements figcaption { color: var(--muted); }
@media (max-width: 860px) { .palette--4 { grid-template-columns: 1fr 1fr; } .relements figure, .relements figure:nth-child(n+4) { grid-column: 1 / -1; } .relements__panel { height: 220px; } .relements__panel img { max-height: 156px; } }

/* ---------- Videos page: two across on desktop, one on phones ---------- */
.vids > * { grid-column: span 6; }
.vids video { object-fit: contain; display: block; width: 100%; height: auto; border-radius: var(--radius); background: #000; box-shadow: var(--shadow); }
@media (max-width: 860px) { .vids > * { grid-column: 1 / -1; } }

/* ---------- Results: before / after, key numbers, chart ---------- */
.beforeafter > * { grid-column: span 6; }
.stats { list-style: none; margin: var(--gutter) 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.stats li { display: flex; flex-direction: column; gap: 4px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.stats b { font-size: clamp(30px, 3.6vw, 46px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; color: #a51e23; }
.stats span { font-weight: 600; font-size: 14px; }
.stats small { font-size: 12px; color: var(--muted); }
.stats__chart { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.stats__chart div { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stats__chart img { display: block; width: 100%; min-width: 640px; height: auto; }
.stats__chart figcaption { color: var(--muted); }
@media (max-width: 860px) { .beforeafter > * { grid-column: 1 / -1; } .stats { grid-template-columns: 1fr 1fr; } .stats li { padding: 18px; } }

/* two overview cards share the row evenly */
.grid > .card:first-child:nth-last-child(2),
.grid > .card:first-child:nth-last-child(2) ~ .card { grid-column: span 6; }
@media (max-width: 860px) {
  .grid > .card:first-child:nth-last-child(2),
  .grid > .card:first-child:nth-last-child(2) ~ .card { grid-column: 1 / -1; }
}
