/* ============================================================
   STWIR Hong Kong Limited — stylesheet
   Light "daylight lab" system: warm paper, ink, apricot sun,
   pastel panels, big tight grotesk with a serif-italic accent
   ============================================================ */

/* ---- 1. Tokens ---- */
:root {
  --paper:    #f6f3ec;
  --paper-2:  #efeadf;
  --card:     #ffffff;
  --ink:      #161614;
  --ink-2:    #3f3e3a;
  --mute:     #76746c;
  --faint:    #a5a299;
  --line:     rgba(22,22,20,.13);
  --line-2:   rgba(22,22,20,.07);
  --line-hard:rgba(22,22,20,.3);
  --ember:    #e4572e;
  --ember-2:  #c5431d;
  --sun:      #f6b24a;
  --apricot:  #fbdcb6;
  --t-sage:   #e1ebe3;
  --t-peach:  #f9e2d0;
  --t-butter: #f5eac6;
  --t-sky:    #dce7ee;
  --t-lilac:  #e7e2ee;
  --t-sand:   #efe9dd;

  --f-head:  "Inter Tight", "Instrument Sans", -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  --f-sans:  "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Helvetica, Arial, sans-serif;
  --f-serif: "Instrument Serif", "Iowan Old Style", "Songti SC", Georgia, serif;
  --f-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gut: clamp(1rem, 4vw, 2.25rem);
  --maxw: 1200px;
  --narrow: 760px;
  --sec: clamp(4rem, 9vw, 7.5rem);
  --hdr: 68px;
  --r-card: 20px;
  --r-panel: clamp(22px, 3vw, 36px);
  --ease: cubic-bezier(.2,.7,.2,1);
}
html[lang^="zh"] {
  --f-head: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Inter Tight", sans-serif;
  --f-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Instrument Sans", sans-serif;
  --f-serif: "Noto Serif SC", "Songti SC", "STSong", "Instrument Serif", serif;
}
html[lang="zh-HK"] {
  --f-head: "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", "Inter Tight", sans-serif;
  --f-sans: "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", "Instrument Sans", sans-serif;
  --f-serif: "Noto Serif HK", "Songti TC", "PMingLiU", "Instrument Serif", serif;
}
html[lang="zh-TW"] {
  --f-head: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Inter Tight", sans-serif;
  --f-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Instrument Sans", sans-serif;
  --f-serif: "Noto Serif TC", "Songti TC", "PMingLiU", "Instrument Serif", serif;
}
html[lang="ja"] {
  --f-head: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Inter Tight", sans-serif;
  --f-sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Instrument Sans", sans-serif;
  --f-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "Instrument Serif", serif;
  line-break: strict;
}
html[lang="ko"] {
  --f-head: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Inter Tight", sans-serif;
  --f-sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Instrument Sans", sans-serif;
  --f-serif: "Noto Serif KR", "AppleMyungjo", "Batang", "Instrument Serif", serif;
  word-break: keep-all; overflow-wrap: break-word;   /* Korean breaks between words, not inside them */
}
html[lang="ja"] :is(h1, h2, h3, .lead) { word-break: auto-phrase; overflow-wrap: anywhere; }   /* break between phrases where the browser can; a phrase longer than the line may still be cut */

