/* ==========================================================================
   [NAMA KEDAI] — editorial bakehouse
   Mobile-first. Tokens on :root. Each flavour section adopts its own accent.
   ========================================================================== */

:root {
  --paper: #F5F0E8;
  --paper-2: #ECE4D8;
  --ink: #151112;
  --ink-2: #3B3334;
  --muted: #74696A;
  --crimson: #7A1424;
  --crimson-deep: #4E0C17;
  --caramel: #C8752F;
  --rule: rgba(21, 17, 18, .16);
  --rule-light: rgba(245, 240, 232, .24);
  --accent: var(--crimson);

  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --gap: clamp(16px, 2.4vw, 36px);
  --fs-display: clamp(3.6rem, 15vw, 9rem);
  --fs-h2: clamp(3rem, 10vw, 7.25rem);
  --fs-h3: clamp(2rem, 4.6vw, 3.6rem);
  --fs-lede: clamp(1.05rem, 1.4vw, 1.25rem);
  --track-tight: -0.035em;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 64px;
}

/* Visitor chose English: keep the page hidden for the moment it takes js/i18n.js to swap the text */
.i18n-wait body { visibility: hidden; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, picture, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
em { font-style: italic; }
address { font-style: normal; }
table { border-collapse: collapse; width: 100%; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--crimson); color: var(--paper); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 200;
  padding: .6rem 1rem; background: var(--ink); color: var(--paper);
  transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }

.wrap { padding-inline: var(--gutter); max-width: 1680px; margin-inline: auto; }

/* ---------- Type ---------- */
.eyebrow {
  font: 500 .72rem/1.3 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.h2 {
  font: 400 var(--fs-h2)/.9 var(--serif);
  letter-spacing: var(--track-tight);
}
.h2 em, .hero__title em, .panel__title em, .footer__cta em, .product__name em, .drawer__done-title em { font-style: italic; }
.fine { font-size: .8rem; line-height: 1.5; color: var(--muted); }

/* Line mask reveal (markup: .line > span) */
.line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.line > span { display: inline-block; will-change: transform; }
.motion .hero .line > span,
.motion [data-split] .line > span { transform: translateY(112%); }
.motion [data-fade] { opacity: 0; transform: translateY(24px); }

/* ---------- Media + placeholders ---------- */
.media { position: relative; overflow: hidden; background: var(--paper-2); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.is-missing img { opacity: 0; }
.media.is-missing::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 1rem; text-align: center;
  font: 500 .7rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: rgba(21, 17, 18, .5);
  background:
    linear-gradient(var(--rule), var(--rule)) center / 1px 100% no-repeat,
    linear-gradient(var(--rule), var(--rule)) center / 100% 1px no-repeat,
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(21,17,18,.035) 18px 19px),
    var(--paper-2);
}
.media--cutout { background: transparent; overflow: visible; }
.media--cutout img { object-fit: contain; }
.media--cutout.is-missing::after {
  inset: 8%;
  border-radius: 50%;
  color: rgba(245, 240, 232, .7);
  background: radial-gradient(closest-side, rgba(245,240,232,.16), rgba(245,240,232,.04) 70%, transparent 71%);
  border: 1px dashed rgba(245, 240, 232, .35);
}

