:root {
  /* Brand palette, kept from the first page */
  --bond: #EEF1F4;
  --bond-2: #E1E6EE;
  --paper: #F9FAFC;
  --ink: #16203A;
  --ink-2: #3D4763;
  --carbon: #2B44C9;
  --carbon-deep: #1E33A0;
  --manila: #D8B878;
  --stamp: #C4303A;
  --ok: #1D7247;

  /* Five type steps */
  --t-display: clamp(64px, 9vw, 150px);
  --t-h2: clamp(44px, 6vw, 96px);
  --t-h3: clamp(24px, 2.6vw, 40px);
  --t-body: 18px;
  --t-small: 15px;

  --gutter: clamp(16px, 3vw, 32px);
  --radius: 14px;
  --section: clamp(120px, 14vw, 200px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bond);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font-size: var(--t-h2); line-height: 1; letter-spacing: -0.04em; font-weight: 800; }
h3 { font-size: var(--t-h3); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--carbon); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--carbon); color: #fff; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

#scene { position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: 0; pointer-events: none; opacity: 0; }
main, .foot { position: relative; z-index: 1; }

/* Bar */
.bar { position: sticky; top: 0; z-index: 20; background: var(--bond); }
.bar-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; }
nav { display: flex; gap: 28px; margin-left: auto; }
nav a { text-decoration: none; color: var(--ink-2); font-size: var(--t-small); font-weight: 500; padding: 10px 0; transition: color .15s ease; }
@media (hover: hover) and (pointer: fine) { nav a:hover { color: var(--ink); } }

/* Buttons: one shape, fully round */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform 160ms var(--ease-out), background-color .2s ease, opacity .2s ease; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .38; cursor: not-allowed; transform: none; }
.btn-small { min-height: 44px; padding: 0 20px; font-size: var(--t-small); }
.btn-accent { background: var(--carbon); }
.btn-quiet { background: var(--bond-2); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { background: var(--carbon); }
  .btn-accent:not(:disabled):hover { background: var(--carbon-deep); }
  .btn-quiet:not(:disabled):hover { background: var(--ink); color: #fff; }
}
.link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--carbon); padding: 12px 4px; transition: color .15s ease; }
@media (hover: hover) and (pointer: fine) { .link:hover { color: var(--carbon); } }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

/* Hero: the sentence is the composition */
.hero { min-height: calc(100svh - 64px); display: flex; align-items: center; }
.hero-inner { position: relative; padding-top: clamp(72px, 10vh, 120px); padding-bottom: clamp(56px, 8vh, 96px); }
.sentence { font-size: var(--t-display); line-height: 1; letter-spacing: -0.045em; font-weight: 800; text-align: center; }
.line { display: block; overflow: hidden; padding: 0.04em 0 0.1em; margin-bottom: -0.1em; }
.line-in { display: inline-block; animation: rise 900ms var(--ease-out) both; }
.line:nth-child(2) .line-in { animation-delay: 110ms; }
@keyframes rise { from { transform: translateY(108%); } to { transform: translateY(0); } }