/* ---- 2. Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 20px); background: var(--paper); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--apricot); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 300; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 0 0 12px 0; }
.skip:focus { left: 0; }
#stars { display: none; }
main, header, footer { position: relative; z-index: 2; }

/* ---- 3. Layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.wrap--narrow { max-width: var(--narrow); }
.section { padding-block: var(--sec); position: relative; }
.section--tight { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
/* alternating sections become inset, softly rounded panels */
.section--alt { background: var(--paper-2); border-radius: var(--r-panel); margin-inline: clamp(.5rem, 1.4vw, 1.25rem); }
.section--line { border-top: 0; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.shead {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.shead--stack { grid-template-columns: 1fr; }
.shead--stack .h2 { max-width: 20ch; }
@media (max-width: 820px) { .shead { grid-template-columns: 1fr; gap: .9rem; } }
.shead .lead { margin-top: 0; }

/* ---- 4. Type ---- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex; align-items: center; gap: .7em;
  margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); }
.eyebrow .idx { color: var(--faint); }
.eyebrow--bare::before { display: none; }

h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 500; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; color: var(--ink); }
h1 em, h2 em, .h1 em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; font-size: 1.06em; }
html:is([lang^="zh"], [lang="ja"], [lang="ko"]) :is(h1, h2) em { font-family: inherit; font-style: normal; font-size: 1em; letter-spacing: inherit; color: var(--ember-2); }
.h-hero { font-size: clamp(2.8rem, 6.6vw, 5.7rem); line-height: .97; letter-spacing: -.048em; }
.h-hero .nb { display: inline-block; max-width: 100%; }   /* a piece of the headline that stays on one line while it fits (see h1split in build.py) */
html:is([lang^="zh"], [lang="ja"], [lang="ko"]) .h-hero { font-size: clamp(2.4rem, 6vw, 5.2rem); line-height: 1.1; letter-spacing: -.02em; }
.h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); letter-spacing: -.045em; line-height: 1; }
.h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); letter-spacing: -.042em; line-height: 1; }
.h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.15; letter-spacing: -.025em; }
.h4 { font-family: var(--f-sans); font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; line-height: 1.3; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.22rem); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; letter-spacing: -.008em; }
.soft { color: var(--ink-2); }
.muted { color: var(--mute); font-size: .95rem; }
.small { font-size: .86rem; color: var(--mute); line-height: 1.55; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: 1rem; }
.prose { max-width: 70ch; }
.prose p { color: var(--ink-2); margin-bottom: 1rem; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: 2.6rem 0 .8rem; letter-spacing: -.03em; }
.prose h3 { font-size: 1.1rem; margin: 1.7rem 0 .5rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.2rem; color: var(--ink-2); }
.prose li { margin-bottom: .4rem; }
.prose a, .link { color: var(--ember-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---- 5. Buttons ---- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .86em 1.45em;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: .93rem; font-weight: 500; letter-spacing: -.005em;
  cursor: pointer; white-space: nowrap;
  transition: transform .3s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .3s;
}
.btn:hover { background: var(--ember); border-color: var(--ember); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(228,87,46,.7); }
.btn svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--line { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn--line:hover { background: var(--card); color: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn--light { background: var(--ink); color: var(--paper); }
.btn--ghost-light { background: transparent; color: var(--ink); border-color: var(--line-hard); }
.btn--sm { padding: .62em 1.1em; font-size: .85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.more {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .95rem; font-weight: 500; color: var(--ember-2);
  transition: gap .25s var(--ease), color .2s;
}
.more svg { width: 14px; height: 14px; }
.more:hover { gap: .85em; color: var(--ink); }

/* ---- 6. Header ---- */
.hdr {
  position: sticky; top: 0; z-index: 100;
  height: var(--hdr);
  background: rgba(246,243,236,.7);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.hdr.is-stuck { border-color: var(--line); background: rgba(246,243,236,.88); }
.hdr__in { height: 100%; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); flex: none; }
.brand__mark { width: 28px; height: 28px; color: var(--ink); }
/* the two lines of the name are centred on each other; letter-spacing adds a gap after the last letter too, which the negative
   margin takes back - otherwise the shorter line would sit visibly left of centre */
.brand__name { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.brand__name b { font-family: var(--f-mono); font-weight: 500; font-size: 15px; letter-spacing: .24em; margin-right: -.24em; color: var(--ink); }
.brand__name span { font-size: 9px; letter-spacing: .22em; margin-right: -.22em; text-transform: uppercase; color: var(--mute); margin-top: 3px; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: .1rem; margin-left: auto; }
.nav a { padding: .45rem .78rem; font-size: .9rem; color: var(--ink-2); border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: rgba(22,22,20,.06); }
.nav a.is-active { color: var(--ink); background: rgba(22,22,20,.07); }
.nav__cta { display: none; }
.hdr__end { display: flex; align-items: center; gap: .5rem; flex: none; }

.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .55em .85em;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.lang__btn:hover { border-color: var(--ink); color: var(--ink); }
.lang__btn svg { width: 9px; height: 9px; transition: transform .25s; }
.lang[data-open="true"] .lang__btn svg { transform: rotate(180deg); }
.lang__menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 228px; max-height: calc(100vh - var(--hdr) - 24px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 50px -20px rgba(22,22,20,.28);
  padding: .35rem;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.lang[data-open="true"] .lang__menu { opacity: 1; visibility: visible; transform: none; }
.lang__menu a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .5rem .75rem; font-size: .88rem; border-radius: 11px; color: var(--ink-2); white-space: nowrap; }
.lang__menu a:hover { background: var(--paper); color: var(--ink); }
.lang__menu a.is-current { color: var(--ember-2); }
.lang__menu a span { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; opacity: .6; }

.burger { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.burger span { position: relative; display: block; width: 16px; height: 1.5px; background: var(--ink); transition: background .2s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), top .2s; }
.burger span::before { top: -5px; } .burger span::after { top: 5px; }
body.nav-open .burger span { background: transparent; }
body.nav-open .burger span::before { top: 0; transform: rotate(45deg); }
body.nav-open .burger span::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 1040px) {
  .burger { display: inline-flex; }
  .hdr__end { margin-left: auto; }
  .hdr__end .btn { display: none; }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--hdr);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gut) 1.5rem;
    bottom: 0; overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  body.nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  body.nav-open .hdr { background: var(--paper); }
  .nav a { padding: 1rem .25rem; font-family: var(--f-head); font-size: 1.5rem; letter-spacing: -.03em; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a:hover, .nav a.is-active { background: transparent; }
  .nav__cta { display: block; color: var(--ember-2) !important; }
}

/* ---- 7. Hero (generic two-column, used by the fallback) ---- */
.hero { position: relative; overflow: hidden; }
.stage { position: relative; aspect-ratio: 1 / 1; max-width: 560px; width: 100%; margin-inline: auto; perspective: 1100px; perspective-origin: 50% 40%; }
.stage__floor {
  position: absolute; left: -30%; right: -30%; top: 42%; height: 90%;
  transform: rotateX(74deg); transform-origin: 50% 0;
  background-image: linear-gradient(to right, rgba(22,22,20,.1) 1px, transparent 1px), linear-gradient(to bottom, rgba(22,22,20,.1) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 10%, transparent 75%);
  pointer-events: none;
}
.stage__glow { position: absolute; inset: 8%; border-radius: 50%; background: linear-gradient(180deg, #fdead3, #f9d2a4); pointer-events: none; }
.plate3d {
  position: absolute; left: 50%; top: 50%;
  width: 58%; aspect-ratio: 1 / 1;
  transform-style: preserve-3d; container-type: inline-size;
  transform: translate(-50%, -50%) rotateX(var(--rx, 52deg)) rotateY(var(--ry, 0deg)) rotateZ(-18deg);
  transition: transform .9s var(--ease);
  will-change: transform;
}
.stage.is-live .plate3d { transition: none; }
.plate3d__inner { position: absolute; inset: 0; transform-style: preserve-3d; animation: bob 7s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateZ(0); } 50% { transform: translateZ(26px); } }
.plate3d__face { position: absolute; inset: 0; border-radius: 6px; backface-visibility: hidden; }
.plate3d__face--top {
  transform: translateZ(8px);
  background:
    radial-gradient(120% 90% at var(--sx, 30%) var(--sy, 25%), rgba(255,255,255,.95), rgba(255,255,255,0) 42%),
    linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,255,255,.4));
  border: 1px solid rgba(22,22,20,.55);
  box-shadow: 0 30px 60px -30px rgba(22,22,20,.35);
  overflow: hidden;
}
.plate3d__lattice { position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(22,22,20,.16) 1px, transparent 1px), linear-gradient(to bottom, rgba(22,22,20,.16) 1px, transparent 1px); background-size: 12.5% 12.5%; }
.plate3d__lattice::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(22,22,20,.5) 1px, transparent 1.6px); background-size: 12.5% 12.5%; background-position: 6.25% 6.25%; }
.plate3d__label { position: absolute; left: 7%; bottom: 6%; font-family: var(--f-mono); font-size: clamp(.5rem, 1.1vw, .66rem); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.plate3d__label b { display: block; font-weight: 500; color: var(--ember-2); font-size: 1.35em; letter-spacing: .06em; margin-bottom: .25em; }
.plate3d__face--bottom { transform: translateZ(-8px) rotateY(180deg); background: rgba(255,255,255,.6); border: 1px solid rgba(22,22,20,.3); }
.plate3d__side { position: absolute; background: linear-gradient(90deg, rgba(200,204,200,.9), rgba(255,255,255,.9), rgba(200,204,200,.9)); backface-visibility: hidden; }
.plate3d__side--n, .plate3d__side--s { left: 0; width: 100%; height: 16px; top: calc(50% - 8px); }
.plate3d__side--w, .plate3d__side--e { top: 0; height: 100%; width: 16px; left: calc(50% - 8px); }
.plate3d__side--n { transform: translateY(-50cqw) rotateX(90deg); }
.plate3d__side--s { transform: translateY(50cqw) rotateX(-90deg); }
.plate3d__side--w { transform: translateX(-50cqw) rotateY(-90deg); }
.plate3d__side--e { transform: translateX(50cqw) rotateY(90deg); }
.plate3d__shadow { position: absolute; inset: 6%; transform: translateZ(-70px); background: radial-gradient(circle, rgba(22,22,20,.28), transparent 65%); filter: blur(18px); }
.hud { position: absolute; inset: 0; pointer-events: none; transform: translate(var(--hx, 0px), var(--hy, 0px)); transition: transform .9s var(--ease); }
.stage.is-live .hud { transition: none; }
.callout {
  position: absolute; z-index: 3;
  display: grid; gap: .1rem;
  padding: .55rem .85rem;
  background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .03em; line-height: 1.35;
}
.callout b { font-weight: 500; color: var(--mute); text-transform: uppercase; font-size: .58rem; letter-spacing: .14em; }
.callout span { color: var(--ink); white-space: nowrap; }
.callout--tl { left: 0; top: 10%; } .callout--tr { right: 0; top: 20%; }
.callout--bl { left: 2%; bottom: 14%; } .callout--br { right: 0; bottom: 6%; }
.drawing__cap { display: none; }

/* ---- 8. Readout strip ---- */
.readout { border-bottom: 1px solid var(--line); }
.readout__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.readout__item { padding: clamp(1.6rem, 3vw, 2.4rem) clamp(.9rem, 2vw, 1.6rem); border-left: 1px solid var(--line); }
.readout__item:first-child { border-left: 0; padding-left: 0; }
.readout__val { font-family: var(--f-head); font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 500; line-height: 1; letter-spacing: -.045em; color: var(--ink); display: flex; align-items: baseline; gap: .35em; flex-wrap: wrap; }
.readout__val small { font-family: var(--f-mono); font-size: .36em; letter-spacing: .04em; color: var(--ember-2); font-weight: 500; }
.readout__lbl { margin-top: .7rem; font-size: .84rem; color: var(--mute); line-height: 1.45; max-width: 24ch; }
@media (max-width: 760px) {
  .readout__grid { grid-template-columns: 1fr 1fr; }
  .readout__item:nth-child(odd) { border-left: 0; padding-left: 0; }
  .readout__item:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.hudbox { position: relative; }

/* ---- 9. Property tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 820px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--card); padding: 1.6rem 1.5rem 1.5rem; border-radius: var(--r-card); transition: transform .35s var(--ease); min-height: 172px; display: flex; flex-direction: column; }
.tile:hover { transform: translateY(-3px); }
.tile:nth-child(6n+1) { background: var(--t-peach); }
.tile:nth-child(6n+2) { background: var(--t-sage); }
.tile:nth-child(6n+3) { background: var(--t-sky); }
.tile:nth-child(6n+4) { background: var(--t-butter); }
.tile:nth-child(6n+5) { background: var(--t-lilac); }
.tile:nth-child(6n+6) { background: var(--card); }
.tile__v { font-family: var(--f-head); font-size: clamp(1.7rem, 2.9vw, 2.3rem); font-weight: 500; line-height: 1; letter-spacing: -.04em; color: var(--ink); display: flex; align-items: baseline; gap: .35em; flex-wrap: wrap; }
.tile__v small { font-family: var(--f-mono); font-size: .4em; letter-spacing: .03em; color: var(--ink-2); }
.tile__l { margin-top: auto; padding-top: 1.4rem; font-size: .92rem; color: var(--ink); line-height: 1.35; }
.tile__n { margin-top: .3rem; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .02em; color: var(--mute); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split--even { grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 860px) { .split, .split--even { grid-template-columns: 1fr; } }

/* ---- 10. Catalogue index ---- */
.cat { border-top: 1px solid var(--ink); }
.cat__head { display: grid; grid-template-columns: 72px minmax(0, 1.6fr) minmax(0, 1fr) 44px; gap: 1.25rem; padding: .7rem .75rem; margin-inline: -.75rem; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); border-bottom: 1px solid var(--line); }
.cat__row {
  display: grid; grid-template-columns: 72px minmax(0, 1.6fr) minmax(0, 1fr) 44px; gap: 1.25rem; align-items: center;
  padding: 1.35rem .75rem; margin-inline: -.75rem;
  position: relative; border-radius: 16px;
  transition: background .25s;
}
.cat__row::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: 0; height: 1px; background: var(--line); transition: opacity .2s; }
.cat__row:hover { background: var(--card); }
.cat__row:hover::after { opacity: 0; }
.cat__code { width: 48px; height: 48px; display: grid; place-items: center; color: var(--ink); font-family: var(--f-head); font-size: 1.25rem; font-weight: 500; border-radius: 50%; background: var(--t-sage); }
.cat__row:nth-child(7n+2) .cat__code { background: var(--t-peach); }
.cat__row:nth-child(7n+3) .cat__code { background: var(--t-sage); }
.cat__row:nth-child(7n+4) .cat__code { background: var(--t-sky); }
.cat__row:nth-child(7n+5) .cat__code { background: var(--t-butter); }
.cat__row:nth-child(7n+6) .cat__code { background: var(--t-lilac); }
.cat__row:nth-child(7n+7) .cat__code { background: var(--apricot); }
.cat__row:nth-child(7n+8) .cat__code { background: var(--card); }
.cat__name { font-family: var(--f-head); font-weight: 500; font-size: 1.35rem; line-height: 1.15; letter-spacing: -.03em; margin-bottom: .3rem; color: var(--ink); }
.cat__desc { font-size: .92rem; color: var(--mute); line-height: 1.5; max-width: 52ch; }
.cat__spec { font-family: var(--f-mono); font-size: .74rem; line-height: 1.6; color: var(--ink-2); letter-spacing: .01em; }
.cat__arrow { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--card); transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease); }
.cat__arrow svg { width: 14px; height: 14px; }
.cat__row:hover .cat__arrow { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: translateX(3px); }
@media (max-width: 760px) {
  .cat__head { display: none; }
  .cat__row { grid-template-columns: 56px 1fr; grid-template-areas: "code name" "spec spec"; gap: .7rem 1rem; }
  .cat__code { grid-area: code; }
  .cat__body { grid-area: name; }
  .cat__spec { grid-area: spec; padding-left: calc(56px + 1rem); }
  .cat__arrow { display: none; }
}