/* ---------- Buttons & links ---------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: var(--paper);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.75rem;
  border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 500 .95rem/1 var(--sans); letter-spacing: .01em;
  text-decoration: none; white-space: nowrap;
  overflow: hidden; isolation: isolate;
  transition: color .5s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent);
  transform: translateY(101%); border-radius: inherit;
  transition: transform .55s var(--ease);
}
.btn > span { position: relative; pointer-events: none; }
@media (hover: hover) {
  .btn:hover::before { transform: none; }
  .btn:hover { color: var(--paper); }
}
.btn--light { --btn-bg: var(--paper); --btn-fg: var(--ink); }
.btn--ink { --btn-bg: var(--ink); --btn-fg: var(--paper); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.link {
  display: inline-block;
  font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size .5s var(--ease);
}
@media (hover: hover) { .link:hover { background-size: 0 1px; background-position: right bottom; } }
.link--light { color: var(--paper); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: var(--gutter);
  color: var(--paper);
  transition: color .4s var(--ease), background-color .4s var(--ease), transform .5s var(--ease);
}
.nav.is-solid {
  color: var(--ink);
  background: rgba(245, 240, 232, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--rule);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__brand { font: 400 1.5rem/1 var(--serif); letter-spacing: -.01em; text-decoration: none; }
.nav__links { display: none; gap: 2rem; font-size: .85rem; }
.nav__links a { text-decoration: none; opacity: .85; }
.nav__links a:hover { opacity: 1; }
.nav__tools { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.75rem); }
.lang { display: inline-flex; align-items: center; gap: .1rem; font: 500 .78rem/1 var(--sans); letter-spacing: .08em; }
.lang span { opacity: .45; }
.lang button {
  min-width: 36px; min-height: 44px; padding: 0 .3rem;
  opacity: .55; transition: opacity .2s;
}
.lang button:hover { opacity: .85; }
.lang button[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.nav__cart {
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 44px; font-size: .85rem; font-weight: 500;
}
.nav__count {
  display: inline-grid; place-items: center;
  min-width: 1.6rem; height: 1.6rem; padding: 0 .35rem;
  border: 1px solid currentColor; border-radius: 999px;
  font-size: .72rem; font-variant-numeric: tabular-nums;
}
.nav__count.is-bump { animation: bump .6s var(--ease); }
@keyframes bump { 30% { transform: scale(1.35); } }
@media (min-width: 900px) { .nav__links { display: flex; } }

/* ---------- 1. Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--paper);
  overflow: hidden;
  background: var(--ink);
}
.hero__media { position: absolute; inset: 0; background: #2a1d1c; }
.hero__media img { transform-origin: 50% 60%; object-position: 72% 50%; }
.hero__media.is-missing::after { color: rgba(245,240,232,.45); background: repeating-linear-gradient(135deg, transparent 0 22px, rgba(245,240,232,.04) 22px 23px), radial-gradient(120% 90% at 70% 30%, #5a1520, #1b1213); }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(21,17,18,.62) 0%, rgba(21,17,18,.35) 38%, rgba(21,17,18,0) 62%),
    linear-gradient(180deg, rgba(21,17,18,.45) 0%, rgba(21,17,18,0) 26%),
    linear-gradient(0deg, rgba(21,17,18,.72) 0%, rgba(21,17,18,.15) 55%, rgba(21,17,18,0) 75%);
}
.hero__inner {
  position: relative;
  padding: calc(var(--nav-h) + 3rem) var(--gutter) clamp(2rem, 6vh, 4rem);
  max-width: 1680px; width: 100%; margin-inline: auto;
}
.hero__eyebrow { margin-bottom: 1.25rem; opacity: .85; }
.hero__title {
  font: 400 var(--fs-display)/.86 var(--serif);
  letter-spacing: var(--track-tight);
}
.hero__foot {
  display: grid; gap: 1.75rem;
  margin-top: clamp(1.5rem, 4vh, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-light);
}
.hero__lede { max-width: 34rem; font-size: var(--fs-lede); line-height: 1.5; opacity: .92; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2rem; }
.hero__scroll {
  position: absolute; right: var(--gutter); top: 50%;
  writing-mode: vertical-rl;
  font: 500 .68rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  opacity: .7; display: none;
}
.hero__scroll::after { content: ""; display: block; width: 1px; height: 64px; margin: 1rem auto 0; background: currentColor; transform-origin: top; animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (min-width: 900px) {
  .hero__foot { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .hero__scroll { display: block; }
}

/* ---------- 2. Sequence ---------- */
.sequence { position: relative; background: var(--ink); color: var(--paper); }
.sequence__stage { position: relative; height: 100svh; overflow: hidden; background: #111; }
.sequence__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sequence__hud { position: absolute; left: var(--gutter); top: calc(var(--nav-h) + 1.5rem); z-index: 2; }
.sequence__title { margin-top: .5rem; font: 400 clamp(2rem, 5vw, 3.75rem)/.95 var(--serif); letter-spacing: -.02em; }
.sequence__captions {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(1.5rem, 6vh, 4rem);
  z-index: 2;
}
.sequence__cap {
  position: absolute; left: 0; bottom: 0;
  display: grid; gap: .6rem;
  max-width: 26rem;
  padding-top: 1rem; border-top: 1px solid var(--rule-light);
}
.sequence__cap p { font: 400 clamp(1.4rem, 2.6vw, 2.1rem)/1.15 var(--serif); }
.motion .sequence__cap { opacity: 0; }
@media (min-width: 900px) { .sequence__captions { left: auto; width: 26rem; } }

.sequence__loader {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-content: center; justify-items: center; gap: 1rem;
  background: var(--ink);
  transition: opacity .8s var(--ease), visibility .8s;
}
.sequence__loader.is-done { opacity: 0; visibility: hidden; }
.sequence__pct { font: 400 clamp(3.5rem, 10vw, 7rem)/1 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.sequence__bar { width: min(220px, 60vw); height: 1px; background: var(--rule-light); overflow: hidden; }
.sequence__bar > span { display: block; height: 100%; background: var(--paper); transform-origin: left; transform: scaleX(0); transition: transform .3s linear; }

/* Reduced motion / no JS: show captions statically under the image */
html:not(.motion) .sequence__captions { position: relative; inset: auto; display: grid; gap: 2rem; padding: 2rem var(--gutter) 4rem; width: auto; }
html:not(.motion) .sequence__cap { position: static; }
html:not(.motion) .sequence__stage { height: 80svh; }

/* ---------- 3. Flavours ---------- */
.flavours { position: relative; color: var(--paper); background: var(--crimson); overflow: hidden; }
.panel { position: relative; overflow: hidden; }
.panel--rv { background: var(--crimson); --accent: var(--crimson); }
.panel--cw { background: var(--caramel); --accent: var(--caramel); }
.panel__texture { position: absolute; inset: -10%; background: transparent; opacity: .12; mix-blend-mode: soft-light; pointer-events: none; }
.panel__texture.is-missing { display: none; }
.panel__grid {
  position: relative;
  display: grid; gap: 2rem;
  padding: calc(var(--nav-h) + 2.5rem) var(--gutter) 4rem;
}
.panel__title {
  margin-top: 1rem;
  font: 400 clamp(4rem, 19vw, 11rem)/.82 var(--serif);
  letter-spacing: -.04em;
}
.panel__lede { margin-top: 1.5rem; max-width: 26rem; font-size: var(--fs-lede); line-height: 1.5; opacity: .92; }
.panel__cutout { aspect-ratio: 1; width: min(88vw, 520px); justify-self: center; filter: drop-shadow(0 40px 50px rgba(0,0,0,.28)); will-change: transform; }
.panel__facts { display: grid; align-content: end; }
.panel__facts > div { display: grid; gap: .35rem; padding: 1rem 0; border-top: 1px solid var(--rule-light); }
.panel__facts > div:last-child { border-bottom: 1px solid var(--rule-light); }
.panel__facts dt { font: 500 .72rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.panel__facts dd { margin: 0; font-size: .98rem; line-height: 1.5; }

@media (min-width: 768px) {
  .panel__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gap);
    align-items: end;
    min-height: 100svh;
    padding-bottom: clamp(2rem, 6vh, 4rem);
  }
  .panel__head { grid-column: 1 / span 5; grid-row: 1; align-self: start; position: relative; z-index: 1; }
  .panel__cutout { grid-column: 5 / span 5; grid-row: 1; align-self: center; width: 100%; max-width: 620px; }
  .panel__facts { grid-column: 10 / span 3; grid-row: 1; align-self: end; }
}

/* Horizontal mode (JS, desktop): track side-by-side, section colour morphs */
.flavours.is-horizontal .flavours__track { display: flex; width: 200%; height: 100svh; }
.flavours.is-horizontal .panel { flex: 0 0 50%; height: 100svh; background: transparent; }
.flavours.is-horizontal .panel__grid { height: 100%; min-height: 0; }

/* ---------- Cross-section ---------- */
.xsec { padding-block: clamp(5rem, 14vh, 10rem); --accent: var(--crimson); }
.xsec[data-active="cw"] { --accent: var(--caramel); }
.xsec__head { display: grid; gap: 1.25rem; margin-bottom: clamp(2rem, 6vh, 4rem); }
.xsec__tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--rule); }
.xsec__tabs button {
  position: relative; padding: .75rem 0; font-size: .9rem; font-weight: 500; color: var(--muted);
  transition: color .3s;
}
.xsec__tabs button[aria-selected="true"] { color: var(--ink); }
.xsec__tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.xsec__tabs button[aria-selected="true"]::after { transform: none; }