.slot { position: relative; display: inline-block; width: 2.3em; height: 0.74em; vertical-align: -0.02em; border-radius: 0.12em; overflow: hidden; background: #2a2a2a url("assets/thermal-paper.jpg") 70% 28% / 330% auto no-repeat; animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { from { background-position: 66% 22%; } to { background-position: 78% 36%; } }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 22%; background: rgba(120, 146, 255, 0.28); border-bottom: 3px solid #7F95FF; animation: sweep 2.4s var(--ease-in-out) infinite; }
@keyframes sweep { 0% { transform: translateY(-100%); } 55%, 100% { transform: translateY(460%); } }

.chips { list-style: none; margin: 0; padding: 0; }
.chip { position: absolute; display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 12px; background: var(--paper); border-radius: var(--radius); padding: 14px 18px; min-width: 250px; animation: chip-in 700ms var(--ease-out) both; }
.chip-k { font-size: var(--t-small); color: var(--ink-2); }
.chip-v { font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tick { width: 26px; height: 26px; border-radius: 50%; background: var(--ok); position: relative; }
.tick::after { content: ""; position: absolute; left: 8px; top: 7px; width: 9px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg); }
.chip-a { top: clamp(8px, 2vh, 28px); left: 6%; transform: rotate(-3deg); animation-delay: 1000ms; }
.chip-b { top: 46%; right: 1%; transform: rotate(2.5deg); animation-delay: 1180ms; }
.chip-c { bottom: 30%; left: 2%; transform: rotate(-2deg); animation-delay: 1360ms; }
@keyframes chip-in { from { opacity: 0; filter: blur(6px); translate: 0 14px; } to { opacity: 1; filter: blur(0); translate: 0 0; } }

.hero-foot { display: grid; justify-items: center; gap: 28px; margin-top: 64px; text-align: center; animation: fade-up 800ms var(--ease-out) 420ms both; }
.hero-sub { font-size: 20px; max-width: 40ch; }
@keyframes fade-up { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }

/* How: the stage bar is the diagram */
.how { padding: var(--section) 0 calc(var(--section) * 0.8); }
.stages { list-style: none; margin: 64px 0 0; padding: 0; display: flex; gap: 6px; }
.stage { display: grid; grid-template-rows: auto 1fr; gap: 18px; min-width: 12%; }
.stage.s1 { flex: 1 1 0; }
.stage.s2 { flex: 1.3 1 0; }
.stage.s3 { flex: 5.5 1 0; }
.stage.s4 { flex: 1.2 1 0; }
.dur { display: block; min-height: 22vh; padding: 20px; border-radius: var(--radius); font-size: clamp(20px, 2vw, 30px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; transform-origin: left center; }
.s1 .dur { background: var(--manila); }
.s2 .dur { background: #C9D2E0; }
.s3 .dur { background: var(--carbon); color: #fff; }
.s4 .dur { background: var(--ink); color: #fff; }
.stage p { font-size: 17px; max-width: 24ch; }
.stage p b { font-weight: 700; }
.fil { margin-top: 56px; font-style: italic; color: var(--ink-2); }

/* Try: the live thing */
.try { background: var(--bond-2); padding: var(--section) 0; }
.try-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; }
.try-head p { font-size: 20px; max-width: 38ch; }
.picker { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 56px; }
.pick { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--ink); background: var(--paper); border: 0; border-radius: var(--radius); padding: 14px 20px; min-height: 64px; cursor: pointer; transition: transform 160ms var(--ease-out), background-color .2s ease, color .2s ease; }
.pick:active { transform: scale(0.97); }
.pick-name { font-weight: 700; }
.pick-meta { font-size: var(--t-small); color: var(--ink-2); transition: color .2s ease; }
.pick[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pick[aria-pressed="true"] .pick-meta { color: #C9D2E0; }
@media (hover: hover) and (pointer: fine) { .pick:not([aria-pressed="true"]):hover { background: #fff; } }

.reader { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; margin-top: 20px; }
.receipt-stage { background: var(--ink); border-radius: var(--radius); min-height: 540px; display: grid; place-items: center; padding: 40px 24px; overflow: hidden; }
.receipt { position: relative; width: min(320px, 100%); background: #FBFBF6; color: #24262B; font-family: "Special Elite", "Courier New", monospace; /* taste-skill-ignore: thermal-printer face inside the data-ui receipt fragment */ font-size: 15px; line-height: 1.5; padding: 26px 22px 30px; rotate: -1.5deg; overflow: hidden; transition: opacity .3s ease, translate .5s var(--ease-out); }
.receipt.swap { opacity: 0; translate: 0 18px; }
.receipt-empty { font-family: "Schibsted Grotesk", system-ui, sans-serif; color: var(--ink-2); text-align: center; padding: 40px 0; }
.receipt .c { text-align: center; }
.receipt .gap { height: 12px; }
.receipt .rowx { display: flex; justify-content: space-between; gap: 12px; }
.receipt .hl { border-radius: 3px; transition: background-color .25s ease; }
.receipt .hl.on { background: rgba(43, 68, 201, 0.16); }
.receipt .bar-scan { position: absolute; left: 0; right: 0; top: 0; height: 64px; background: rgba(120, 146, 255, 0.2); border-bottom: 3px solid #6F86FF; transform: translateY(-100%); pointer-events: none; }
.receipt .bar-scan.go { animation: read 1300ms var(--ease-in-out) forwards; }
@keyframes read { to { transform: translateY(var(--h, 520px)); } }

.readout { background: var(--paper); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.readout-title { font-size: 22px; letter-spacing: -0.01em; }
.fields { margin: 0; display: grid; gap: 12px; }
.fields > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; align-items: baseline; }
.fields dt { font-size: var(--t-small); color: var(--ink-2); }
.fields dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; min-height: 1.55em; }
.fields dd.fill { animation: fill-in 420ms var(--ease-out) both; }
@keyframes fill-in { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: blur(0); } }
.read-status { font-size: var(--t-small); color: var(--ink-2); min-height: 1.55em; margin-top: auto; }
.read-status.ok { color: var(--ok); font-weight: 600; }

.slsp { background: var(--paper); border-radius: var(--radius); padding: 28px; margin-top: 20px; }
.slsp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.slsp-head h3 { font-size: 22px; letter-spacing: -0.01em; }
.sample-tag { font-size: var(--t-small); font-weight: 600; color: var(--ink-2); background: var(--bond-2); border-radius: 999px; padding: 3px 10px; margin-left: 8px; vertical-align: 3px; }
.table-wrap { overflow-x: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 640px; }
th { text-align: left; font-weight: 600; font-size: var(--t-small); color: var(--ink-2); padding: 10px 12px; border-bottom: 1px solid #D5DCE6; }
td { padding: 14px 12px; border-bottom: 1px solid #E4E9F0; font-variant-numeric: tabular-nums; }
.num { text-align: right; }
.empty-row td { color: var(--ink-2); padding: 22px 12px; }
tr.new { animation: row-in 900ms var(--ease-out) both; }
@keyframes row-in { from { background: rgba(216, 184, 120, 0.55); opacity: 0; } 30% { opacity: 1; } to { background: transparent; } }
.totals { margin: 24px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.totals > div { background: var(--bond); border-radius: 10px; padding: 14px 16px; }
.totals dt { font-size: var(--t-small); color: var(--ink-2); }
.totals dd { margin: 4px 0 0; font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.totals dd.bump { animation: bump 500ms var(--ease-out); }
@keyframes bump { 40% { color: var(--carbon); } }

/* Features: rows hanging from one axis */
.features { background: var(--bond); padding: var(--section) 0; }
.features h2.axis { margin-left: 35%; max-width: 13ch; min-height: 50svh; display: flex; align-items: center; }
.row { display: grid; grid-template-columns: 35% minmax(0, 1fr) auto; gap: 32px; align-items: start; margin-top: 112px; }
.row .axis { grid-column: 2; max-width: 34ch; }
.row .axis p { margin-top: 14px; font-size: 17px; }
.row > :last-child { grid-column: 3; }
.photo { margin: 0; overflow: hidden; }
.photo img { width: 100%; height: auto; object-fit: cover; }
.photo figcaption { font-size: var(--t-small); color: var(--ink-2); margin-top: 10px; max-width: 30ch; }
.p-tall { width: 300px; } .p-tall img { aspect-ratio: 4 / 5; object-position: 38% 25%; }
.p-wide { width: 420px; } .p-wide img { aspect-ratio: 3 / 2; }
.p-square { width: 260px; } .p-square img { aspect-ratio: 1; object-position: 62% 50%; }
.p-portrait { width: 300px; } .p-portrait img { aspect-ratio: 4 / 5; object-position: 45% 50%; }
.ui-totals { width: 360px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px; }
.ui-totals-title { font-size: var(--t-small); color: #C9D2E0; }
.ui-totals dl { margin: 14px 0 0; display: grid; gap: 10px; }
.ui-totals dl > div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.ui-totals dt { color: #C9D2E0; }
.ui-totals dd { margin: 0; font-weight: 600; }
.ui-totals .sum { margin-top: 6px; padding-top: 12px; border-top: 2px solid #3A4566; }
.ui-totals .sum dt, .ui-totals .sum dd { color: #fff; font-weight: 800; font-size: 1.15rem; }

/* Story: the 3D envelope */
.story { padding-top: var(--section); }
.story-title { max-width: 11ch; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 92vh; display: flex; align-items: center; }
.step-card { max-width: 27rem; padding: 28px 0; }
.step-card h3 { margin: 18px 0 12px; }
.step-card p { font-size: 18px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-small); font-weight: 600; padding: 6px 14px 6px 12px; border-radius: 999px; background: var(--bond-2); white-space: nowrap; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.s-received { color: #A8262F; }
.s-scanned { color: var(--carbon); }
.s-held { color: #5B4A1E; }
.s-released { color: var(--ok); }

/* Without the 3D scene the story becomes a plain list */
.no-3d .step { min-height: auto; padding: 24px 0; }
.no-3d .steps { margin-top: 48px; }

/* FAQ: large questions, answers beside */
.faq { background: var(--bond); padding: var(--section) 0; }
.faq-grid { display: grid; grid-template-columns: 6fr 1fr 5fr; row-gap: 80px; align-items: start; }
.faq .q { grid-column: 1; font-size: var(--t-h3); line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; max-width: 22ch; }
.faq .q.soft { color: var(--ink-2); }
.faq .a { grid-column: 3; font-size: 18px; max-width: 40ch; padding-top: 0.35em; }

/* CTA: the idea again, inverted */
.cta { background: var(--ink); color: var(--bond); }
.cta-inner { min-height: 90svh; display: flex; flex-direction: column; justify-content: space-between; padding-top: clamp(96px, 14vh, 160px); padding-bottom: 40px; }
.cta h2 { font-size: clamp(64px, 10vw, 168px); line-height: 0.92; letter-spacing: -0.05em; max-width: 9ch; }
.cta-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; }
.cta-foot p { font-size: 20px; max-width: 34ch; }
.cta .btn { min-height: 56px; }

/* Footer: the name returns */
.foot { background: var(--manila); color: var(--ink); }
.foot .wrap { min-height: 90svh; display: flex; flex-direction: column; padding-top: 40px; padding-bottom: 28px; }
.foot-top { display: flex; justify-content: space-between; gap: 24px; font-size: var(--t-small); }
.foot-top p { max-width: 46ch; }
.foot-top .link { padding: 12px 0; text-decoration-color: var(--ink); align-self: flex-start; }
.foot-mark { margin-top: auto; font-size: clamp(72px, 19.5vw, 300px); font-weight: 800; letter-spacing: -0.06em; line-height: 0.85; }
.foot-meta { display: flex; justify-content: space-between; gap: 24px; margin-top: 28px; font-size: 14px; }
.foot-meta p:first-child { max-width: 90ch; }

/* Toast floats, so it may carry depth */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 40; transform: translate(-50%, 16px); opacity: 0; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: var(--t-small); pointer-events: none; box-shadow: 0 12px 32px rgba(22, 32, 58, 0.25); /* taste-skill-ignore: the toast is a floating overlay */ transition: opacity .2s ease, transform .25s var(--ease-out); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Entrances: only when script runs, so nothing can stay hidden */
.js [data-reveal] { opacity: 0; translate: 0 26px; transition: opacity 700ms ease, translate 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-reveal].in { opacity: 1; translate: 0 0; }
.js .stages[data-reveal] { translate: none; }
.js .stages[data-reveal] .dur { transform: scaleX(0.04); transition: transform 1100ms var(--ease-in-out); }
.js .stages[data-reveal] .s2 .dur { transition-delay: 90ms; }
.js .stages[data-reveal] .s3 .dur { transition-delay: 180ms; }
.js .stages[data-reveal] .s4 .dur { transition-delay: 270ms; }
.js .stages[data-reveal].in .dur { transform: none; }
.js .row[data-reveal] .photo img { scale: 1.12; transition: scale 1800ms var(--ease-out); }
.js .row[data-reveal].in .photo img { scale: 1; }

/* Narrow screens */
@media (max-width: 899px) {
  nav { display: none; }
  .bar-inner { justify-content: space-between; }
  .sentence { font-size: 12.5vw; }
  .hero { min-height: auto; }
  .hero-inner { padding-top: 48px; }
  .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; }
  .chip { position: static; transform: none; min-width: 0; padding: 12px 14px; }
  .chip-v { font-size: 1rem; }
  .hero-foot { margin-top: 40px; }
  .hero-sub { font-size: 18px; }

  .stages { flex-direction: column; }
  .stage { min-width: 0; grid-template-rows: auto auto; gap: 10px; }
  .dur { min-height: 72px; font-size: 22px; }
  .s3 .dur { min-height: 30svh; }
  .js .stages[data-reveal] .dur { transform: scaleY(0.2); transform-origin: top center; }

  .try-head { grid-template-columns: 1fr; }
  .pick { flex: 1 1 100%; }
  .reader { grid-template-columns: 1fr; }
  .receipt-stage { min-height: 460px; }
  .totals { grid-template-columns: repeat(2, 1fr); }
  .readout, .slsp { padding: 22px 18px; }
  .fields > div { grid-template-columns: 4.6rem 1fr; }
  .fields dd { font-size: 16px; overflow-wrap: anywhere; }
  .fields dd[data-f="tin"] { white-space: nowrap; }

  .features h2.axis { margin-left: 0; min-height: 36svh; }
  .row { grid-template-columns: 1fr; gap: 24px; margin-top: 64px; }
  .row .axis, .row > :last-child { grid-column: 1; }
  .p-tall, .p-wide, .ui-totals { width: 100%; }
  .p-square { width: 70%; justify-self: end; }
  .p-portrait { width: 55%; }

  .step { align-items: flex-end; min-height: 100svh; padding-bottom: 6svh; }
  .no-3d .step { min-height: auto; padding: 12px 0; }
  .step-card { background: var(--paper); border-radius: 18px; padding: 22px; }

  .faq-grid { grid-template-columns: 1fr; row-gap: 12px; }
  .faq .q, .faq .a { grid-column: 1; }
  .faq .a { margin-bottom: 44px; padding-top: 0; }
  .faq .q.soft { margin-bottom: 32px; }
  .faq-grid > div:empty { display: none; }

  .cta-inner { min-height: 80svh; }
  .cta h2 { font-size: 15vw; }
  .cta-foot .btn { width: 100%; }

  .foot-top, .foot-meta { flex-direction: column; }
  .foot-mark { font-size: 19vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .line-in, .chip, .hero-foot { animation-name: fade-only; }
  .slot, .scan { animation: none; }
  .scan { display: none; }
  .js [data-reveal] { translate: none; transition: opacity 400ms ease; }
  .js .stages[data-reveal] .dur, .js .row[data-reveal] .photo img { transform: none; scale: 1; transition: none; }
  .receipt .bar-scan.go { animation: none; }
}
@keyframes fade-only { from { opacity: 0; } to { opacity: 1; } }