/* ---- 11. Growth routes: two tinted cards ---- */
.band { position: relative; }
.routes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 820px) { .routes { grid-template-columns: 1fr; } }
.route { padding: clamp(1.75rem, 3.5vw, 2.75rem); border-radius: var(--r-panel); background: var(--t-peach); display: flex; flex-direction: column; min-height: 340px; }
.route + .route { background: var(--t-sky); }
.route__k { align-self: flex-start; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); padding: .45em .9em; border-radius: 999px; background: rgba(255,255,255,.7); margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.route h3 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); letter-spacing: -.04em; margin-bottom: 1rem; }
.route p { color: var(--ink-2); max-width: 54ch; font-size: .98rem; }
.route .tags { margin-top: auto; padding-top: 1.6rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1.1rem; }
.tag { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; padding: .42em .75em; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); white-space: nowrap; background: rgba(255,255,255,.55); }

/* ---- 12. Chain stepper ---- */
.chain { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; counter-reset: st; }
@media (max-width: 1000px) { .chain { grid-template-columns: repeat(3, 1fr); row-gap: 2.5rem; } }
@media (max-width: 640px) { .chain { grid-template-columns: 1fr; gap: 0; } }
.step { position: relative; padding-top: 3.2rem; border-top: 1px solid var(--ink); counter-increment: st; }
.step::before { content: counter(st, decimal-leading-zero); position: absolute; top: .9rem; left: 0; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; color: var(--ember-2); }
.step h3 { font-size: 1.22rem; letter-spacing: -.03em; margin-bottom: .6rem; }
.step p { font-size: .9rem; color: var(--mute); line-height: 1.55; }
.step .tags { margin-top: .9rem; }
@media (max-width: 640px) { .step { padding: 1.4rem 0 1.5rem 3rem; border-top: 1px solid var(--line); } .step::before { top: 1.55rem; } .step:last-child { border-bottom: 1px solid var(--line); } }
.chain-v { display: grid; }
.chain-v .step { display: grid; grid-template-columns: 70px 1fr; gap: 1.5rem; padding: 1.8rem 0; border-top: 1px solid var(--line); }
.chain-v .step::before { position: static; padding: .3em 0 0; font-size: .8rem; }
.chain-v .step:last-child { border-bottom: 1px solid var(--line); }
.chain-v .step h3 { font-size: 1.5rem; }
.chain-v .step p { max-width: 66ch; font-size: .96rem; color: var(--ink-2); }
@media (max-width: 640px) { .chain-v .step { grid-template-columns: 1fr; gap: .4rem; padding-left: 0; } }