.xsec__stage { position: relative; --k: .58; --lx: 58%; }
.xsec__frame { position: relative; width: calc(var(--k) * 100%); aspect-ratio: 3 / 5; }
.xsec__img { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); }
.xsec__img.is-active { opacity: 1; }
.xsec__labels { position: absolute; inset: 0 var(--gutter); pointer-events: none; }
.xlabel { position: absolute; left: 0; right: 0; top: var(--y); }
.xlabel__dot {
  position: absolute; left: calc(var(--x) * var(--k)); top: 0;
  width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%; background: var(--paper);
  box-shadow: 0 0 0 1px var(--ink), 0 0 0 6px rgba(245,240,232,.35);
}
.xlabel__line {
  position: absolute; top: 0; height: 1px;
  left: calc(var(--x) * var(--k) + 8px);
  right: calc(100% - var(--lx) - 8px);
  background: var(--ink);
  transform-origin: left;
}
.xlabel__txt { position: absolute; left: calc(var(--lx) + 14px); right: 0; top: 0; transform: translateY(-.75em); display: grid; gap: .15rem; }
.xlabel__txt b { font: 400 clamp(1.05rem, 2.4vw, 2rem)/1.05 var(--serif); letter-spacing: -.01em; }
.xlabel__txt span { font-size: clamp(.72rem, 1vw, .9rem); color: var(--muted); line-height: 1.35; }
.xlabel__txt b, .xlabel__txt span { transition: opacity .35s; }
.xsec.is-swapping .xlabel__txt b, .xsec.is-swapping .xlabel__txt span { opacity: 0; }
.motion .xlabel__line { transform: scaleX(0); }
.motion .xlabel__dot { transform: scale(0); }
.motion .xlabel__txt { opacity: 0; }

