/* Rakho: one stylesheet.
   Direction "the object, large": Schibsted Grotesk, square corners, dark fields for the pieces, slow crossfades.
   Colours (2026-10-25): walnut + chalk + Multani blue; the logo is the chair h (brand/final in the social kit). Old base.css + sections.css are in backups/. */

:root {
  --bg: #ebe6df; --surface: #dfd8ce; --surface-2: #d3cabd;          /* chalk */
  --ink: #2a1c14; --muted: #64574d;                                   /* walnut ink */
  --accent: #1f5c99; --accent-hi: #2a6db3; --on-accent: #fff;         /* Multani blue; light blue on dark fields (below) */
  --field-1: #3a2619; --field-2: #4a3223; --on-dark: #ebe6df; --muted-dark: #bcae9f;
  --bad: #a3261b; --ok: #3f5e1f;
  --brick: var(--ink); /* end dots of the measurement lines (dims.js) */

  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
  --t-small: .875rem;
  --t-body: 1.0625rem;
  --t-lead: clamp(1.25rem, 1.1rem + .55vw, 1.625rem);
  --t-title: clamp(1.75rem, 1.45rem + 1vw, 2.5rem);
  --t-head: clamp(2rem, 1.35rem + 2.7vw, 4rem);
  --t-display: clamp(2.375rem, 12.2vw, 8.75rem);

  --gut: clamp(1.25rem, 4vw, 3rem);
  --max: 90rem;
  --px: max(var(--gut), calc((100% - var(--max)) / 2));
  --sec: clamp(6rem, 11vw, 9.5rem);
  --cg: clamp(1rem, 3.4vw, 3rem); /* column gap of the page's thirds */
  --top: 4rem;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --focus: var(--ink);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--top); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--t-body)/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; border-radius: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