/* ---- 13. Market cards ---- */
.mcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 920px) { .mcards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .mcards { grid-template-columns: 1fr; } }
.mcard { background: var(--card); padding: 1.7rem 1.5rem 1.6rem; border-radius: var(--r-card); position: relative; transition: transform .35s var(--ease); }
.mcard:hover { transform: translateY(-3px); }
.mcard__i { display: inline-block; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; color: var(--ink-2); padding: .35em .7em; border-radius: 999px; background: var(--paper); margin-bottom: 2rem; }
.mcard h3 { font-size: 1.35rem; letter-spacing: -.03em; margin-bottom: .6rem; }
.mcard p { font-size: .92rem; color: var(--mute); line-height: 1.55; }
.list { list-style: none; display: grid; gap: .4rem; margin-top: 1.1rem; }
.list li { position: relative; padding-left: 1.05rem; font-size: .87rem; color: var(--ink-2); line-height: 1.45; }
.list li::before { content: ""; position: absolute; left: 0; top: .58em; width: 5px; height: 5px; border-radius: 50%; background: var(--ember); }
.check { list-style: none; display: grid; gap: .6rem; }
.check li { position: relative; padding: 1rem 1.1rem 1rem 3.1rem; color: var(--ink); line-height: 1.45; background: var(--card); border-radius: 16px; font-size: .96rem; }
.check li::before { content: ""; position: absolute; left: 1rem; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: var(--ink); }
.check li::after { content: ""; position: absolute; left: calc(1rem + 9px); top: 50%; margin-top: -6px; width: 5px; height: 9px; border: solid var(--paper); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }

/* ---- 14. Numbered columns ---- */
.numcols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.numcols--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .numcols, .numcols--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .numcols, .numcols--4 { grid-template-columns: 1fr; } }
.numcol { border-top: 1px solid var(--ink); padding-top: 1.2rem; }
.numcol__n { font-family: var(--f-serif); font-style: italic; font-size: clamp(2.8rem, 5vw, 4rem); font-weight: 400; line-height: 1; letter-spacing: -.02em; margin-bottom: 1.4rem; color: var(--ink); }
.numcol h3 { font-size: 1.3rem; letter-spacing: -.03em; margin-bottom: .6rem; }
.numcol p { font-size: .93rem; color: var(--mute); line-height: 1.55; }

/* ---- 15. Tables ---- */
.tablewrap { border: 1px solid var(--line); background: var(--card); border-radius: var(--r-card); overflow: hidden; }
.tablescroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.spec { width: 100%; min-width: 700px; border-collapse: collapse; font-size: .875rem; }
table.spec caption { text-align: left; padding: 1.1rem 1.4rem; font-family: var(--f-head); font-weight: 500; font-size: 1.15rem; letter-spacing: -.025em; color: var(--ink); border-bottom: 1px solid var(--line); }
table.spec th, table.spec td { padding: .8rem 1.4rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-2); }
table.spec thead th { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); font-weight: 500; white-space: nowrap; background: var(--paper); }
table.spec tbody th { font-weight: 500; color: var(--ink); white-space: nowrap; font-family: var(--f-sans); }
table.spec td { color: var(--ink-2); font-family: var(--f-mono); font-size: .78rem; line-height: 1.55; }
table.spec td:last-child { font-family: var(--f-sans); font-size: .84rem; color: var(--mute); }
table.spec--text td { font-family: var(--f-sans); font-size: .87rem; }
table.spec tbody tr:last-child th, table.spec tbody tr:last-child td { border-bottom: 0; }
table.spec tbody tr { transition: background .2s; }
table.spec tbody tr:hover { background: var(--paper); }
.table-note { padding: .8rem 1.4rem; font-size: .74rem; color: var(--mute); border-top: 1px solid var(--line-2); font-family: var(--f-mono); }
.series-cell { display: inline-grid; place-items: center; width: 30px; height: 30px; color: var(--ink); font-family: var(--f-head); font-weight: 500; font-size: .92rem; border-radius: 50%; background: var(--t-sage); }