@media (min-width: 900px) {
  .xsec__head { grid-template-columns: 1fr auto; align-items: end; }
  .xsec__head .eyebrow { grid-column: 1 / -1; }
  .xsec__tabs { border-bottom: 0; }
  .xsec__stage { --k: .48; --lx: 60%; }
  .xsec__frame { aspect-ratio: 4 / 5; max-height: 92svh; }
}

/* ---------- Section heads ---------- */
.section-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 8vh, 6rem); }
.section-head__note { max-width: 24rem; font-size: var(--fs-lede); line-height: 1.5; color: var(--ink-2); }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 1fr auto; align-items: end; }
}

/* ---------- 4. Menu ---------- */
.menu { padding-block: clamp(5rem, 14vh, 10rem); border-top: 1px solid var(--rule); }
.products { display: grid; }
.product {
  display: grid; gap: 1.5rem;
  padding-block: clamp(2rem, 6vh, 4.5rem);
  border-top: 1px solid var(--rule);
}
.product:last-child { border-bottom: 1px solid var(--rule); }
.product__media { display: block; width: 100%; aspect-ratio: 4 / 5; cursor: pointer; }
.product__media img { transition: transform 1.2s var(--ease); }
@media (hover: hover) { .product__media:hover img { transform: scale(1.04); } }
.product__media--duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.duo__half { height: 100%; }
.duo__half:first-child img { object-position: 0% 50%; }
.duo__half:last-child img { object-position: 100% 50%; }
.product__media--duo::before { content: ""; position: absolute; z-index: 1; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--paper); }

.product__body { display: grid; align-content: start; gap: 1rem; }
.product__name { font: 400 var(--fs-h3)/.95 var(--serif); letter-spacing: -.025em; }
.product__desc { max-width: 28rem; color: var(--ink-2); }