h1, h2, h3 { font-weight: 800; text-wrap: balance; }
p, dd, summary { text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }
[lang="ur"] { font-family: var(--urdu); font-weight: 400; line-height: 2; letter-spacing: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* on walnut fields the accent turns light blue with walnut text on it (blue on walnut is too dark to read) */
.hero, .show__panel--dark, .makers__panel, .foot, .how__tile--3, .p__tip, .top:not(.is-solid) { --accent: #8fb6dd; --accent-hi: #a9c8e7; --on-accent: var(--ink); --focus: var(--accent); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ico { width: 1.25rem; height: 1.25rem; flex: none; fill: currentColor; }
.skip {
  position: fixed; left: var(--gut); top: .75rem; z-index: 90; transform: translateY(-200%);
  background: var(--accent); color: var(--on-accent); padding: .8rem 1.1rem; font-weight: 600; text-decoration: none;
}
.skip:focus { transform: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.25rem; padding: 0 1.4rem;
  background: var(--b, var(--ink)); color: var(--f, var(--bg));
  font-weight: 600; font-size: var(--t-body); line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, transform .12s var(--ease);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn--brass { --b: var(--accent); --f: var(--on-accent); } /* the accent button (name kept for the JS) */
.btn--ink { --b: var(--ink); --f: var(--bg); }
.btn--paper { --b: var(--bg); --f: var(--ink); }
.btn--surface { --b: var(--surface); --f: var(--ink); }
.link {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color .2s ease;
}
@media (hover: hover) {
  .btn--brass:hover { --b: var(--accent-hi); }
  .btn--ink:hover { --b: #4a3223; }
  .btn--paper:hover { --b: #f6f2ec; }
  .btn--surface:hover { --b: var(--surface-2); }
  .link:hover { text-decoration-color: currentColor; }
}

/* ---------- header ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 40; background: var(--field-1); color: var(--on-dark); transition: background-color .3s ease, color .3s ease; }
.top.is-solid { background: var(--bg); color: var(--ink); }
.top__in { height: var(--top); padding: 0 var(--px); display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: var(--t-lead); letter-spacing: -.025em; line-height: 1; text-decoration: none; }
.brand svg { height: 1.35rem; width: auto; flex: none; } /* the chair-h wordmark, takes the text colour */
.top__nav { display: flex; gap: 1.75rem; margin-left: auto; }
.top__nav a { font-weight: 600; font-size: var(--t-small); text-decoration: none; padding: .8rem 0; text-underline-offset: .4em; text-decoration-thickness: 2px; }
.top__nav a:hover { text-decoration-line: underline; }
.tab {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 1rem;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: var(--t-small); text-decoration: none;
  transition: background-color .2s ease, transform .12s var(--ease);
}
.tab:active { transform: scale(.97); }
@media (hover: hover) { .tab:hover { background: var(--accent-hi); } }
@media (max-width: 47.99rem) { .top__nav { display: none; } .tab { margin-left: auto; } }

/* ---------- hero: the piece splits the headline ---------- */
.hero {
  position: relative; display: grid; overflow: clip;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(19rem, 56svh) auto;
  padding: calc(var(--top) + 1.25rem) var(--px) 2.75rem;
  background: var(--field-1); color: var(--on-dark);
}
.hero__title {
  grid-row: 1 / 4; grid-column: 1 / -1; z-index: 0;
  display: grid; grid-template-rows: subgrid; pointer-events: none;
  font-size: var(--t-display); line-height: .9; letter-spacing: -.045em;
}
.hero__title .l { display: block; white-space: nowrap; }
.hero__title .l1 { grid-row: 1; align-self: start; }
.hero__title .l2 { grid-row: 3; align-self: end; justify-self: end; color: var(--accent); }
.hero__mv {
  /* the piece stands in the gap between the two lines and never covers them */
  grid-row: 2; grid-column: 1 / -1; z-index: 1;
  width: auto; height: auto; min-height: 0; margin: .25rem calc(-1 * var(--gut)) 0;
  background: transparent; --poster-color: transparent;
}

@media (min-width: 60rem) {
  .hero { grid-template-rows: auto minmax(0, 1fr) auto; min-height: max(44rem, 100svh); padding-bottom: 2.25rem; }
  .hero__mv { margin: -.5rem 0 -.75rem; }
}

/* ---------- intro: the promise in English and Urdu, then how ---------- */
.intro { display: grid; gap: 1.5rem; padding: var(--sec) var(--px) 0; }
.intro__big { font-size: var(--t-head); font-weight: 800; line-height: 1; letter-spacing: -.035em; text-wrap: balance; }
.intro__ur { font-size: var(--t-title); color: var(--muted); text-align: start; line-height: 1.9; text-wrap: balance; padding-inline: .3em; }
.intro__more { display: grid; gap: 1.75rem; max-width: 40rem; }
.intro__more > p { font-size: var(--t-lead); line-height: 1.35; letter-spacing: -.01em; }
.intro__acts { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
@media (min-width: 60rem) {
  .intro { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--cg); row-gap: 3rem; }
  .intro__big { grid-column: 1 / 3; }
  .intro__ur { grid-column: 3; align-self: end; }
  .intro__more { grid-column: 2 / 4; }
}

/* ---------- showcase: two pieces, two fields ---------- */
.show { padding: var(--sec) var(--px) 0; }
.show__title, .sec-head h2, .how__title, .makers__title, .faq__title { font-size: var(--t-head); line-height: 1; letter-spacing: -.035em; }
.show__title { margin-bottom: 2.5rem; max-width: 12ch; }
.show__pair { display: grid; gap: 1rem; }
.show__panel { display: flex; flex-direction: column; min-height: 32rem; padding: clamp(1.25rem, 2.5vw, 2rem); }
.show__panel--dark { background: var(--field-1); color: var(--on-dark); }
.show__panel--light { background: var(--surface); color: var(--ink); }
.show__img { flex: 1; display: grid; place-items: center; min-height: 17rem; padding: 1.5rem 0; }
.show__img img { grid-area: 1 / 1; width: 100%; height: 100%; max-height: 30rem; object-fit: contain; }
.show__img--low img { max-height: 25rem; }
.show__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 1.5rem; }
.show__row p { display: flex; flex-direction: column; gap: .15rem; font-size: var(--t-small); }
.show__row b { font-size: var(--t-lead); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; margin-bottom: .2rem; }
.show__panel--dark .show__row p > span { color: var(--muted-dark); }
.show__acts { display: flex; align-items: center; gap: 1.25rem; }
@media (min-width: 52rem) { .show__pair { grid-template-columns: 2fr 1fr; column-gap: var(--cg); } .show__panel { min-height: 40rem; } }

/* slow crossfade between the two angles */
.xfade img { animation: xa 16s ease-in-out infinite; }
.xfade img:nth-child(2) { animation-name: xb; }
.show__panel--light .xfade img { animation-delay: -6s; }
@keyframes xa { 0%, 42% { opacity: 1; } 50%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes xb { 0%, 42% { opacity: 0; } 50%, 92% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- collection ---------- */
.collection { padding: var(--sec) var(--px) 0; }
.sec-head { display: grid; gap: 1.25rem; margin-bottom: 2.25rem; }
.sec-head p { max-width: 34rem; }
@media (min-width: 60rem) { .sec-head { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; column-gap: var(--cg); } .sec-head p { grid-column: 2 / 4; } }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.chip {
  min-height: 2.75rem; padding: 0 1rem; background: var(--surface);
  font-weight: 600; font-size: var(--t-small);
  transition: background-color .2s ease, color .2s ease, transform .12s var(--ease);
}
.chip:active { transform: scale(.96); }
.chip.is-on { background: var(--ink); color: var(--bg); }
@media (hover: hover) { .chip:not(.is-on):hover { background: var(--surface-2); } }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 1rem; }
@media (min-width: 48rem) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5rem var(--cg); } }
.card { position: relative; display: flex; flex-direction: column; cursor: pointer; }
.card__media { position: relative; aspect-ratio: 1; background: var(--surface); margin-bottom: .9rem; overflow: hidden; }
.card__media img { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: contain; transition: opacity .5s ease, transform .7s var(--ease); }
.card__media .alt { opacity: 0; }
@media (hover: hover) {
  .card:hover .card__media .alt { opacity: 1; }
  .card:hover .card__media .main { opacity: 0; }
  .card:hover .card__media img { transform: scale(1.035); }
}
.card__name { font-size: var(--t-body); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.card__btn { text-align: left; font-weight: inherit; line-height: inherit; letter-spacing: inherit; }
.card__btn:focus-visible { outline: none; }
.card:has(.card__btn:focus-visible) { outline: 3px solid var(--focus); outline-offset: 5px; }
.card__studio { font-size: var(--t-small); color: var(--muted); margin-top: .15rem; }
.card__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .75rem; margin-top: .45rem; font-size: var(--t-small); font-weight: 600; }

/* ---------- how it works: tiles that grow ---------- */
.how { padding: var(--sec) var(--px) 0; }
.how__title { margin-bottom: 2.5rem; max-width: 13ch; }
.how__steps { display: grid; gap: 3rem; }
.how__tile { position: relative; display: grid; place-items: end center; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); margin-bottom: 1.25rem; }
.how__tile img { position: relative; z-index: 1; width: var(--s); margin-bottom: 11%; }
.how__tile--1 { --s: 40%; }
.how__tile--2 { --s: 56%; }
.how__tile--3 { --s: 76%; background: var(--field-1); }
.how__ring { position: absolute; left: 12%; bottom: 6%; width: 76%; height: auto; fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 7 7; }
.how__badge { position: absolute; top: 1rem; left: 1rem; z-index: 2; padding: .45rem .75rem; background: var(--accent); color: var(--on-accent); font-size: var(--t-small); font-weight: 600; }
.how__text h3 { font-size: var(--t-lead); font-weight: 600; line-height: 1.2; letter-spacing: -.015em; margin-bottom: .5rem; }
.how__text p { max-width: 30rem; }
.how__step:nth-child(1) .how__tile { width: 66%; }
.how__step:nth-child(2) .how__tile { width: 83%; }
@media (min-width: 48rem) {
  .how__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto; column-gap: var(--cg); row-gap: 0; }
  .how__step { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
  .how__tile { align-self: end; }
}

/* ---------- makers: inset panel, arch-shaped picture ---------- */
.makers { padding: var(--sec) var(--px) 0; }
.makers__panel { display: grid; gap: 2.25rem; padding: clamp(1.5rem, 5vw, 4.5rem); background: var(--field-1); color: var(--on-dark); }
.makers__arch { aspect-ratio: 4 / 5; max-width: 26rem; overflow: hidden; border-radius: 999px 999px 0 0; background: var(--field-2); }
.makers__arch img { width: 100%; height: 100%; object-fit: cover; }
.makers__text { display: grid; gap: 1.75rem; align-content: start; }
.makers__block h3 { font-size: var(--t-lead); font-weight: 600; line-height: 1.2; color: var(--accent); margin-bottom: .5rem; }
.makers__block p { max-width: 34rem; }
.makers .btn { justify-self: start; white-space: normal; text-align: center; padding-block: .6rem; }
@media (min-width: 60rem) {
  .makers__panel { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "title title" "arch text"; column-gap: clamp(2rem, 6vw, 6rem); row-gap: 3.5rem; }
  .makers__title { grid-area: title; max-width: 16ch; }
  .makers__arch { grid-area: arch; }
  .makers__text { grid-area: text; align-self: end; }
}

/* ---------- FAQ: wide heading, questions set in ---------- */
.faq { padding: var(--sec) var(--px); }
.faq__title { margin-bottom: 2.5rem; }
@media (min-width: 60rem) { .faq__list { margin-left: calc((100% - 2 * var(--cg)) / 3 + var(--cg)); } }
.faq details { border-top: 2px solid var(--ink); }
.faq details:last-child { border-bottom: 2px solid var(--ink); }
.faq summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding: 1.25rem 0; cursor: pointer; list-style: none;
  font-size: var(--t-lead); font-weight: 600; line-height: 1.25; letter-spacing: -.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-weight: 400; line-height: 1; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { max-width: 40rem; padding-bottom: 1.6rem; }

/* ---------- footer: the piece returns, the name across it ---------- */
.foot { display: grid; gap: 2.5rem; overflow: clip; padding: 3rem var(--px) 1.75rem; background: var(--field-1); color: var(--on-dark); }
.foot__top { position: relative; z-index: 2; display: grid; gap: 1.75rem; }
.foot__links { display: flex; flex-direction: column; align-items: flex-start; }
.foot__links a { padding: .3rem 0; font-size: var(--t-lead); font-weight: 600; text-decoration: none; }
.foot__links a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; }
.foot__contact { display: grid; gap: .3rem; align-content: start; justify-items: start; font-size: var(--t-small); color: var(--muted-dark); }
.foot__contact a { padding: .4rem 0; color: var(--accent); font-size: var(--t-body); font-weight: 600; }
.foot__stage { position: relative; display: grid; align-items: end; min-height: clamp(17rem, 68vw, 40rem); }
.foot__img { position: absolute; right: 0; bottom: 14%; height: 92%; width: auto; max-width: 74%; object-fit: contain; object-position: right bottom; pointer-events: none; }
.foot__mark { position: relative; z-index: 1; }
.foot__mark svg { height: clamp(4rem, 18.5vw, 17rem); width: auto; max-width: 100%; } /* the chair-h wordmark at full width */
.foot__legal { position: relative; z-index: 2; max-width: 46rem; font-size: var(--t-small); color: var(--muted-dark); }
@media (min-width: 48rem) {
  .foot__top { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--cg); }
}