/* ---- 16. Product family blocks ---- */
.subnav { position: sticky; top: var(--hdr); z-index: 50; background: rgba(246,243,236,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.subnav__in { display: flex; gap: .3rem; overflow-x: auto; padding: .6rem var(--gut); scrollbar-width: none; }
@media (min-width: 1041px) { .subnav__in { flex-wrap: wrap; overflow: visible; } }
.subnav__in::-webkit-scrollbar { display: none; }
.subnav a { flex: none; display: inline-flex; align-items: center; gap: .5em; padding: .45em .9em; font-size: .82rem; color: var(--ink-2); border-radius: 999px; border: 1px solid var(--line); background: var(--card); white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.subnav a b { font-family: var(--f-mono); font-weight: 500; font-size: .9em; color: var(--ember-2); }
.subnav a:hover { border-color: var(--ink); color: var(--ink); }
.subnav a.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.subnav a.is-active b { color: var(--apricot); }
.fam { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(2rem, 5vw, 4.5rem); padding: clamp(3rem, 6vw, 5rem) 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--hdr) + 56px); }
.fam:first-of-type { border-top: 0; }
@media (max-width: 860px) { .fam { grid-template-columns: 1fr; gap: 1.75rem; } }
.fam__side { position: sticky; top: calc(var(--hdr) + 72px); }
@media (max-width: 860px) { .fam__side { position: static; } }
.fam__code { display: inline-flex; align-items: center; gap: .7rem; margin-bottom: 1.2rem; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.fam__code b { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink); font-family: var(--f-head); font-size: 1.2rem; font-weight: 500; background: var(--card); border-radius: 50%; }
.fam h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.04em; line-height: 1.02; margin-bottom: 1.4rem; }
.fam__apps h4 { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin-bottom: .7rem; font-weight: 500; }
.fam__body p { color: var(--ink-2); margin-bottom: 1rem; max-width: 66ch; }
.dl { margin-top: 1.6rem; background: var(--card); border-radius: var(--r-card); padding: .4rem 1.4rem .6rem; }
.dl__h { padding: .9rem 0 .7rem; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); border-bottom: 1px solid var(--line); }
.dl__row { display: flex; align-items: baseline; gap: .75rem; padding: .62rem 0; border-bottom: 1px solid var(--line-2); font-size: .88rem; }
.dl__row:last-child { border-bottom: 0; }
.dl__row dt { color: var(--mute); flex: none; }
.dl__row .dots { flex: 1; min-width: 1rem; }
.dl__row dd { font-family: var(--f-mono); font-size: .78rem; color: var(--ink); text-align: right; }

.kv { border-top: 1px solid var(--ink); }
.kv__row { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.kv__row dt { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding-top: .35em; }
.kv__row dd { color: var(--ink); }
.kv__row dd a { color: var(--ember-2); }
@media (max-width: 600px) { .kv__row { grid-template-columns: 1fr; gap: .25rem; } }

/* ---- 17. Markets page rows ---- */
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(1.5rem, 5vw, 4rem); padding: clamp(2.25rem, 5vw, 3.75rem) 0; border-top: 1px solid var(--line); }
.mrow:first-child { border-top: 0; }
@media (max-width: 820px) { .mrow { grid-template-columns: 1fr; gap: 1rem; } }
.mrow__i { font-family: var(--f-serif); font-style: italic; font-size: 2rem; line-height: 1; color: var(--ember-2); margin-bottom: 1rem; }
.mrow h3 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); letter-spacing: -.04em; line-height: 1.02; }
.mrow p { color: var(--ink-2); max-width: 66ch; }
.mrow__s { display: inline-block; margin-top: 1.4rem; padding: .7rem 1rem; border-radius: 14px; background: var(--card); font-family: var(--f-mono); font-size: .74rem; color: var(--ink); letter-spacing: .01em; }
.mrow__s b { font-weight: 500; color: var(--mute); text-transform: uppercase; letter-spacing: .12em; font-size: .62rem; margin-right: .7em; }

/* ---- 18. Info cards ---- */
.icards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.icards--4 { grid-template-columns: repeat(4, 1fr); }
.icards--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 920px) { .icards, .icards--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .icards, .icards--4, .icards--2 { grid-template-columns: 1fr; } }
.icard { background: var(--card); padding: 1.5rem 1.4rem; border-radius: var(--r-card); position: relative; }
.section:not(.section--alt) .icards--4 .icard:nth-child(4n+1) { background: var(--t-peach); }
.section:not(.section--alt) .icards--4 .icard:nth-child(4n+2) { background: var(--t-sage); }
.section:not(.section--alt) .icards--4 .icard:nth-child(4n+3) { background: var(--t-sky); }
.section:not(.section--alt) .icards--4 .icard:nth-child(4n+4) { background: var(--t-butter); }
.icard__i { display: inline-block; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .1em; color: var(--ink-2); padding: .32em .65em; border-radius: 999px; background: rgba(22,22,20,.06); margin-bottom: 1.6rem; }
.icard h3 { font-family: var(--f-head); font-weight: 500; font-size: 1.15rem; margin-bottom: .45rem; letter-spacing: -.025em; }
.icard p { font-size: .89rem; color: var(--ink-2); line-height: 1.55; }
.icard a { color: var(--ember-2); font-weight: 500; }

