/* Frori — frori.ai
   Riktning: "The printed annual". Papper, bläck, rött. En typsnittsfamilj (Boska). */

@font-face { font-family: "Boska"; src: url("fonts/boska-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Boska"; src: url("fonts/boska-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Boska"; src: url("fonts/boska-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Boska"; src: url("fonts/boska-500i.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

:root {
  --paper: #F3F2EF;
  --paper-2: #E6E4DF;
  --stone: #D6D3CC;
  --ink: #111111;
  --ink-soft: #55524C;
  --night: #161616;
  --night-2: #232322;
  --on-night: #F3F2EF;
  --on-night-soft: #B9B6AF;
  --red: #E41E20;
  --red-deep: #B8161A;

  --m: 32px;
  --axis: 42vw;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-h3: clamp(1.5rem, 1.2rem + .9vw, 2rem);
  --step-head: clamp(2.25rem, 1.3rem + 3.4vw, 4.25rem);
  --step-display: clamp(2.75rem, 1.2rem + 6.2vw, 8.5rem);

  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Boska", Georgia, serif;
  font-size: var(--step-body);
  line-height: 1.5;
  letter-spacing: .005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
main { position: relative; z-index: 2; background: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 400; letter-spacing: -.02em; line-height: .95; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: var(--m); top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- button: one shape, square corners ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: 0 22px;
  background: var(--red); color: #fff;
  font: 500 1.0625rem/1 "Boska", Georgia, serif; letter-spacing: .01em;
  text-decoration: none; border: 0; border-radius: 0; cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--red-deep); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- header ---------- */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  padding: 24px var(--m);
  color: var(--on-night);
}
.bar .logo img { height: 40px; width: auto; }
.bar nav { margin-left: auto; display: flex; gap: 28px; }
.bar nav a { text-decoration: none; font-size: 1.0625rem; position: relative; padding: 6px 0; }
.bar nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--red); transition: right .3s var(--ease); }
.bar nav a:hover::after, .bar nav a:focus-visible::after { right: 0; }

/* language switch: two flags in one square-cornered pill */
.lang { display: flex; padding: 3px; gap: 2px; border: 1px solid rgba(243,242,239,.28); font-family: var(--ui); }
.lang a { display: flex; align-items: center; gap: 7px; padding: 6px 10px 6px 7px; text-decoration: none; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; color: var(--on-night-soft); transition: background-color .2s var(--ease), color .2s var(--ease); }
.lang a:hover { color: var(--on-night); background: rgba(243,242,239,.1); }
.lang a[aria-current] { background: var(--on-night); color: var(--ink); }
.lang svg { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.lang a:not([aria-current]) svg { filter: saturate(.55); transition: filter .2s var(--ease); }
.lang a:hover svg { filter: none; }

/* ---------- hero: view with two cards ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  background: var(--night); color: var(--on-night);
  display: grid; align-items: center;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(.82);
  opacity: 0; transition: opacity 1.6s ease;
  transform: scale(1.06); animation: drift 24s linear infinite alternate;
}
.hero-media img.on { opacity: 1; }
.hero-media::after { /* neutral scrim under the text columns only */
  content: ""; position: absolute; inset: 0; background: rgba(12, 12, 12, .5);
}
@keyframes drift { from { transform: scale(1.06) translate3d(0, 0, 0); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }

.hero-copy { position: relative; z-index: 2; padding: 0 var(--m); max-width: 62rem; }
.hero h1 { font-size: clamp(2.6rem, 1.2rem + 4.4vw, 5.6rem); line-height: 1.02; letter-spacing: -.025em; }
.hero h1 .l { display: block; white-space: nowrap; }
@media (max-width: 1024px) { .hero h1 .l { white-space: normal; text-wrap: balance; } }
.hero-copy p { margin-top: 36px; font-size: var(--step-lead); line-height: 1.4; max-width: 34ch; color: var(--on-night); }
.hero-copy .btn { margin-top: 36px; }

.hero-cards {
  position: absolute; z-index: 2; right: var(--m); bottom: var(--m);
  display: flex; gap: 16px;
}
.card {
  width: 230px; text-decoration: none; color: var(--ink); background: var(--paper);
  display: block; transition: transform .35s var(--ease);
}
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.card span { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 14px; font-size: 1rem; }
.card span b { font-weight: 400; color: var(--red); transition: transform .3s var(--ease); }
.card:hover span b { transform: translateX(4px); }

.hero-fact { position: absolute; z-index: 2; right: 30%; top: 30%; display: flex; align-items: center; gap: 12px; font-size: 1rem; color: var(--on-night); }
.hero-fact i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); display: block; position: relative; }
.hero-fact i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--red); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(3.2); opacity: 0; } }