/* ---------- product sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; }
.sheet__scrim { position: absolute; inset: 0; background: rgb(42 28 20 / .62); opacity: 0; transition: opacity .35s ease; }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet__panel {
  position: relative; width: 100%; height: min(94svh, 60rem); overflow: hidden;
  display: grid; grid-template-rows: minmax(0, 46%) minmax(0, 1fr) auto;
  background: var(--bg); transform: translateY(100%); transition: transform .42s var(--ease);
}
.sheet.is-open .sheet__panel { transform: none; }
.sheet.is-dragging .sheet__panel { transition: none; }
.sheet__grab { position: absolute; top: 0; left: 50%; z-index: 6; width: 7.5rem; height: 1.75rem; margin-left: -3.75rem; touch-action: none; cursor: grab; }
.sheet__grab::before { content: ""; display: block; width: 2.5rem; height: 4px; margin: .55rem auto 0; background: rgb(42 28 20 / .3); }
.sheet__x { position: absolute; top: .75rem; right: .75rem; z-index: 7; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; background: var(--bg); color: var(--ink); transition: transform .12s var(--ease); }
.sheet__x:active { transform: scale(.94); }
.sheet__view { position: relative; min-height: 0; overflow: hidden; background: var(--surface); }
.mv--sheet { width: 100%; height: 100%; background: transparent; --poster-color: transparent; }
.view__tools { position: absolute; left: .75rem; right: .75rem; bottom: .75rem; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: .5rem; pointer-events: none; }
.view__tools > * { pointer-events: auto; }
.pill { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: 0 .9rem; background: var(--bg); font-size: var(--t-small); font-weight: 600; }
.pill::before { content: ""; width: .8rem; height: .8rem; border: 2px solid var(--ink); transition: background-color .2s ease; }
.pill.is-on::before { background: var(--ink); }
.seg { display: inline-flex; padding: 3px; background: var(--bg); }
.seg button { min-width: 2.75rem; min-height: calc(2.75rem - 6px); padding: 0 .8rem; font-size: var(--t-small); font-weight: 600; transition: background-color .2s ease, color .2s ease; }
.seg button.is-on { background: var(--ink); color: var(--bg); }
.sheet__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 1rem; padding: 1.5rem var(--gut); }
.p__name { padding-right: 3rem; font-size: var(--t-title); line-height: 1.05; letter-spacing: -.03em; }
.p__studio { margin-top: -.9rem; font-size: var(--t-small); font-weight: 600; color: var(--muted); }
.p__price { font-size: var(--t-lead); font-weight: 600; }
.p__price small { margin-left: .4rem; font-size: var(--t-small); font-weight: 400; color: var(--muted); }
.p__size { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.p__size div { padding: .75rem .9rem; background: var(--surface); }
.p__size dt { font-size: var(--t-small); font-weight: 600; }
.p__size dd { display: flex; flex-direction: column; margin-top: .2rem; font-size: var(--t-lead); font-weight: 600; line-height: 1.15; }
.p__size dd small { font-size: var(--t-small); font-weight: 400; }
.p__facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; font-size: var(--t-small); }
.p__facts dt { color: var(--muted); }
.p__facts dd { font-weight: 600; text-align: right; }
.fit { display: grid; gap: .75rem; padding: 1rem; background: var(--surface); }
.fit__q { font-size: var(--t-small); font-weight: 600; }
.fit__row { display: flex; align-items: center; gap: .75rem; }
.fit__row input {
  width: 8rem; min-height: 3rem; padding: 0 .9rem; border: 2px solid var(--ink); border-radius: 0; background: var(--bg);
  font-size: var(--t-lead); font-weight: 600;
}
.fit__row input:focus-visible { outline-offset: 2px; }
.fit__unit { font-weight: 600; }
.fit__bar { position: relative; height: .625rem; background: var(--bg); }
.fit__piece { position: absolute; top: 0; bottom: 0; left: 50%; width: var(--w, 0%); translate: -50% 0; background: var(--ink); transition: width .5s var(--ease), background-color .3s ease; }
.fit.is-ok .fit__piece { background: var(--ok); }
.fit.is-bad .fit__piece { width: 100%; background: var(--bad); }
.fit__msg { font-size: var(--t-small); }
.fit.is-bad .fit__msg { color: var(--bad); font-weight: 600; }
.p__tip { padding: .9rem 1rem; background: var(--ink); color: var(--on-dark); font-size: var(--t-small); }
.p__tip b { color: var(--accent); font-weight: 600; }
.sheet__actions { display: flex; gap: .5rem; padding: .75rem var(--gut) calc(.75rem + env(safe-area-inset-bottom)); background: var(--bg); }
.btn--grow { flex: 1; }
.sheet.kb-open .sheet__panel { grid-template-rows: 0 minmax(0, 1fr) auto; }
@media (max-width: 30rem) { .btn--wa { padding: 0 1.1rem; } .btn--wa span { display: none; } }
@media (min-width: 60rem) {
  .sheet { align-items: center; justify-items: center; padding: 2rem; }
  .sheet__panel {
    width: min(100%, 72rem); height: min(100%, 52rem);
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
    opacity: 0; transform: translateY(1.5rem); transition: transform .42s var(--ease), opacity .3s ease;
  }
  .sheet.is-open .sheet__panel { opacity: 1; }
  .sheet__view { grid-row: 1 / 3; }
  .sheet__body { grid-column: 2; padding: 1.75rem 2rem 1rem; }
  .sheet__actions { grid-column: 2; padding: 1rem 2rem 1.5rem; }
  .sheet__grab { display: none; }
}

/* model-viewer bits */
.mv-progress { position: absolute; top: 0; left: 0; right: 0; z-index: 4; height: 3px; transition: opacity .4s ease .2s; }
.mv-progress i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .25s ease; }
.mv-progress.is-done { opacity: 0; }
.dims { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; overflow: visible; pointer-events: none; transition: opacity .3s ease; }
.dims line { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 1s var(--ease); }
.dims.is-drawn line { stroke-dashoffset: 0; }
.dims circle { opacity: 0; transition: opacity .3s ease .6s; }
.dims.is-drawn circle { opacity: 1; }
.dim-label { padding: .3rem .5rem; background: var(--ink); color: var(--bg); font-size: var(--t-small); font-weight: 600; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.dims-on .dim-label { opacity: 1; }
.dims-off .dims, .dims-off .dim-label { opacity: 0; }
.dim-dot { width: 1px; height: 1px; padding: 0; border: 0; background: none; opacity: 0; pointer-events: none; } /* taste-skill-ignore: invisible model-viewer hotspot anchor, not a rule */

/* ---------- toast + QR ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom)); z-index: 80;
  max-width: min(92vw, 30rem); padding: .9rem 1.1rem; background: var(--ink); color: var(--bg);
  font-size: var(--t-small); font-weight: 600; translate: -50% 1rem; opacity: 0; pointer-events: none;
  transition: opacity .3s ease, translate .4s var(--ease);
}
.toast.is-on { opacity: 1; translate: -50% 0; }
.qr { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 1.5rem; }
.qr__scrim { position: absolute; inset: 0; background: rgb(42 28 20 / .62); }
.qr__card { position: relative; display: grid; grid-template-columns: 11rem minmax(0, 1fr); align-items: center; gap: 1.75rem; max-width: 38rem; padding: 2rem 3.5rem 2rem 2rem; background: var(--bg); }
.qr__card h3 { margin-bottom: .6rem; font-size: var(--t-title); line-height: 1.05; letter-spacing: -.03em; }
.qr__small { margin-top: .6rem; font-size: var(--t-small); color: var(--muted); }
.qr__code svg { width: 100%; height: auto; }
.qr__code .m { animation: qrin .3s ease-out backwards; animation-delay: calc(var(--k) * 1.2ms); }
@keyframes qrin { from { opacity: 0; } }
.qr__card--note { grid-template-columns: minmax(0, 1fr); max-width: 30rem; padding: 1.75rem 1.5rem 1.5rem; }
.qr__card--note h3 { padding-right: 2.5rem; }
.note__list { margin: .9rem 0 0; padding-left: 1.1rem; list-style: square; display: grid; gap: .6rem; font-size: var(--t-small); line-height: 1.5; }
.note__list li::marker { color: var(--muted); }
.note__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.note__actions .btn { flex: 1 1 8rem; }

/* ---------- motion: one soft hero fade; everything else shows real data (lines draw, fit bar grows) ---------- */
.js .hero__title .l { opacity: 0; transition: opacity 1.3s ease; }
.js .hero__title .l2 { transition-delay: .45s; }
.js .hero__title.is-in .l { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero__title .l { opacity: 1; transition: none; }
  .xfade img { animation: none; }
  .xfade img:nth-child(2) { opacity: 0; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