/* ---- 19. Forms ---- */
.form { display: grid; gap: 1rem; background: var(--card); border-radius: var(--r-panel); padding: clamp(1.25rem, 3vw, 2.25rem); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .45rem; }
.field label { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.field label .req { color: var(--ember); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .95rem;
  background: var(--paper); border: 1px solid transparent; border-radius: 12px;
  font-size: .95rem; color: var(--ink); appearance: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%2376746c' stroke-width='1.5'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .95rem center; background-size: 11px; padding-right: 2.4rem; }
.field textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: var(--card); box-shadow: 0 0 0 4px rgba(22,22,20,.06); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.form__note { font-size: .8rem; color: var(--mute); line-height: 1.55; max-width: 60ch; }
.form__note a { color: var(--ember-2); text-decoration: underline; text-underline-offset: 3px; }
.form__status { display: none; padding: .9rem 1.1rem; border-radius: 12px; font-size: .92rem; }
.form__status.is-ok { display: block; background: var(--t-sage); color: #1d3a2b; }
.form__status.is-err { display: block; background: var(--t-peach); color: #7a2c12; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ---- 20. CTA panel ---- */
.cta { padding: clamp(1rem, 3vw, 2rem) clamp(.5rem, 1.4vw, 1.25rem) clamp(.5rem, 1.4vw, 1.25rem); }
.cta > .wrap, .cta__in {
  position: relative;
}
.cta__in {
  max-width: none;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; align-items: end;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4.5rem);
  border-radius: var(--r-panel);
  background: linear-gradient(180deg, #fdead3, #f9d2a4);
  overflow: hidden;
}
@media (max-width: 820px) { .cta__in { grid-template-columns: 1fr; } }
.cta h2 { font-size: clamp(2.4rem, 6vw, 5rem); letter-spacing: -.048em; line-height: .96; margin-bottom: 1.1rem; }
.cta p { color: var(--ink-2); max-width: 44ch; font-size: 1.05rem; }
.cta .btn-row { justify-content: flex-start; }
.cta .btn--line { background: rgba(255,255,255,.6); border-color: transparent; }
@media (min-width: 821px) { .cta .btn-row { justify-content: flex-end; } }

/* ---- 21. Footer ---- */
.ftr { background: var(--ink); color: #cfcdc5; padding-block: clamp(3rem, 6vw, 5rem) 1.75rem; border-radius: var(--r-panel) var(--r-panel) 0 0; margin-top: clamp(.5rem, 1.4vw, 1.25rem); }
.ftr__top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.12); }
@media (max-width: 900px) { .ftr__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ftr__top { grid-template-columns: 1fr; } }
.ftr .brand { margin-bottom: 1.1rem; }
.ftr .brand__mark { color: var(--apricot); }
.ftr .brand__name b { color: #fff; }
.ftr .brand__name span { color: #8f8d85; }
.ftr__blurb { font-size: .9rem; color: #a3a199; max-width: 36ch; line-height: 1.55; }
.ftr h4 { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: #8f8d85; margin-bottom: 1.1rem; font-weight: 500; }
.ftr ul { list-style: none; display: grid; gap: .6rem; }
.ftr li a, .ftr li { font-size: .92rem; color: #e9e6dd; transition: color .2s; }
.ftr li.small { color: #8f8d85; font-size: .84rem; }
.ftr li a:hover { color: var(--apricot); }
.ftr .ftr__reg { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .02em; color: #a3a199; display: inline-block; margin-top: .4rem; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.12); }
.ftr .ftr__reg::after { content: " ↗"; color: var(--apricot); }
.ftr__bot { padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; font-size: .78rem; color: #8f8d85; }
.ftr__bot nav { display: flex; gap: 1.2rem; }
.ftr__bot a:hover { color: #fff; }

/* ---- 22. Page head ---- */
.phead { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(2.25rem, 5vw, 4rem); border-bottom: 1px solid var(--line); position: relative; }
.phead .h1 { max-width: 18ch; }
.phead .lead { max-width: 56ch; margin-top: 1.5rem; }
.crumb { display: flex; align-items: center; gap: .6em; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 1.6rem; }
.crumb a { color: var(--mute); } .crumb a:hover { color: var(--ink); }
.crumb span { color: var(--faint); }
.updated { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .04em; color: var(--mute); margin-top: 1.2rem; }

/* ---- 23. Reveal ---- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }
.rv-1 { transition-delay: .08s; } .rv-2 { transition-delay: .16s; } .rv-3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } .plate3d__inner { animation: none; } }

/* ---- 24. Utilities ---- */
.mb-lg { margin-bottom: clamp(2rem, 4.5vw, 3.25rem); }
.mb-md { margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.mt-md { margin-top: clamp(1.6rem, 3.4vw, 2.6rem); }
.text-center { text-align: center; }
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: var(--sec); }
.facts { display: grid; margin-top: 1.8rem; background: var(--card); border-radius: var(--r-card); padding: .4rem 1.3rem; }
.section--alt .facts { background: var(--card); }
.facts__row { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line-2); font-size: .88rem; }
.facts__row:first-child { border-top: 0; }
.facts__row dt { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding-top: .3em; }
.facts__row dd { font-family: var(--f-mono); font-size: .8rem; color: var(--ink); }

/* ---- 25. Film hero (home) ---- */
body[data-page="home"] .hdr:not(.is-stuck) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.hero--film {
  position: relative; display: block; overflow: hidden;
  min-height: 100svh; padding: 0;
  margin-top: calc(-1 * var(--hdr));
  background: linear-gradient(180deg, #faf8f3, #efe9dd);
}
.hero__gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero--film.is-ready .hero__gl { opacity: 1; }
.hero__scrim {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(90deg, rgba(247,244,237,.97) 0%, rgba(247,244,237,.9) 30%, rgba(247,244,237,.45) 46%, rgba(247,244,237,0) 60%),
    linear-gradient(180deg, rgba(247,244,237,.92) 0%, rgba(247,244,237,0) 15%, rgba(246,243,236,0) 72%, rgba(246,243,236,1) 100%);
}
.hero__content { position: relative; z-index: 2; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: calc(var(--hdr) + 3rem); padding-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.hero__text { max-width: 680px; }
.hero__text h1 { margin-bottom: 1.5rem; }
.hero__text .lead { max-width: 33em; }
.hero__text .btn-row { margin-top: 2rem; }
.hero__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-top: clamp(2rem, 4vw, 3.25rem); padding-top: 1.25rem; border-top: 1px solid var(--line); }
.film-phase { display: grid; grid-template-columns: auto 1fr; gap: .15rem 1rem; align-items: baseline; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.film-phase__n { grid-row: 1 / span 2; font-family: var(--f-serif); font-style: italic; font-size: 2.6rem; letter-spacing: -.02em; line-height: .9; color: var(--ink); text-transform: none; }
.film-phase__t { color: var(--ink); }
.film-phase__d { color: var(--mute); text-transform: none; letter-spacing: .03em; }
.hero--film[data-phase] .film-phase__t { animation: phasein .6s var(--ease); }
@keyframes phasein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.film-bar { width: clamp(140px, 18vw, 260px); height: 2px; background: var(--line); margin-top: .9rem; overflow: hidden; border-radius: 2px; }
.film-bar i { display: block; height: 100%; width: 0; background: var(--ink); }
.film-cap { display: none; }
.hero__chips { position: absolute; right: var(--gut); top: calc(var(--hdr) + 1.6rem); z-index: 2; display: grid; gap: .45rem; justify-items: end; }
.hero__chips .callout { position: static; }
.hero__scroll { position: absolute; right: var(--gut); bottom: clamp(1.5rem, 3vw, 2.25rem); z-index: 2; display: flex; align-items: center; gap: .7rem; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.hero__scroll::after { content: ""; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-hard); background: rgba(255,255,255,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23161614' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 4v12M5 11l5 5 5-5'/%3E%3C/svg%3E") center / 14px no-repeat; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.hero__fallback { display: none; position: absolute; right: 4%; top: 50%; transform: translateY(-50%); width: min(44vw, 540px); z-index: 1; }
.hero--film.no-webgl .hero__fallback { display: block; }
.hero--film.no-webgl .hero__gl, .hero--film.no-webgl .hero__foot, .hero--film.no-webgl .hero__chips { display: none; }
.hero--film.no-webgl .hero__content { padding-bottom: clamp(3rem, 8vw, 6rem); }
@media (max-width: 900px) {
  .hero__chips, .hero__scroll { display: none; }
  .hero--film { background: var(--paper); }
  .hero__gl, .hero__scrim { bottom: auto; height: 62svh; min-height: 400px; }
  .hero__scrim { background: linear-gradient(180deg, rgba(247,244,237,.5) 0%, rgba(247,244,237,0) 16%, rgba(246,243,236,0) 54%, rgba(246,243,236,.88) 82%, rgba(246,243,236,1) 100%); }
  .hero__content { justify-content: flex-end; padding-top: calc(var(--hdr) + 36svh); }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .hero__fallback { position: relative; right: auto; top: auto; transform: none; width: 100%; margin: 0 auto 1rem; }
  .hero--film.no-webgl .hero__content { padding-top: calc(var(--hdr) + 2rem); }
}

/* ---- 26. Film hero, video edition (home) ----
   The clips carry their own studio backdrop (paper + apricot disc), so the stage is a 16:9 box that is
   positioned per breakpoint and feathered into the page at its edges.
   Geometry of the footage: press frame x 49.4–89.8 %, y 19–87.8 %; disc centre 74 % / 46 %. */
.hero--video {
  background: #f6f1ea;
  --sw: min(96vw, 168svh); --sh: calc(var(--sw) * .5625); --st: calc(50svh - var(--sh) / 2 - 12px);   /* stage width, height, top */
}
/* a full-width band in the footage's own backdrop tones, so the stage has no visible left or right edge at any width */
.hero--video::before {
  content: ""; position: absolute; left: 0; right: 0; top: var(--st); height: var(--sh); z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, #faf2ef 0%, #f9eeea 30%, #f7e8e2 60%, #f2e2db 97%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 10%, #000 88.2%, transparent 94%);
  mask-image: linear-gradient(180deg, transparent 0, #000 10%, #000 88.2%, transparent 94%);
}
.hero--video .hero__stage {
  position: absolute; z-index: 0; pointer-events: none; will-change: transform;
  width: var(--sw); height: var(--sh);
  right: calc(56px - .102 * var(--sw)); top: var(--st);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 96%, transparent 100%), linear-gradient(180deg, transparent 0, #000 10%, #000 88.2%, transparent 94%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 96%, transparent 100%), linear-gradient(180deg, transparent 0, #000 10%, #000 88.2%, transparent 94%);
  mask-composite: intersect;
}
.hero__poster, .hero__vid, .hero__vid video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__poster { object-fit: cover; opacity: 0; transition: opacity 1s var(--ease); }
.hero__poster.is-in { opacity: 1; }
.hero__vid video { object-fit: cover; opacity: 0; background: transparent; }
.hero__vid video.on { opacity: 1; }
.hero__vid video.in-cut { transition: opacity .3s linear; }
.hero__vid video.in-fade { transition: opacity .9s ease-in-out; }
/* zoom: the camera pushes in on the small crystal inside the open press (68.9 % / 47.6 % of the frame, 2.54 % wide) and the
   close-up (crystal at 74 % / 47.4 %, 23.1 % wide) resolves out of it. The two layers keep the crystal the same size and in the
   same place for the whole move: scales stay in the ratio 9.08 and both translate along the same path with the same easing. */
.hero__vid { transform-origin: 74% 46%; }
.hero__vid video.pre-zoom { transform-origin: 68.9% 47.6%; transform: scale(2.724); transition: transform 1.5s cubic-bezier(.5, 0, .9, .6); }
.hero__vid video.pre-zoom.out-zoom { transform: translate(5.1%, -.2%) scale(9.08); opacity: 0; transition: transform 1.2s cubic-bezier(.1, .4, .3, 1), opacity .7s ease-in .3s; }
.hero__vid video.in-zoom {
  transform-origin: 74% 47.4%; transform: translate(-5.1%, .2%) scale(.3);
  transition: transform 1.2s cubic-bezier(.1, .4, .3, 1), opacity .55s ease-out;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 92%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 92%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
.hero__vid video.in-zoom.on { transform: none; }
.hero--video.is-still .hero__vid { display: none; }
@media (min-width: 901px) { .hero--video .hero__text { max-width: min(680px, 52vw); } }
@media (min-width: 901px) and (max-width: 1180px) { .hero--video .hero__chips { display: none; } }   /* too little room beside the film; the same figures follow in the readout */
.hero--video .hero__scrim {
  background:
    linear-gradient(90deg, rgba(246,241,234,.96) 0%, rgba(246,241,234,.82) 30%, rgba(246,241,234,0) 52%),
    linear-gradient(180deg, rgba(246,241,234,.9) 0%, rgba(246,241,234,0) 12%, rgba(246,241,234,0) 80%, rgba(246,243,236,1) 100%);
}
/* while the camera flies into the press (clips marked "veil"), machine parts sweep across the headline side:
   a denser paper veil fades in under the text for that scene and out again after it */
.hero--video .hero__scrim::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease-in-out;
  background: linear-gradient(90deg, rgba(246,241,234,.97) 0%, rgba(246,241,234,.95) 47%, rgba(246,241,234,.82) 54%, rgba(246,241,234,.4) 61%, rgba(246,241,234,0) 69%);
}
.hero--video[data-veil="1"] .hero__scrim::after { opacity: 1; transition-delay: .25s; }
@media (max-width: 900px) {
  /* phone and tablet: the film sits above the text, so the veil guards the header (top) and the eyebrow line (bottom) instead */
  .hero--video .hero__scrim::after {
    inset: 0 0 auto 0; height: calc(var(--st) + var(--sh));
    background:
      linear-gradient(180deg, rgba(246,241,234,.97) 0, rgba(246,241,234,.93) calc(var(--hdr) - 10px), rgba(246,241,234,0) calc(var(--hdr) + 64px)),
      linear-gradient(0deg, rgba(246,241,234,1) 0, rgba(246,241,234,.95) 9%, rgba(246,241,234,0) 28%);
  }
  .hero--video { --sw: min(190vw, calc((36svh - 22px) * 2.58)); --st: calc(var(--hdr) + 12px - .19 * var(--sh)); }
  .hero--video::before {
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 8%, #000 88.2%, transparent 94%);
    mask-image: linear-gradient(180deg, transparent 0, #000 8%, #000 88.2%, transparent 94%);
  }
  .hero--video .hero__stage {
    right: auto; left: calc(50vw - .718 * var(--sw));
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 93%, transparent 100%), linear-gradient(180deg, transparent 0, #000 8%, #000 88.2%, transparent 94%);
    mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 93%, transparent 100%), linear-gradient(180deg, transparent 0, #000 8%, #000 88.2%, transparent 94%);
  }
  .hero--video .hero__scrim { background: linear-gradient(180deg, rgba(246,241,234,.6) 0%, rgba(246,241,234,0) 12%, rgba(246,241,234,0) 100%); height: 100%; }
}
/* tablets in portrait: the 16:9 stage is sized by height there and ends short of the right edge of the screen. The backdrop
   hides that in the quiet scenes, but the fly-in fills the frame with machine parts, so the stage is feathered on both sides
   at the same distance from the crystal and reads as a centred window. */
@media (min-width: 560px) and (max-width: 900px) {
  .hero--video .hero__stage {
    -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 47.5%, #000 93%, transparent 100%), linear-gradient(180deg, transparent 0, #000 8%, #000 88.2%, transparent 94%);
    mask-image: linear-gradient(90deg, transparent 40%, #000 47.5%, #000 93%, transparent 100%), linear-gradient(180deg, transparent 0, #000 8%, #000 88.2%, transparent 94%);
  }
}

/* ---- 27. Process film on the Technology page (scroll-driven, see pfilm.js) ----
   Without .is-live (no script, reduced motion, data saving) the section is the plain list of steps (.chain-v). */
.pfilm__stage, .pfilm__ui { display: none; }
.pfilm.is-live .pfilm__track { height: calc(var(--pf-screens, 5) * 100vh + 100vh); }
.pfilm.is-live .pfilm__sticky { position: sticky; top: var(--hdr); height: calc(100vh - var(--hdr)); display: flex; align-items: center; }
@supports (height: 100svh) {
  .pfilm.is-live .pfilm__track { height: calc(var(--pf-screens, 5) * 100svh + 100svh); }
  .pfilm.is-live .pfilm__sticky { height: calc(100svh - var(--hdr)); }
}
.pfilm.is-live .pfilm__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 9fr); gap: clamp(1.5rem, 3.5vw, 3.5rem); align-items: center; width: 100%; max-width: 1560px; }
.pfilm.is-live .chain-v { display: grid; align-items: start; }   /* the five steps lie on top of each other in one cell: it is as tall as the longest of them, in any language */
.pfilm.is-live .chain-v .step { grid-area: 1 / 1; display: block; padding: 0; border: 0; opacity: 0; transform: translateY(10px); transition: opacity .16s linear, transform .16s linear; pointer-events: none; }
.pfilm.is-live .chain-v .step.is-on { opacity: 1; transform: none; pointer-events: auto; transition: opacity .38s var(--ease) .15s, transform .38s var(--ease) .15s; }   /* the old step is gone before the new one appears */
.pfilm.is-live .chain-v .step::before { display: block; position: static; padding: 0; margin-bottom: 1rem; font-size: .8rem; }
.pfilm.is-live .chain-v .step h3 { font-size: clamp(1.55rem, 2.5vw, 2.15rem); margin-bottom: .8rem; }
.pfilm.is-live .pfilm__ui { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.pfilm__dots { display: flex; gap: .45rem; }
.pfilm__dots button { width: 9px; height: 9px; padding: 0; border: 1px solid var(--ink-2); border-radius: 50%; background: transparent; cursor: pointer; transition: background .25s, transform .25s; }
.pfilm__dots button.is-on { background: var(--ember); border-color: var(--ember); transform: scale(1.25); }
.pfilm__bar { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.pfilm__bar i { display: block; height: 100%; width: 0; background: var(--ink); }
.pfilm.is-live .pfilm__stage { display: block; position: relative; aspect-ratio: 16 / 9; width: min(100%, calc((100vh - var(--hdr) - 7rem) * 16 / 9)); margin-left: auto; border-radius: var(--r-card); overflow: hidden; background: #ecdccb; isolation: isolate; box-shadow: 0 30px 60px -40px rgba(22,22,20,.35); }
.pfilm__cam { position: absolute; inset: 0; transform-origin: 50% 64%; will-change: transform; }
.pfilm__strip { position: absolute; left: 0; top: 0; height: 100%; background-repeat: repeat-x; will-change: transform; }
.pfilm__tile { position: absolute; top: 0; height: 100%; }
/* The stills of every station already dissolve at their left and right edges into the empty bench (prep_pfilm.py), and only
   stills are shown while the strip moves, so the stations join the bench plate behind them without a seam. The clip is laid over
   its station only while that station's action runs (class is-v, set by pfilm.js). */
.pfilm__tile img, .pfilm__tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pfilm__tile img { opacity: 0; }                 /* pfilm.js sets which stills show */
.pfilm__tile img:first-child { opacity: 1; }
.pfilm__tile video { opacity: 0; transition: opacity .22s linear; }
.pfilm__tile.is-v video { opacity: 1; }
@media (max-width: 900px) {
  .pfilm.is-live .pfilm__sticky { align-items: flex-start; padding-top: .75rem; }
  .pfilm.is-live .pfilm__grid { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .pfilm.is-live .pfilm__stage { order: -1; width: 100%; }
  .pfilm.is-live .chain-v .step::before { margin-bottom: .55rem; }
  .pfilm.is-live .chain-v .step h3 { font-size: 1.32rem; margin-bottom: .5rem; }
  .pfilm.is-live .chain-v .step p { font-size: .9rem; line-height: 1.5; }
  .pfilm.is-live .pfilm__ui { margin-top: .9rem; }
}
@media (max-width: 900px) and (max-height: 700px) {   /* small phones: keep the pinned block inside the screen */
  .pfilm.is-live .pfilm__sticky { padding-top: .4rem; }
  .pfilm.is-live .chain-v .step p { font-size: .84rem; line-height: 1.45; }
}