/* ---------- showcase: input half, output half ---------- */
.split { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 96svh; }
.split-in { background: var(--night); color: var(--on-night); padding: 18vh var(--m) 200px calc(var(--m) + 8.33vw - 32px); }
.split-out { background: var(--paper-2); padding: 18vh var(--m) 200px; display: flex; justify-content: center; align-items: flex-start; }
.split-in label { display: block; font-size: var(--step-body); color: var(--on-night-soft); margin-bottom: 18px; max-width: 34ch; }
.note {
  display: block; width: min(34ch, 100%); min-height: 15.5em;
  font: 400 clamp(1.125rem, 1rem + .45vw, 1.5rem)/1.5 "Boska", Georgia, serif;
  color: var(--on-night); background: var(--night-2);
  border: 0; border-radius: 0; padding: 18px 20px; resize: vertical;
  caret-color: var(--red);
}
.note:focus { outline: 3px solid var(--red); outline-offset: 0; }
.split-in .hint { margin-top: 18px; font-size: var(--step-small); color: var(--on-night-soft); max-width: 40ch; }
.split h2 { position: absolute; bottom: 40px; font-size: var(--step-head); line-height: 1; }
.split h2 .a { position: absolute; bottom: 0; left: var(--m); white-space: nowrap; color: var(--on-night); }
.split h2 .b { position: absolute; bottom: 0; left: calc(50vw + var(--m)); white-space: nowrap; color: var(--ink); }
.split h2 { left: 0; right: 0; height: 1.1em; }