.sizes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.size { position: relative; }
.size input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size span {
  display: inline-flex; align-items: baseline; gap: .5rem;
  min-height: 44px; padding: .7rem 1.1rem;
  border: 1px solid var(--rule); border-radius: 999px;
  font-size: .9rem; font-weight: 500;
  transition: border-color .3s, background-color .3s, color .3s;
}
.size span small { font-weight: 400; color: var(--muted); font-size: .8rem; transition: color .3s; }
.size input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.size input:checked + span small { color: rgba(245,240,232,.7); }
.size input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.product__buy {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: .75rem; padding-top: 1.25rem; border-top: 1px solid var(--rule);
}
.product__price { font: 400 clamp(2.2rem, 4vw, 3.25rem)/1 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.product__price small { font: 500 .8rem/1 var(--sans); letter-spacing: .08em; margin-right: .3rem; vertical-align: .9em; }

@media (min-width: 900px) {
  .product { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
  .product__media { grid-column: 1 / span 6; }
  .product__body { grid-column: 8 / span 5; }
  .product--flip .product__media { grid-column: 7 / span 6; grid-row: 1; }
  .product--flip .product__body { grid-column: 1 / span 5; grid-row: 1; }
  .product--duo .product__media { grid-column: 2 / span 5; }
}

/* ---------- 5. Steps ---------- */
.steps { padding-block: clamp(5rem, 14vh, 10rem); background: var(--paper-2); }
.steps__list { display: grid; }
.step {
  display: grid; grid-template-columns: 3.5rem 1fr; gap: .5rem 1rem;
  padding-block: 1.75rem; border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step__num { grid-row: span 2; font: 400 2.25rem/1 var(--serif); color: var(--crimson); }
.step__title { font: 400 clamp(1.6rem, 3vw, 2.4rem)/1.05 var(--serif); letter-spacing: -.015em; }
.step p { color: var(--ink-2); max-width: 30rem; }
.step strong { font-weight: 600; color: var(--ink); }
@media (min-width: 900px) {
  .steps__list { grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
  .step { grid-template-columns: 1fr; padding-block: 2rem 0; border-bottom: 0 !important; gap: 1.25rem; }
  .step__num { grid-row: auto; font-size: clamp(4rem, 7vw, 6.5rem); line-height: .8; }
}

/* ---------- 6. Where ---------- */
.where { padding-block: clamp(5rem, 14vh, 10rem); }
.where__grid { display: grid; gap: 3rem; }
.where__label { font: 500 .72rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.where__label--gap { margin-top: 2.5rem; }
.rates th, .rates td { padding: .95rem 0; border-top: 1px solid var(--rule); text-align: left; font-weight: 400; }
.rates tr:last-child th, .rates tr:last-child td { border-bottom: 1px solid var(--rule); }
.rates td { text-align: right; font: 400 1.35rem/1 var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 1rem; }
.where__col .fine { margin-top: 1rem; }
.where__addr { font: 400 1.5rem/1.25 var(--serif); margin-bottom: 1rem; }
@media (min-width: 900px) {
  .where__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
  .where__head { grid-column: 1 / -1; margin-bottom: 2rem; }
  .where__col:nth-of-type(1) { grid-column: 1 / span 5; }
  .where__col:nth-of-type(2) { grid-column: 8 / span 5; }
}

/* ---------- 7. Footer ---------- */
.footer { background: var(--crimson-deep); color: var(--paper); padding-block: clamp(5rem, 14vh, 9rem) 2rem; --accent: var(--caramel); overflow: hidden; }
.footer__cta { font: 400 var(--fs-h2)/.92 var(--serif); letter-spacing: var(--track-tight); max-width: 12ch; margin-bottom: 2rem; }
.footer__grid { display: grid; gap: 2rem; margin-top: clamp(4rem, 10vh, 7rem); padding-top: 2rem; border-top: 1px solid var(--rule-light); }
.footer .where__label { color: rgba(245,240,232,.6); margin-bottom: .6rem; }
.footer__base { margin-top: 4rem; }
.footer__word { font: 400 clamp(3rem, 16vw, 15rem)/.8 var(--serif); letter-spacing: -.045em; white-space: nowrap; opacity: .95; margin-bottom: 1.5rem; }
.footer .fine { color: rgba(245,240,232,.6); }
@media (min-width: 768px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 52rem; } }

/* ---------- Cart drawer ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(21, 17, 18, .45);
  opacity: 0; transition: opacity .45s var(--ease);
}
.scrim.is-open { opacity: 1; }
.drawer {
  position: fixed; z-index: 100;
  left: 0; right: 0; bottom: 0;
  max-height: 92svh;
  display: flex; flex-direction: column;
  background: var(--paper);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform .6s var(--ease);
  box-shadow: 0 -20px 60px rgba(0,0,0,.18);
}
.drawer.is-open { transform: none; }
.drawer__grab { width: 40px; height: 4px; margin: 10px auto 0; border-radius: 2px; background: var(--rule); }
.drawer__head { display: flex; align-items: baseline; justify-content: space-between; padding: 1rem var(--gutter) 1rem; border-bottom: 1px solid var(--rule); }
.drawer__title { font: 400 2.25rem/1 var(--serif); letter-spacing: -.02em; }
.drawer__close { min-height: 44px; font-size: .85rem; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.drawer__body { overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--gutter) 2rem; }
.drawer__empty { display: grid; gap: .5rem; justify-items: start; padding: 2.5rem 0; }
.drawer__empty-title { font: 400 1.75rem/1.1 var(--serif); }
.drawer.is-empty .checkout { display: none; }
.drawer:not(.is-empty) .drawer__empty { display: none; }

@media (min-width: 768px) {
  .drawer {
    left: auto; top: 0; width: min(480px, 100vw); max-height: none;
    border-radius: 0;
    transform: translateX(100%);
    box-shadow: -20px 0 60px rgba(0,0,0,.14);
  }
  .drawer__grab { display: none; }
  .drawer__head { padding-top: 1.5rem; }
}

.lines { display: grid; }
.cline { display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.cline__img { width: 64px; height: 80px; }
.cline__name { font: 400 1.25rem/1.1 var(--serif); }
.cline__meta { font-size: .8rem; color: var(--muted); }
.cline__side { display: grid; justify-items: end; gap: .5rem; }
.cline__price { font-variant-numeric: tabular-nums; font-weight: 500; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 999px; }
.qty button { width: 36px; height: 36px; font-size: 1.05rem; line-height: 1; }
.qty output { min-width: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; font-size: .9rem; }
.cline__remove { font-size: .75rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

.checkout { display: grid; gap: 1.25rem; padding-top: 1.5rem; }
.field { display: grid; gap: .45rem; }
.field__label { font: 500 .72rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding: 0; }
.field__opt { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.field__hint { font-size: .78rem; color: var(--muted); }
.field__err { font-size: .8rem; color: #A3122A; min-height: 0; }
.field__err:empty { display: none; }
.field__err--form { font-size: .85rem; }
.input {
  width: 100%; min-height: 48px; padding: .75rem .9rem;
  font: 400 1rem/1.4 var(--sans); color: var(--ink);
  background: #FBF8F3; border: 1px solid var(--rule); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}
textarea.input { resize: vertical; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(122,20,36,.12); }
.input[aria-invalid="true"] { border-color: #A3122A; }
.choices { display: grid; gap: .5rem; margin-top: .45rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .85rem 1rem; border: 1px solid var(--rule); border-radius: 10px;
  font-size: .92rem; transition: border-color .2s, background-color .2s;
}
.choice span b { font-weight: 500; font-variant-numeric: tabular-nums; }
.choice input:checked + span { border-color: var(--ink); background: #FBF8F3; box-shadow: inset 0 0 0 1px var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.totals { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; padding: 1rem 0; border-top: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.totals dt { color: var(--ink-2); font-size: .9rem; }
.totals dd { margin: 0; text-align: right; font-size: .9rem; }
.totals .is-total { padding-top: .75rem; border-top: 1px solid var(--rule); font: 400 1.75rem/1 var(--serif); color: var(--ink); }

.drawer__done { display: grid; gap: 1rem; padding: 2rem var(--gutter) 2.5rem; overflow-y: auto; }
.drawer__done-title { font: 400 2.5rem/1 var(--serif); letter-spacing: -.02em; }

/* ---------- Viewer ---------- */
.viewer { width: min(92vw, 900px); max-height: 92svh; padding: 0; border: 0; background: var(--ink); color: var(--paper); }
.viewer::backdrop { background: rgba(21,17,18,.8); }
.viewer img { width: 100%; max-height: 86svh; object-fit: contain; min-height: 200px; }
.viewer__close { position: absolute; top: .75rem; right: .75rem; min-height: 40px; padding: 0 1rem; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: .85rem; font-weight: 500; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: 120;
  padding: .8rem 1.2rem; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: .88rem;
  transform: translate(-50%, 160%); transition: transform .5s var(--ease);
  pointer-events: none; white-space: nowrap;
}
.toast.is-on { transform: translate(-50%, 0); }

/* ---------- Custom cursor (desktop, fine pointer only) ---------- */
.cursor { display: none; }
.has-cursor .cursor {
  display: grid; place-items: center;
  position: fixed; left: 0; top: 0; z-index: 150;
  width: 0; height: 0; margin: 0;
  border-radius: 50%;
  background: var(--crimson);
  opacity: 0;
  pointer-events: none;
  transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), opacity .3s;
}
.has-cursor .cursor.is-label {
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
  opacity: 1;
}
.has-cursor [data-cursor] { cursor: none; }
.cursor__label { font: 500 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--paper); opacity: 0; transition: opacity .3s; }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-hidden { opacity: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Footer bottom line: copyright left, credit right (stacked on phones) */
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
