/* flash-montage — tokens. Colours are the format's own: the grey studio sweep, the black ground,
   the red of the first hold. Five type steps. */
:root {
  --bg: #dcdbd7;
  --surface: #d1d0cb;
  --ink: #0d0d0c;
  --muted: #4a4945;
  --accent: #d81f24;
  --accent-ink: #ffffff;
  --field-1: #080808;
  --field-1-ink: #f2f1ee;
  --field-2: #f3f2ef;
  --field-2-ink: #0d0d0c;

  --s-small: 0.875rem;
  --s-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --s-lead: clamp(1.375rem, 1.1rem + 0.9vw, 2rem);
  --s-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --s-hero: clamp(2.5rem, 3.6vw, 3.75rem);

  --m: 32px;
  --gap: 24px;
  --sec: clamp(120px, 14vw, 200px);
  --font: "Clash Grotesk", "Helvetica Neue", Arial, sans-serif;
  --code: ui-monospace, "SF Mono", Menlo, monospace; /* taste-skill-ignore: literal code only (commands, plan.json) */
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}
@media (max-width: 720px) { :root { --m: 16px; --gap: 16px; } .bar nav { gap: 16px; } .bar nav .hide-sm { display: none; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font: 400 var(--s-body)/1.45 var(--font); -webkit-font-smoothing: antialiased; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.03em; line-height: 0.95; margin: 0; text-wrap: balance; }
p { margin: 0; }
code { font-family: var(--code); font-size: 0.86em; }
.wrap { padding-inline: var(--m); }
.soft { color: var(--muted); }

/* buttons: square-cornered, one fill */
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; background: var(--accent); color: var(--accent-ink); font-weight: 500; text-decoration: none; border: 0; cursor: pointer; transition: transform 160ms var(--ease), background-color 160ms var(--ease); }
.btn:hover { background: #b9171c; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: var(--s-small); }
.link { font-weight: 500; }
.link:hover { color: var(--accent); }

/* ---------------------------------------------------------------- bar */
.bar { position: absolute; z-index: 5; inset: 0 0 auto 0; display: flex; justify-content: space-between; align-items: center; padding: 22px var(--m); font-size: var(--s-small); }
.wordmark { white-space: nowrap; font-size: var(--s-body); font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.bar nav { display: flex; align-items: center; gap: 26px; }
.bar nav a:not(.btn) { text-decoration: none; }
.bar nav a:not(.btn):hover { text-decoration: underline; }

/* ---------------------------------------------------------------- hero: sentence split by a reel */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: var(--bg); }
.hero-line { position: absolute; inset: 50% 0 auto 0; transform: translateY(-50%); display: flex; justify-content: space-between; padding-inline: var(--m); font-size: var(--s-hero); font-weight: 500; z-index: 2; pointer-events: none; }
.half { display: block; max-width: 30vw; }
.half-r { text-align: right; }
.reel { position: absolute; left: 50%; top: 50%; width: 35vw; transform: translate(-50%, -50%); display: grid; gap: 24px; }
.slot { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0; overflow: hidden; background: var(--surface); }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot[data-k="-2"], .slot[data-k="2"] { position: absolute; left: 0; right: 0; }
.slot[data-k="-2"] { bottom: calc(100% + 24px); }
.slot[data-k="2"] { top: calc(100% + 24px); }
.reel { grid-template-rows: auto auto auto; }
.slot[data-k="-1"] { grid-row: 1; }
.slot.live { grid-row: 2; background: #000; }
.slot[data-k="1"] { grid-row: 3; }
.live canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.live img { position: absolute; inset: 0; }
.live-mark { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: #000; color: #fff; font-weight: 600; font-size: var(--s-body); letter-spacing: 0.01em; }
.reel-toggle { position: absolute; right: 8px; bottom: 8px; z-index: 3; min-height: 32px; padding: 0 12px; border: 0; background: rgba(8, 8, 8, 0.72); color: #fff; font: 500 var(--s-small)/1 var(--font); cursor: pointer; opacity: 0; transition: opacity 200ms var(--ease); }
.live:hover .reel-toggle, .reel-toggle:focus-visible, .reel-toggle[aria-pressed="true"] { opacity: 1; }
.hero-sub { position: absolute; left: var(--m); bottom: 32px; max-width: 31ch; font-size: var(--s-body); line-height: 1.4; z-index: 2; }
.hero-now { position: absolute; right: var(--m); bottom: 32px; font-size: var(--s-small); color: var(--muted); font-variant-numeric: tabular-nums; z-index: 2; }

@media (max-width: 860px) {
  .hero { height: auto; min-height: 0; padding: 92px 0 40px; display: flex; flex-direction: column; }
  .hero-line { position: static; transform: none; display: contents; font-size: 9vw; }
  .half { max-width: none; padding-inline: var(--m); font-size: max(9vw, 34px); }
  .half-l { order: 1; }
  .reel { order: 2; position: relative; left: auto; top: auto; transform: none; width: auto; margin: 52px var(--m); }
  .slot.live { aspect-ratio: 4 / 3; }
  .slot[data-k="-1"], .slot[data-k="1"] { height: 28px; aspect-ratio: auto; }
  .slot[data-k="-1"] img { object-position: bottom; }
  .slot[data-k="-2"], .slot[data-k="2"] { display: none; }
  .half-r { order: 3; }
  .hero-sub { order: 4; position: static; margin: 28px var(--m) 0; }
  .hero-now { order: 5; position: static; margin: 10px var(--m) 0; }
  .reel-toggle { opacity: 1; }
}

/* ---------------------------------------------------------------- intro: lead over four columns */
.intro { padding-top: 96px; padding-bottom: 96px; }
.lead { font-size: var(--s-lead); line-height: 1.2; max-width: 52ch; }
.four { margin-top: 72px; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); align-items: start; }
.four p { font-size: var(--s-body); line-height: 1.45; }
.four b { color: var(--ink); font-weight: 600; }
@media (max-width: 960px) { .four { grid-template-columns: 1fr 1fr; row-gap: 40px; } }
@media (max-width: 560px) { .four { grid-template-columns: 1fr; row-gap: 32px; } .lead { font-size: 20px; } }

/* ---------------------------------------------------------------- acts: photographs down a diagonal */
.acts { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); padding-top: var(--sec); align-items: start; }
.acts-h { grid-column: 7 / 13; grid-row: 1; font-size: var(--s-head); font-weight: 400; }
.act { display: contents; }
.act img { width: 100%; height: auto; object-fit: cover; }
.act p { max-width: 36ch; font-size: var(--s-body); line-height: 1.5; }
.acts b { font-weight: 600; }
.act-1 img { grid-column: 1 / 5; grid-row: 1 / 3; aspect-ratio: 3 / 4; }
.act-1 p { grid-column: 5 / 9; grid-row: 2; align-self: end; }
.act-2 img { grid-column: 6 / 9; grid-row: 3; aspect-ratio: 1; margin-top: 120px; }
.act-2 p { grid-column: 9 / 13; grid-row: 3; margin-top: 120px; }
.act-3 img { grid-column: 6 / 13; grid-row: 4; aspect-ratio: 16 / 10; margin-top: 120px; }
.act-3 p { grid-column: 2 / 6; grid-row: 4; margin-top: 120px; }
@media (max-width: 860px) {
  .acts { display: block; }
  .acts-h { margin-bottom: 32px; }
  .act { display: block; margin-bottom: 56px; }
  .act img { margin: 0; }
  .act p { margin: 16px 0 0; }
  .act-2 { width: 62%; margin-left: auto; }
  .act-3 { width: 78%; }
}

/* ---------------------------------------------------------------- formula: the pinned burst designer */
.formula { display: grid; grid-template-columns: 7fr 5fr; column-gap: calc(var(--gap) * 2); padding: var(--sec) var(--m) 0; background: var(--field-1); color: var(--field-1-ink); margin-top: var(--sec); }
.formula-pin { position: relative; min-width: 0; }
.formula-text { min-width: 0; }
.designer { position: sticky; top: 6vh; margin-bottom: 12vh; }
.formula-text { padding-bottom: 30vh; }
.formula-text h2 { font-size: var(--s-head); }
.formula-eq { margin-top: 24px; font-size: var(--s-body); line-height: 1.5; color: #c9c8c3; max-width: 40ch; }
.formula-eq code { color: #fff; white-space: nowrap; }
.step { min-height: 62vh; display: flex; align-items: center; }
.step p { font-size: var(--s-lead); line-height: 1.2; max-width: 22ch; color: #b9b8b3; transition: color 300ms var(--ease); }
.step b { font-weight: 500; color: #fff; }
.step.on p { color: #fff; }
.step-last { min-height: 50vh; }

/* the fragment: the product's own interface conventions apply inside [data-ui] */
.designer { background: #141414; color: #ecebe7; padding: 18px; font-size: var(--s-small); }
.d-top { flex-wrap: wrap; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.d-name { display: flex; align-items: center; gap: 10px; color: #a9a8a3; }
.d-name input { width: 190px; height: 34px; padding: 0 10px; border: 1px solid #3a3a38; background: #0b0b0b; color: #fff; font: 500 var(--s-small) var(--font); border-radius: 3px; }
.d-name input:focus { border-color: #fff; outline: none; }
.d-play, .d-copy { height: 34px; padding: 0 14px; border: 0; border-radius: 3px; background: var(--accent); color: #fff; font: 500 var(--s-small) var(--font); cursor: pointer; transition: transform 140ms var(--ease), background-color 140ms; }
.d-play:hover, .d-copy:hover { background: #b9171c; }
.d-play:active, .d-copy:active { transform: scale(0.97); }
.d-stage { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.d-stage img { width: 100%; height: 100%; object-fit: contain; }
.d-word { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: #000; color: #fff; font-weight: 600; font-size: var(--s-lead); }
.d-bars { display: flex; align-items: flex-end; gap: 1px; height: 46px; margin-top: 12px; }
.d-bars i { display: block; flex: 0 0 auto; background: #ecebe7; min-width: 2px; }
.d-bars i.now { background: var(--accent); }
.d-read { margin-top: 8px; color: #a9a8a3; font-variant-numeric: tabular-nums; }
.d-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-top: 14px; }
.d-controls label { display: grid; grid-template-columns: 1fr auto; gap: 4px; color: #a9a8a3; }
.d-controls output { color: #fff; font-variant-numeric: tabular-nums; }
.d-controls input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.d-code { position: relative; margin-top: 14px; background: #0b0b0b; border: 1px solid #2a2a28; border-radius: 3px; } /* taste-skill-ignore: inside the data-ui fragment */
.d-code pre { margin: 0; padding: 12px 14px; font-size: var(--s-small); line-height: 1.5; color: #d8d7d2; overflow: auto; max-height: 120px; }
.d-copy { position: absolute; top: 8px; right: 8px; height: 28px; }
@media (max-width: 960px) {
  .formula { grid-template-columns: 1fr; }
  .formula-text { order: -1; padding-bottom: 32px; }
  .designer { position: static; margin-bottom: 64px; }
  .step, .step-last { min-height: 0; padding: 18px 0; }
  .step p { color: #fff; }
}
@media (max-width: 520px) { .d-controls { grid-template-columns: 1fr; } .d-name input { width: 140px; } }

/* ---------------------------------------------------------------- run: frame run, one lifted */
.run { display: grid; grid-template-columns: 3fr 9fr; column-gap: var(--gap); padding: var(--sec) 0 var(--sec) var(--m); background: var(--field-1); color: var(--field-1-ink); overflow: hidden; }
.run-side { display: flex; flex-direction: column; gap: 14px; }
.run-side h2 { font-size: var(--s-lead); letter-spacing: -0.02em; }
.run-side .link { color: #fff; }
.run-side .link:hover { color: #ff6b6e; }
.run-note { margin-top: auto; font-size: var(--s-body); line-height: 1.45; color: #c9c8c3; max-width: 30ch; }
.run-row { display: flex; align-items: flex-end; gap: 6px; }
.run-row figure { margin: 0; flex: 0 0 auto; }
.run-row img, .run-row video { height: 16vh; width: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.run-row .lifted video { height: 35vh; }
.run-row figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; font-size: var(--s-small); color: #c9c8c3; }
.run-row figcaption span:first-child { color: #fff; }
@media (max-width: 860px) {
  .run { grid-template-columns: 1fr; padding-right: 0; }
  .run-side { padding-right: var(--m); margin-bottom: 28px; }
  .run-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 4px; align-items: flex-start; }
  .run-row figure { scroll-snap-align: start; }
  .run-row img { height: 34vw; }
  .run-row .lifted { flex-basis: calc(100vw - var(--m)); }
  .run-row .lifted video { height: auto; width: 100%; }
}

/* ---------------------------------------------------------------- compare: a table set as text */
.compare { padding-top: var(--sec); }
.compare h2 { font-size: var(--s-head); margin-bottom: 48px; }
.cmp { display: grid; grid-template-columns: 5fr 2.6fr 2.4fr 2fr; position: relative; }
.cmp-row { display: contents; }
.cmp-row > span { display: flex; align-items: center; min-height: 68px; padding: 0 16px; font-size: var(--s-body); }
.cmp-row > span:first-child { font-size: var(--s-lead); font-weight: 500; letter-spacing: -0.01em; }
.cmp-row:nth-child(odd):not(.cmp-head) > span { background: var(--surface); }
.cmp-row:nth-child(odd):not(.cmp-head) > span:first-child { padding-left: 16px; }
.cmp-row > span:first-child { padding-left: 16px !important; }
.cmp-head > span { font-weight: 600; font-size: var(--s-body); min-height: 56px; align-items: flex-end; padding-bottom: 12px; }
.cmp .hot { background: var(--accent) !important; color: var(--accent-ink); font-weight: 500; }
.cmp-head .hot { padding-top: 24px; }
@media (max-width: 860px) {
  .cmp { display: block; }
  .cmp-head { display: none; }
  .cmp-row { display: block; padding: 18px 16px; margin-inline: calc(var(--m) * -1); }
  .cmp-row:nth-child(even) { background: var(--surface); }
  .cmp-row > span { display: block; min-height: 0; padding: 3px 0 !important; background: none !important; font-size: 16px; }
  .cmp-row > span:first-child { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
  .cmp-row > span:nth-child(2)::before { content: "flash-montage: "; }
  .cmp-row > span:nth-child(3)::before { content: "By hand: "; color: var(--muted); }
  .cmp-row > span:nth-child(4)::before { content: "Stock montage: "; color: var(--muted); }
  .cmp .hot { padding: 8px 10px !important; margin: 2px -10px; background: var(--accent) !important; }
}

/* ---------------------------------------------------------------- cabinet: one frame, contents change */
.cabinet { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); padding-top: var(--sec); align-items: center; }
.cabinet-text { grid-column: 1 / 6; display: grid; gap: 20px; justify-items: start; }
.cabinet-text h2 { font-size: var(--s-head); }
.cabinet-text p { max-width: 46ch; }
.cabinet-text .btn { margin-top: 8px; }
.vitrine { grid-column: 7 / 12; margin: 10vh 0; }
.vitrine-frame { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; background: var(--bg); cursor: pointer; overflow: hidden; }
.vitrine-frame img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; mix-blend-mode: multiply; opacity: 0; transition: opacity 600ms var(--ease); }
.vitrine-frame img.on { opacity: 1; }
.vitrine figcaption { margin-top: 16px; font-size: var(--s-small); color: var(--muted); min-height: 1.4em; }
@media (max-width: 860px) {
  .cabinet { display: block; }
  .vitrine { width: 72vw; margin: 56px auto 0; }
  .vitrine figcaption { text-align: center; }
}

/* ---------------------------------------------------------------- lineage: two columns, highlighted facts */
.lineage { padding-top: var(--sec); padding-bottom: 120px; }
.lineage p { columns: 2; column-gap: 32px; text-align: justify; hyphens: auto; font-size: clamp(1.375rem, 1.1rem + 0.9vw, 2rem); line-height: 1.18; color: var(--muted); }
.lineage strong { color: var(--ink); font-weight: 500; }
.lineage mark { color: var(--ink); padding: 0 0.1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.m1 { background: #f3f2ef; }
.m2 { background: #c4c3be; }
.m3 { background: #ffffff; }
.m-last { background: var(--accent); color: var(--accent-ink); padding: 0 0.12em; text-decoration: none; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.m-last:hover { background: #b9171c; }
@media (max-width: 720px) { .lineage p { columns: 1; text-align: left; font-size: 20px; line-height: 1.25; } }

/* ---------------------------------------------------------------- tiles: the action */
.tiles { display: grid; grid-template-columns: 1.4fr 6fr 1.4fr; gap: 12px; margin: 40px 0 0; }
.tile { height: 380px; overflow: hidden; }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; }
.run-row video { background: #000; }
.tile-flat { background: var(--field-1); }
.tile-main { background: var(--accent); color: var(--accent-ink); padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.tile-main h2 { font-size: var(--s-head); }
.tile-main p { max-width: 44ch; }
.cmd { display: flex; align-items: center; max-width: 560px; background: #fff; color: var(--ink); margin-top: 8px; }
.cmd code { flex: 1; padding: 0 16px; font-size: var(--s-small); white-space: nowrap; overflow: auto; }
.cmd button { height: 48px; padding: 0 20px; border: 0; background: var(--field-1); color: #fff; font: 500 var(--s-body) var(--font); cursor: pointer; transition: background-color 140ms var(--ease), transform 140ms var(--ease); }
.cmd button:hover { background: #333; }
.cmd button:active { transform: scale(0.97); }
@media (max-width: 860px) {
  .tiles { grid-template-columns: 1fr 1fr; margin-inline: 0; padding-inline: var(--m); }
  .tile-main { grid-column: 1 / -1; order: -1; height: auto; min-height: 300px; padding: 28px; }
  .tile-photo, .tile-flat { height: 120px; }
  .cmd { flex-direction: column; align-items: stretch; }
  .cmd code { padding: 14px; }
}

/* ---------------------------------------------------------------- footer: one quiet line */
.foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 24px; padding: 30svh var(--m) 30px; font-size: var(--s-small); }
.foot-links { display: flex; gap: 24px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-r { text-align: right; }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr; gap: 8px; padding-top: 20svh; padding-bottom: 24px; font-size: 14px; } .foot-r { text-align: left; } .foot-links { flex-wrap: wrap; gap: 8px 18px; } }

/* ---------------------------------------------------------------- motion: entrances (content never hidden without script) */
.js .reveal > *, .js .reveal .four > *, .js .reveal .act > * { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.in > *, .js .reveal.in .four > *, .js .reveal.in .act > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal > *, .js .reveal .four > *, .js .reveal .act > * { opacity: 1 !important; transform: none !important; transition: none; }
}