/* ---------- interface fragments (data-ui) ---------- */
[data-ui] { font-family: var(--ui); color: #1b1b1b; letter-spacing: 0; line-height: 1.4; }
.ui-panel { background: #fff; width: min(500px, 100%); border: 1px solid #DEDBD5; border-radius: 10px; overflow: hidden; } /* taste-skill-ignore: data-ui */
.ui-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #ECE9E4; } /* taste-skill-ignore: data-ui */
.ui-head strong { font-size: 15px; font-weight: 650; }
.ui-head small { font-size: 13px; color: #6d6a64; }
.ui-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: #F1EFEB; color: #3d3a35; white-space: nowrap; }
.ui-chip.red { background: #FDECEC; color: #A3121A; }
.ui-chip.green { background: #E7F3EA; color: #23663A; }
.ui-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: block; }
.ui-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; padding: 14px 18px; font-size: 13.5px; border-bottom: 1px solid #ECE9E4; } /* taste-skill-ignore: data-ui */
.ui-meta dt { color: #6d6a64; font-size: 12.5px; }
.ui-meta dd { margin: 0; font-weight: 600; }
.ui-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ui-table th { text-align: left; font-weight: 600; font-size: 12.5px; color: #6d6a64; padding: 10px 18px 6px; }
.ui-table td { padding: 9px 18px; border-top: 1px solid #F0EDE8; vertical-align: top; } /* taste-skill-ignore: data-ui */
.ui-table td.num, .ui-table th.num { text-align: right; white-space: nowrap; }
.ui-table tr.new td { animation: rowin .5s var(--ease); background: #FFF7F7; }
.ui-table td.miss { color: #A3121A; }
@keyframes rowin { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.ui-sum { padding: 12px 18px 16px; font-size: 14px; font-variant-numeric: tabular-nums; border-top: 1px solid #ECE9E4; } /* taste-skill-ignore: data-ui */
.ui-sum div { display: flex; justify-content: space-between; padding: 3px 0; color: #4a4741; }
.ui-sum div.tot { color: #111; font-weight: 700; font-size: 16px; padding-top: 8px; }
.ui-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: #FAF9F7; border-top: 1px solid #ECE9E4; font-size: 13px; color: #6d6a64; } /* taste-skill-ignore: data-ui */
.ui-btn { font: 600 13.5px/1 var(--ui); background: #111; color: #fff; padding: 9px 13px; border-radius: 6px; border: 0; }

/* ---------- how it works: stages as one bar ---------- */
.stages { padding: 200px var(--m) 180px; }
.stages h2 { font-size: var(--step-display); max-width: 12em; margin-bottom: 64px; }
.bar-row { display: flex; gap: 6px; min-height: 22vh; }
.seg { flex-basis: 0; min-width: 12%; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.seg p { display: none; }
.seg { position: relative; }
.seg strong { font-weight: 400; font-size: var(--step-h3); line-height: 1.1; }
.seg:nth-child(1) { background: var(--ink); color: var(--paper); flex-grow: 1; }
.seg:nth-child(2) { background: var(--red); color: #fff; flex-grow: 4; }
.seg:nth-child(3) { background: var(--stone); flex-grow: 1.4; }
.seg:nth-child(4) { background: var(--paper-2); flex-grow: 5; }
.seg-grow { transform-origin: left; }
.clauses { display: flex; gap: 6px; margin-top: 20px; }
.clauses p { flex-basis: 0; min-width: 12%; font-size: var(--step-body); line-height: 1.45; padding-right: 20px; }
.clauses p:nth-child(1) { flex-grow: 1; } .clauses p:nth-child(2) { flex-grow: 4; }
.clauses p:nth-child(3) { flex-grow: 1.4; } .clauses p:nth-child(4) { flex-grow: 5; }
.clauses p span { display: block; max-width: 24ch; }
.stages .aside { margin-top: 56px; margin-left: calc(var(--axis) - var(--m)); max-width: 44ch; font-size: var(--step-small); color: var(--ink-soft); }

/* ---------- features: fixed output, live controls ---------- */
.feat { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; background: var(--paper); }
.feat-h { grid-column: 2; grid-row: 1; font-size: var(--step-head); max-width: 12em; padding: 72px var(--m) 0 8.33vw; }
.feat-stage { grid-column: 1; grid-row: 1 / 3; }
.feat-copy { grid-column: 2; grid-row: 2; }
.feat-stage {
  position: sticky; top: 0; height: 100svh;
  background: var(--stone);
  display: flex; align-items: center; justify-content: center; padding: 40px var(--m);
}
.feat-stage .ui-panel { width: min(440px, 100%); transition: transform .5s var(--ease); }
.feat-copy { padding: 18vh var(--m) 8vh calc(8.33vw); }
.feat-copy h2 { font-size: var(--step-head); max-width: 12em; margin-bottom: 18vh; }
.cap { max-width: 44ch; min-height: 50vh; }
.cap h3 { font-size: var(--step-h3); line-height: 1.1; letter-spacing: -.015em; }
.cap p { margin-top: 16px; }
.ctrl { margin-top: 24px; }

.seg-ctrl { display: inline-flex; flex-wrap: wrap; background: var(--paper-2); padding: 4px; gap: 4px; }
.seg-ctrl button {
  font: 400 1rem/1 "Boska", Georgia, serif; color: var(--ink);
  background: transparent; border: 0; padding: 12px 16px; min-height: 44px; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.seg-ctrl button:hover { background: var(--stone); }
.seg-ctrl button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.switch { display: inline-flex; align-items: center; gap: 14px; cursor: pointer; font-size: 1.0625rem; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 52px; height: 30px; background: var(--stone); position: relative; transition: background-color .25s var(--ease); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; background: var(--paper); transition: transform .25s var(--ease); }
.switch input:checked + .track { background: var(--red); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { outline: 3px solid var(--red); outline-offset: 3px; }

/* order card blocks inside the stage */
.oc-block { padding: 14px 18px; border-top: 1px solid #ECE9E4; font-size: 14px; } /* taste-skill-ignore: data-ui */
.oc-block[hidden] { display: none; }
.oc-block.reveal { animation: rowin .45s var(--ease); }
.oc-block h4 { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: #6d6a64; }
.oc-day li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.oc-day ul, .oc-steps { list-style: none; margin: 0; padding: 0; }
.oc-steps { display: flex; gap: 4px; }
.oc-steps li { flex: 1; font-size: 12px; text-align: center; padding: 7px 2px; background: #F1EFEB; color: #6d6a64; border-radius: 4px; transition: background-color .3s, color .3s; }
.oc-steps li.done { background: #111; color: #fff; }
.oc-steps li.now { background: #E41E20; color: #fff; }
.oc-quote { font-style: italic; color: #3d3a35; }

/* ---------- Mästarboken ---------- */
.book { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 180px var(--m) 180px; }
.book h2 { grid-column: 1 / 7; font-size: var(--step-display); }
.book .lede { font-size: var(--step-h3); line-height: 1.25; text-indent: 3em; margin-top: 14vh; }
.book figure { grid-column: 1 / 5; margin-top: -10vh; }
.book figure img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.05); }
.book figcaption { margin-top: 10px; font-size: var(--step-small); color: var(--ink-soft); }
.book .cardset { grid-column: 7 / 13; margin-top: 72px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-content: start; }
.book .cardset > p { font-size: var(--step-body); max-width: 36ch; }
.mk { width: 100%; }
.mk .ui-panel { width: 100%; }
.mk-body { padding: 14px 18px 16px; font-size: 14px; }
.mk-body ol { margin: 8px 0 0; padding-left: 20px; }
.mk-body li { padding: 2px 0; }
.mk-src { margin-top: 10px; padding: 10px 12px; background: #F6F4F0; border-left: 3px solid #E41E20; font-size: 13px; color: #3d3a35; }

/* ---------- Lokal AI: colour page with mosaic ---------- */
.ai { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(46vh, auto); background: var(--night); }
.ai > * { min-width: 0; }
.t-red { grid-column: span 3; background: var(--red); color: #fff; padding: 48px var(--m); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.t-red h2 { font-size: var(--step-display); max-width: 8em; }
.t-red p { font-size: var(--step-lead); line-height: 1.35; max-width: 30ch; }
.t-photo { grid-column: span 3; position: relative; overflow: hidden; margin: 0; }
.t-photo.s2 { grid-column: span 2; }
.t-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: transform 1.2s var(--ease); }
.t-photo:hover img { transform: scale(1.04); }
.t-photo figcaption { position: absolute; left: 16px; bottom: 14px; font-size: var(--step-small); color: #fff; background: rgba(17,17,17,.72); padding: 4px 8px; }
.t-ink { grid-column: span 2; background: var(--night); color: var(--on-night); padding: 40px var(--m); }
.t-ink h3, .t-stone h3 { font-size: var(--step-h3); line-height: 1.1; margin-bottom: 20px; }
.t-ink ul { list-style: none; padding: 0; }
.t-ink li { font-size: var(--step-lead); line-height: 1.3; padding: 10px 0; }
.t-stone { grid-column: span 2; background: var(--stone); padding: 40px var(--m); display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.t-stone p { max-width: 36ch; }
.t-ui { grid-column: span 3; background: var(--paper-2); padding: 40px var(--m); display: flex; align-items: center; justify-content: center; }
.srv-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid #F0EDE8; font-size: 14px; } /* taste-skill-ignore: data-ui */
.srv-row:first-of-type { border-top: 0; }
.srv-row span:first-child { color: #3d3a35; }
.meter { height: 6px; background: #F1EFEB; border-radius: 3px; overflow: hidden; width: 90px; }
.meter i { display: block; height: 100%; background: #111; width: 0; transition: width 1.4s var(--ease); }

/* ---------- FAQ: answers as reading text ---------- */
.faq { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 200px var(--m) 200px; }
.faq h2 { grid-column: 1 / 4; font-size: var(--step-head); line-height: 1.05; }
.faq-text { grid-column: 5 / 13; columns: 2; column-gap: 56px; }
.faq-text p { break-inside: avoid; margin-bottom: 22px; font-size: var(--step-body); line-height: 1.55; }
.faq-text b { font-weight: 500; }

/* ---------- CTA: the idea again, inverted ---------- */
.close { position: relative; z-index: 2; background: var(--ink); color: var(--paper); min-height: 92svh; padding: 18vh var(--m) 48px; display: flex; flex-direction: column; justify-content: space-between; }
.close h2 { font-size: clamp(3.4rem, 1rem + 8.6vw, 10rem); line-height: .92; letter-spacing: -.03em; max-width: 10em; }
.close-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-top: 80px; }
.close-foot p { font-size: var(--step-lead); line-height: 1.4; max-width: 38ch; }
.close .btn { min-height: 60px; padding: 0 30px; font-size: 1.1875rem; }

/* ---------- footer ---------- */
.foot { background: var(--paper); color: var(--ink); min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: 40px var(--m) 24px; position: sticky; bottom: 0; z-index: 1; }
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.foot-cols ul { list-style: none; padding: 0; font-size: 1rem; line-height: 1.6; }
.foot-cols li:first-child { color: var(--ink); font-weight: 500; }
.foot-cols li { color: var(--ink-soft); }
.foot-cols a { text-decoration: none; }
.foot-cols a:hover { color: var(--red); }
.foot-credits { font-size: var(--step-small); color: var(--ink-soft); max-width: 70ch; align-self: end; margin: 64px 0 40px; line-height: 1.5; }
.foot-credits a { color: inherit; }
.wordmark { display: block; width: 100%; color: var(--ink); }
.wordmark svg { width: 100%; height: auto; display: block; }
.legal { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; font-size: var(--step-small); color: var(--ink-soft); }

/* Mästarboken lede wrapper */
.book .lede-wrap { grid-column: 7 / 13; margin-top: 14vh; }
.book .lede-wrap .lede { margin-top: 0; }
.book .lede-body { margin-top: 28px; max-width: 44ch; }

/* ---------- film ---------- */
.film { background: var(--night); color: var(--on-night); padding: 160px var(--m); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 32px; align-items: end; }
.film h2 { grid-column: 1 / 7; font-size: var(--step-head); }
.film p { grid-column: 8 / 13; max-width: 40ch; color: var(--on-night); }
.film video { grid-column: 1 / 13; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; margin-top: 24px; }
@media (max-width: 760px) { .film { display: block; padding: 120px var(--m); } .film p { margin-top: 20px; } .film video { margin-top: 32px; } }

/* ---------- entrances ---------- */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 75ms); }
.js [data-rise].in { opacity: 1; transform: none; }
.js .bar-row[data-grow] .seg { transform: scaleX(.2); opacity: 0; transform-origin: left; transition: transform 1s var(--ease), opacity .6s var(--ease); }
.js .bar-row[data-grow].in .seg { transform: none; opacity: 1; }
.js .bar-row[data-grow].in .seg:nth-child(2) { transition-delay: .12s; }
.js .bar-row[data-grow].in .seg:nth-child(3) { transition-delay: .24s; }
.js .bar-row[data-grow].in .seg:nth-child(4) { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-rise], .js .bar-row[data-grow] .seg { opacity: 1; transform: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  :root { --m: 24px; }
  .bar nav { gap: 18px; }
  .hero-cards .card { width: 190px; }
  .hero-fact { display: none; }
  .ai { grid-template-columns: repeat(2, 1fr); }
  .t-red, .t-photo, .t-photo.s2, .t-ink, .t-stone, .t-ui { grid-column: span 1; }
  .t-red { grid-column: span 2; }
  .t-ui { grid-column: span 2; }
  .bar-row { flex-direction: column; min-height: 0; }
  .seg { min-width: 0; min-height: 96px; gap: 10px; justify-content: flex-start; }
  .seg:nth-child(1) { min-height: 96px; } .seg:nth-child(2) { min-height: 210px; }
  .seg:nth-child(3) { min-height: 120px; } .seg:nth-child(4) { min-height: 240px; }
  .seg p { display: block; font-size: 1rem; line-height: 1.4; max-width: 40ch; }
  .clauses { display: none; }
  .js .bar-row[data-grow] .seg { transform: scaleY(.6); transform-origin: top; }
  .stages .aside { margin-left: 0; }
  .book .cardset { grid-template-columns: 1fr; grid-column: 6 / 13; margin-top: 56px; }
  .book h2 { grid-column: 1 / 13; }
  .book .lede-wrap { grid-column: 1 / 13; margin-top: 40px; }
  .book .lede { max-width: none; }
  .book figure { grid-column: 1 / 6; margin-top: 56px; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  :root { --m: 20px; --axis: 20px; }
  .bar { padding: 16px var(--m); gap: 12px; }
  .bar .logo img { height: 32px; }
  .bar nav { display: none; }
  .bar .bar-cta { min-height: 40px; padding: 0 14px; font-size: .9375rem; }
  .lang { margin-left: auto; padding: 2px; }
  .lang a[aria-current] { display: none; }
  .lang a { padding: 6px 8px 6px 6px; gap: 6px; font-size: .75rem; color: var(--on-night); }
  .lang a:not([aria-current]) svg { filter: none; }

  .hero { align-items: start; }
  .hero-media img { object-position: 60% 50%; }
  .hero-media::after { inset: 0; background: rgba(12,12,12,.55); }
  .hero-copy { padding-top: 34svh; }
  .hero h1 { font-size: 9.6vw; }
  .hero-copy p { font-size: 1.0625rem; margin-top: 24px; }
  .hero-cards { left: var(--m); right: var(--m); bottom: var(--m); gap: 12px; }
  .hero-cards .card { width: auto; flex: 1; }
  .card span { font-size: .9375rem; height: 44px; padding: 0 10px; }

  .split { grid-template-columns: minmax(0, 1fr); }
  .split-out .ui-table th, .split-out .ui-table td { padding-left: 10px; padding-right: 10px; }
  .split-out .ui-table th:first-child, .split-out .ui-table td:first-child { padding-left: 16px; }
  .split-out .ui-table th:last-child, .split-out .ui-table td:last-child { padding-right: 16px; }
  .split-out .ui-table { font-size: 13px; }
  .split-in { padding: 64px var(--m) 120px; }
  .split-out { padding: 120px var(--m) 64px; }
  .note { width: 100%; font-size: 1.125rem; }
  .split h2 { position: static; height: auto; font-size: 11vw; }
  .split h2 .a, .split h2 .b { position: absolute; left: var(--m); bottom: auto; }
  .split h2 .a { top: calc(var(--in-h, 62svh) - 1.25em); }
  .split h2 .b { top: calc(var(--in-h, 62svh) + .3em); }

  .stages { padding: 120px var(--m); }
  .stages h2 { font-size: 11vw; margin-bottom: 40px; }
  .bar-row { flex-direction: column; min-height: 0; }
  .seg { min-width: 0; min-height: 96px; gap: 10px; justify-content: flex-start; }
  .seg:nth-child(1) { min-height: 96px; } .seg:nth-child(2) { min-height: 210px; }
  .seg:nth-child(3) { min-height: 120px; } .seg:nth-child(4) { min-height: 240px; }
  .seg p { display: block; font-size: 1rem; line-height: 1.4; max-width: 30ch; }
  .clauses { display: none; }
  .js .bar-row[data-grow] .seg { transform: scaleY(.6); transform-origin: top; }
  .stages .aside { margin-left: 0; }

  .feat { grid-template-columns: 1fr; grid-template-rows: auto; }
  .feat-h, .feat-stage, .feat-copy { grid-column: 1; grid-row: auto; }
  .feat-h { padding: 120px var(--m) 40px; font-size: 11vw; }
  .feat-stage { height: 46svh; z-index: 3; padding: 16px var(--m); align-items: flex-start; overflow: hidden; }
  .feat-stage .ui-panel { width: 100%; }
  .feat-copy { padding: 56px var(--m) 120px; }
  .feat-copy h2 { margin-bottom: 40px; }
  .cap { min-height: 0; margin-bottom: 72px; }
  .cap h3 { font-size: 1.375rem; }
  .seg-ctrl { display: flex; width: 100%; }
  .seg-ctrl button { flex: 1; padding: 12px 8px; }

  .book { display: block; padding: 120px var(--m); }
  .book h2 { font-size: 13vw; }
  .book .lede-wrap { margin-top: 32px; }
  .book .lede { text-indent: 0; font-size: 1.375rem; margin-top: 32px; }
  .book figure { width: 62%; margin: 40px 0 0 auto; }
  .book figure img { aspect-ratio: 4 / 5; }
  .book .cardset { margin-top: 48px; }

  .ai { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .t-red, .t-photo, .t-photo.s2, .t-ink, .t-stone, .t-ui { grid-column: span 1; }
  .t-red { min-height: 70svh; padding: 40px var(--m); }
  .t-red h2 { font-size: 13vw; }
  .t-photo { height: 52svh; }
  .t-ink, .t-stone, .t-ui { padding: 40px var(--m); }

  .faq { display: block; padding: 120px var(--m); }
  .faq h2 { font-size: 1.75rem; margin-bottom: 32px; }
  .faq-text { columns: 1; }
  .faq-text p { font-size: 1rem; margin-bottom: 18px; }

  .close { min-height: 82svh; padding: 96px var(--m) 32px; }
  .close h2 { font-size: 15vw; }
  .close-foot { flex-direction: column; align-items: stretch; }
  .close-foot p { font-size: 1.0625rem; }
  .close .btn { width: 100%; }

  .foot { padding: 32px var(--m) 16px; }
  .foot-cols { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .foot-cols ul { font-size: .9375rem; }
  .legal { flex-direction: column; gap: 4px; font-size: .8125rem; }
}
