/* MORIVA — Matcha House
   Layout: a quiet grid on cream; one tight grotesk carries everything,
   a serif italic marks the soft word, mono carries the small print. */

:root {
  /* colour */
  --cream: #f6f2e8;
  --cream-deep: #e7e8d7;
  --sand: #e3d2b5;
  --green: #173d2c;
  --green-soft: #2c5440;
  --olive: #5b6c43;
  --sage: #c4cba4;
  --muted: #65685a;
  --line: #173d2c26;
  --line-strong: #173d2c59;

  /* type */
  --display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --mono: var(--sans);

  /* how the display face is set: weight, tracking, and an optical size correction */
  --display-weight: 400;
  --display-track: -.022em;
  --display-scale: 1.2;
  --h3-weight: 400;
  --h3-track: -.01em;
  --h3-scale: 1.16;
  --em-family: var(--display);
  --em-weight: 400;
  --em-scale: 1;
  --em-track: -.015em;

  --fs-label: 11px;
  --fs-small: 13px;
  --fs-body: 15px;
  --fs-lead: 17px;
  --fs-h3: calc(22px * var(--h3-scale));
  --fs-h2: calc(clamp(40px, 5vw, 76px) * var(--display-scale));
  --fs-h1: calc(clamp(44px, min(5.3vw, 9.4svh), 88px) * var(--display-scale));
  --fs-mega: calc(clamp(56px, 8vw, 128px) * var(--display-scale));

  /* rhythm */
  --gutter: 6%;
  --header-h: 80px;
  --radius: 6px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- base ---------- */

* { box-sizing: border-box }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--green);
  font: 400 var(--fs-body)/1.6 var(--sans);
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; letter-spacing: inherit }
button { cursor: pointer; color: inherit; border: 0 }
button, a { -webkit-tap-highlight-color: transparent }
a { color: inherit; text-decoration: none }
img { max-width: 100%; display: block }
h1, h2, h3, p { margin: 0 }

svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
}

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 5px;
  border-radius: 2px;
}

::selection { background: var(--green); color: var(--cream) }

h1, h2 {
  font-family: var(--display);
  font-weight: var(--display-weight);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: .98;
  letter-spacing: var(--display-track);
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1;
  letter-spacing: var(--display-track);
}

h3 {
  font: var(--h3-weight) var(--fs-h3)/1.15 var(--display);
  letter-spacing: var(--h3-track);
}

/* the soft word: serif italic, optically matched to the grotesk */
h1 em, h2 em {
  font-family: var(--em-family);
  font-style: italic;
  font-weight: var(--em-weight);
  font-size: calc(1em * var(--em-scale));
  line-height: .9;
  letter-spacing: var(--em-track);
}

/* small print: uppercase, evenly tracked */
.eyebrow,
.section-kicker,
.chapter-label,
.scroll-hint,
.chapter-dots button,
.product-tag,
.sample-note,
.recipe-measures > span,
.step-index,
.story-seal span,
.footer-bottom,
.ticker {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 200;
  background: var(--green);
  color: var(--cream);
  padding: 14px 18px;
  border-radius: 999px;
  font-size: var(--fs-small);
}
.skip:focus { top: 15px }

.sr-only {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- header ---------- */

.header {
  height: var(--header-h);
  padding: 0 4.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  background: #f6f2e8d9;
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.nav-left, .nav-right {
  width: 38%;
  display: flex;
  align-items: center;
}
.nav-right { justify-content: flex-end; gap: 22px }

.header nav {
  display: flex;
  gap: 30px;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: -.01em;
}
.header nav a {
  padding: 10px 0;
  position: relative;
  opacity: .72;
  transition: opacity .25s;
}
.header nav a:hover { opacity: 1 }
.header nav a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.header nav a:hover::after { transform: scaleX(1) }

.wordmark {
  display: flex;
  align-items: center;
  gap: 14px;
}
.wordmark > img { width: 32px; height: 35px }
.wordmark > span {
  font: var(--h3-weight) calc(23px * var(--h3-scale))/1 var(--display);
  letter-spacing: .3em;
  margin-right: -.3em;
}
.wordmark small { display: none }

.simple-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: -.01em;
  padding: 10px 0;
}
.simple-link svg { width: 12px; height: 12px; fill: currentColor; stroke: none }

.bag-open {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: 500 12px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  transition: background .25s, color .25s, border-color .25s;
}
.bag-open:hover { background: var(--green); color: var(--cream); border-color: var(--green) }
.bag-open svg { width: 14px; height: 16px }
.bag-count { min-width: 8px; text-align: center }

.menu-toggle { display: none }

/* ---------- hero ---------- */

.hero-scroll { height: 350vh }

.hero-stage {
  height: 100svh;
  min-height: 680px;
  position: sticky;
  top: 0;
  overflow: hidden;
  background: #c7b08c;
}

.hero-canvas, .hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #eee5d799 0%, #eee5d733 28%, transparent 49%, transparent 74%, #eee5d733 100%);
}


.hero-copy {
  position: absolute;
  left: var(--gutter);
  top: 29%;
  width: 40%;
  z-index: 3;
}

.eyebrow { display: flex; align-items: center; gap: 10px }

h1 { margin: 0 0 26px }

/* each headline line sits in its own mask so it can rise into place */
.line {
  display: block;
  overflow: hidden;
  padding: .06em .12em .16em 0;
  margin: -.06em 0 -.16em;
  white-space: nowrap;
}
.line > span { display: block }

.hero-description {
  font-size: var(--fs-lead);
  line-height: 1.5;
  margin-bottom: 32px;
  max-width: 32ch;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--green);
  color: var(--cream);
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 14px 20px 14px 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.01em;
  transition: background .3s, transform .5s var(--ease);
}
.button svg { width: 18px; height: 18px; transition: transform .5s var(--ease) }
.button > span { font: 400 18px/1 var(--mono) }
.button:hover { background: var(--green-soft) }
.button:hover svg { transform: translateX(4px) }
.button:active { transform: scale(.98) }

.hero-note {
  position: absolute;
  right: 5.5%;
  top: 36%;
  width: 15%;
  min-width: 190px;
  z-index: 3;
}
.chapter-no {
  display: block;
  font: var(--display-weight) calc(64px * var(--h3-scale))/1 var(--display);
  letter-spacing: var(--display-track);
  font-variant-numeric: tabular-nums;
  margin-bottom: 22px;
}
.chapter-label { display: block; opacity: .8 }
.chapter-text {
  font: 400 27px/1.12 var(--serif);
  letter-spacing: -.015em;
  margin-top: 12px;
}
.note-line { width: 48px; height: 1px; background: var(--line-strong); margin-top: 22px }

.hero-bottom {
  position: absolute;
  bottom: 30px;
  left: 4.5%;
  right: 4.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
}

.scroll-hint { display: flex; align-items: center; gap: 14px; line-height: 1.5 }
.down-circle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background .3s, color .3s;
}
.down-circle svg { width: 16px; height: 16px }
.scroll-hint:hover .down-circle { background: var(--green); color: var(--cream) }

.chapter-dots { display: flex; align-items: center; gap: 14px }
.chapter-dots button {
  color: #173d2c80;
  background: none;
  padding: 10px 0;
  font-variant-numeric: tabular-nums;
  transition: color .3s;
}
.chapter-dots button span { margin-left: 6px }
.chapter-dots button.active, .chapter-dots button:hover { color: var(--green) }
.chapter-dots i { width: 24px; height: 1px; background: var(--line-strong) }


.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--green);
  width: 0;
}

/* held back until the entrance animation takes over (see app.js) */
.motion-pending .hero-copy > *,
.motion-pending .hero-note,
.motion-pending .hero-bottom { opacity: 0 }

/* ---------- ticker ---------- */

.ticker {
  background: var(--green);
  color: var(--cream);
  overflow: hidden;
  padding: 18px 0;
  white-space: nowrap;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.ticker-group {
  display: flex;
  align-items: center;
  gap: 44px;
  padding-right: 44px;
}
.ticker b {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  flex: none;
}
@keyframes marquee { to { transform: translateX(-50%) } }

/* ---------- sections ---------- */

.section-pad { padding: clamp(72px, 8vw, 128px) var(--gutter) }

.section-kicker {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.section-kicker > span:last-child { color: var(--muted) }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin: clamp(48px, 6vw, 88px) 0 clamp(36px, 4vw, 56px);
}
.section-heading > div { padding-bottom: 8px; max-width: 40ch }
.section-heading p { color: var(--muted); font-size: 16px; line-height: 1.55; letter-spacing: -.012em }

.sample-note { display: block; color: var(--muted); margin-top: 16px; font-size: 10px }

/* ---------- collection ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-photo {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4/4.8;
  width: 100%;
  padding: 0;
  background: #e9e4d6;
  border-radius: var(--radius);
}
.product-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.product-photo:hover > img { transform: scale(1.04) }

.product-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  font-size: 10px;
  color: var(--green);
  background: #f6f2e8e6;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 6px 11px;
  border-radius: 999px;
}

.view-product {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f6f2e8f2;
  border-radius: 999px;
  padding: 12px 16px 12px 20px;
  font-size: var(--fs-small);
  font-weight: 500;
  transform: translateY(calc(100% + 20px));
  transition: transform .55s var(--ease);
}
.view-product svg { width: 16px; height: 16px }
.product-photo:hover .view-product,
.product-photo:focus-visible .view-product { transform: translateY(0) }

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 20px 0 14px;
}
.product-meta h3 { font-size: calc(20px * var(--h3-scale)) }
.product-meta p { font-size: var(--fs-small); color: var(--muted); margin-top: 4px }
.product-meta > span {
  font: 400 var(--fs-small)/1.4 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.add-button {
  border-top: 1px solid var(--line);
  background: none;
  padding: 14px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: var(--fs-small);
  font-weight: 500;
  transition: border-color .3s;
}
.add-button > span {
  font: 400 18px/1 var(--mono);
  transition: transform .5s var(--ease);
}
.add-button:hover { border-color: var(--green) }
.add-button:hover > span { transform: rotate(90deg) }

/* ---------- story ---------- */

.story {
  background: var(--cream-deep);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9%;
  align-items: center;
}
.story-visual { position: relative }
.story-visual > img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}
.story-seal {
  position: absolute;
  right: -42px;
  bottom: -25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 136px;
  height: 160px;
  background: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: 70px 70px 4px 4px;
  transform: rotate(8deg);
  box-shadow: 0 7px 20px #173d2c12;
}
.story-seal > img { height: 70px; width: 62px }
.story-seal span { font-size: 9px; letter-spacing: .08em; text-align: center; line-height: 1.5; margin-top: 10px }

.story-copy h2 { font-size: calc(clamp(38px, 4.3vw, 66px) * var(--display-scale)); margin: 22px 0 28px }
.story-copy > p:not(.eyebrow) {
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -.012em;
  color: #46574a;
  max-width: 44ch;
  margin: 16px 0;
}

.under-link {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  background: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 12px 0;
  font-size: var(--fs-small);
  font-weight: 500;
  transition: border-color .3s, gap .5s var(--ease);
}
.under-link:hover { border-color: var(--green); gap: 40px }
.under-link > span { font: 400 15px/1 var(--mono) }
.under-link svg { width: 12px; height: 12px; fill: currentColor; stroke: none }
.story-copy .under-link { margin-top: 14px }

/* ---------- ritual ---------- */

.ritual-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin: clamp(48px, 6vw, 88px) 0 clamp(32px, 4vw, 48px);
}
.ritual-heading h2 { font-size: calc(clamp(38px, 4.6vw, 70px) * var(--display-scale)) }

.recipe-switch {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  flex: none;
}
.recipe-switch button {
  background: none;
  font-size: var(--fs-small);
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  transition: background .3s, color .3s;
}
.recipe-switch button[aria-selected=true] { background: var(--green); color: var(--cream) }

.recipe-measures {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  margin-bottom: 52px;
}
.recipe-measures > span { text-align: center; color: var(--muted) }
.recipe-measures b {
  display: block;
  font: var(--display-weight) calc(40px * var(--h3-scale))/1.1 var(--display);
  letter-spacing: var(--display-track);
  font-variant-numeric: tabular-nums;
  text-transform: none;
  white-space: nowrap;
  color: var(--green);
  margin-bottom: 8px;
}
.recipe-measures > i { font: 400 22px/1 var(--mono); font-style: normal; color: #8e987c }

.ritual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
}
.step-index { display: block; color: var(--olive); font-variant-numeric: tabular-nums }
.step-art { width: 96px; height: 80px; margin: 16px 0 22px; stroke-width: 1.1 }
.ritual-grid h3 { margin-bottom: 10px }
.ritual-grid p { color: var(--muted); max-width: 34ch; line-height: 1.6 }
.ritual > .under-link { margin-top: 44px }

/* ---------- closing ---------- */

.closing {
  background: var(--green);
  color: var(--cream);
  padding: clamp(72px, 8vw, 120px) var(--gutter) clamp(80px, 9vw, 130px);
  position: relative;
  overflow: hidden;
}
.closing .eyebrow { color: var(--sage) }
.closing h2 {
  font-size: var(--fs-mega);
  line-height: .96;
  letter-spacing: var(--display-track);
  margin: 28px 0 40px;
  position: relative;
  z-index: 2;
}
.button.light { background: var(--cream); color: var(--green); border-color: var(--cream); position: relative; z-index: 3 }
.button.light:hover { background: #fff }

.closing-emblem {
  position: absolute;
  right: 10%;
  top: 80px;
  border-radius: 50%;
  background: #dddcc3;
  width: 120px;
  height: 145px;
  display: grid;
  place-items: center;
  transform: rotate(8deg);
  z-index: 2;
}
.closing-emblem img { width: 90px; height: 105px }
.closing-leaf { position: absolute; right: 2%; top: 140px; opacity: .18 }
.closing-leaf svg {
  width: 350px;
  height: 370px;
  stroke: var(--sage);
  stroke-width: .6;
  transform: rotate(-20deg);
}

/* ---------- footer ---------- */

footer { padding: 88px var(--gutter) 26px; border-top: 1px solid var(--line) }

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 64px;
}
.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer-logo img {
  width: 64px;
  height: 70px;
  transition: transform .6s var(--ease);
}
.footer-logo:hover img { transform: translateY(-4px) }
.footer-logo strong {
  margin-top: 22px;
  font: var(--h3-weight) calc(34px * var(--h3-scale))/1 var(--display);
  letter-spacing: .34em;
  margin-right: -.34em; /* cancel trailing tracking so the word sits optically centred */
}
.footer-logo span {
  font: 400 10px/1 var(--mono);
  letter-spacing: .32em;
  margin-right: -.32em;
  margin-top: 14px;
  color: var(--muted);
}
.footer-top p {
  margin-top: 28px;
  color: var(--muted);
  line-height: 1.6;
}
.footer-top nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 40px;
  margin-top: 40px;
  padding-top: 32px;
  width: min(100%, 620px);
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
}
.footer-top nav a,
.footer-top nav button {
  font: inherit;
  color: inherit;
  background: none;
  padding: 0;
  opacity: .75;
  transition: opacity .25s;
}
.footer-top nav a:hover,
.footer-top nav button:hover { opacity: 1 }

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 10px;
}
.footer-bottom > a { justify-self: end }
.footer-bottom p {
  font: 400 12px/1.5 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
  color: var(--muted);
}

/* ---------- dialogs ---------- */

dialog {
  border: 0;
  color: var(--green);
  padding: 0;
  background: var(--cream);
  max-width: calc(100% - 30px);
  border-radius: 10px;
}
dialog::backdrop {
  background: #12291ec4;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
dialog[open] { animation: dialog-in .5s var(--ease) }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.985) } }

.close-dialog {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 36px;
  height: 36px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 300 22px/1 var(--sans);
  z-index: 5;
  display: grid;
  place-items: center;
  transition: background .25s, color .25s;
}
.close-dialog:hover { background: var(--green); color: var(--cream) }

.film-dialog { width: min(1000px, 94vw); background: var(--green); color: var(--cream); overflow: hidden }
.film-dialog video { width: 100%; display: block; max-height: 76vh }
.film-dialog > p { padding: 16px 24px 18px; font: italic 400 22px/1.2 var(--serif) }

.product-dialog { width: 900px; overflow: hidden }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; align-items: center }
.product-detail > img { height: 560px; width: 100%; object-fit: cover }
.product-detail > div { padding: 44px 40px }
.product-detail h2 { font-size: calc(40px * var(--h3-scale)); letter-spacing: var(--display-track); margin: 16px 0 6px }
.product-detail p { font-size: 14px; line-height: 1.6; color: var(--muted); margin-top: 12px }
.product-detail p.eyebrow { font-size: var(--fs-label); margin-top: 0; color: var(--olive) }
.product-detail strong {
  display: block;
  margin: 20px 0;
  font: 400 15px/1 var(--mono);
  font-variant-numeric: tabular-nums;
}
.product-detail ul {
  padding-left: 16px;
  font-size: var(--fs-small);
  line-height: 1.9;
  color: var(--muted);
  margin: 18px 0 26px;
}
.product-detail .button { width: 100% }

.bag-dialog {
  margin: 0 0 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  width: 450px;
  max-width: 100%;
  padding: 30px;
  overflow: auto;
  border-radius: 0;
}
.bag-dialog[open] { animation: bag-in .6s var(--ease) }
@keyframes bag-in { from { transform: translateX(40px); opacity: 0 } }

.bag-header { display: flex; justify-content: space-between; align-items: start; margin: 12px 0 30px }
.bag-header h2 { font-size: calc(36px * var(--h3-scale)); letter-spacing: var(--display-track); margin-top: 10px }
.bag-header .close-dialog { position: static }

.bag-item {
  display: grid;
  grid-template-columns: 75px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.bag-item img { height: 95px; width: 75px; object-fit: cover; border-radius: 4px }
.bag-item h3 { font-size: calc(17px * var(--h3-scale)); padding-right: 10px }
.bag-item p { font: 400 var(--fs-small)/1.4 var(--mono); margin: 6px 0; color: var(--muted) }
.quantity-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px }
.quantity-controls { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px }
.quantity-controls button { background: none; width: 30px; height: 28px }
.quantity-controls button:disabled { opacity: .3; cursor: default }
.quantity-controls span { font: 400 12px var(--mono); width: 22px; text-align: center }
.remove-item { background: none; text-decoration: underline; text-underline-offset: 3px; font-size: 12px; color: var(--muted) }

.bag-summary { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 20px }
.bag-summary > div { display: flex; justify-content: space-between; font-size: 15px; font-weight: 500 }
.bag-summary > div strong { font: 400 15px var(--mono); font-variant-numeric: tabular-nums }
.bag-summary > p { font-size: var(--fs-small); line-height: 1.55; color: var(--muted); margin: 18px 0 22px }
.bag-summary > .button { width: 100% }

.empty-bag { text-align: center; padding: 64px 0 }
.empty-bag h3 { font: italic 400 32px/1.1 var(--serif); letter-spacing: -.01em }
.empty-bag p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-top: 14px }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--green);
  color: var(--cream);
  padding: 13px 22px;
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 500;
  box-shadow: 0 10px 35px #173d2c30;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s, transform .6s var(--ease);
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) }

/* ---------- wide ---------- */

@media (min-width: 1600px) {
  :root { --fs-body: 16px; --fs-lead: 19px }
}

/* ---------- tablet ---------- */

@media (max-width: 1000px) {
  .hero-copy { left: 5%; width: 44% }
  .hero-description { font-size: 15px }
  .hero-note { right: 4%; top: 38%; min-width: 150px }
  .chapter-no { font-size: 48px; margin-bottom: 16px }
  .chapter-text { font-size: 22px }
  .header nav { gap: 20px }
  .nav-right { gap: 14px }
  .film-open.simple-link { display: none }
  .nav-left, .nav-right { width: 36% }

  .chapter-dots button span { display: none }

  .product-grid { gap: 18px }
  .product-meta { flex-wrap: wrap }
  .product-meta h3 { font-size: calc(18px * var(--h3-scale)) }
  .story { gap: 8% }
  .story-seal { right: -20px; width: 104px; height: 124px }
  .story-seal > img { height: 52px; width: 46px }
  .story-seal span { font-size: 8px }
  .ritual-grid { gap: 32px }
  .recipe-switch button { padding: 10px 14px }
  .closing-emblem { right: 9% }
}

/* ---------- phone ---------- */

@media (max-width: 650px) {
  :root {
    --gutter: 7%;
    --header-h: 68px;
    --fs-h1: calc(clamp(38px, 11.6vw, 52px) * var(--display-scale));
    --fs-h2: calc(clamp(32px, 9.4vw, 44px) * var(--display-scale));
    --fs-mega: calc(clamp(38px, 11vw, 52px) * var(--display-scale));
  }

  .header { padding: 0 var(--gutter) }
  .wordmark { gap: 9px }
  .wordmark > img { width: 25px; height: 28px }
  .wordmark > span { font-size: 18px; letter-spacing: .26em; margin-right: -.26em }
  .nav-left, .nav-right { width: 25% }
  .header .nav-left nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 18px var(--gutter) 26px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    gap: 4px;
    font-size: 26px;
    letter-spacing: -.04em;
  }
  .header.menu-open .nav-left nav { display: flex; flex-direction: column }
  .header .nav-left nav a { opacity: 1; padding: 6px 0 }
  .header .nav-left nav a::after { display: none }
  .menu-toggle { display: block; background: none; width: 36px; padding: 6px 0 }
  .menu-toggle span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--green);
    margin: 7px 0;
    transition: transform .45s var(--ease);
  }
  .menu-toggle[aria-expanded=true] span:first-child { transform: translateY(4px) rotate(45deg) }
  .menu-toggle[aria-expanded=true] span:last-child { transform: translateY(-4px) rotate(-45deg) }
  .bag-open { padding: 7px 11px 7px 10px; gap: 6px }

  .hero-bottom { left: var(--gutter); right: var(--gutter); bottom: 22px }
  .scroll-hint { font-size: 9px; gap: 10px; letter-spacing: .05em }
  .scroll-hint .down-circle { width: 32px; height: 32px }
  .chapter-dots { gap: 8px }
  .chapter-dots i { width: 12px }

  .ticker { padding: 15px 0; font-size: 10px }
  .ticker-group { gap: 28px; padding-right: 28px }

  .section-pad { padding: 60px var(--gutter) }
  .section-kicker { font-size: 10px; padding-top: 14px }
  .section-kicker > span:last-child { max-width: 22ch; text-align: right }
  .section-heading { display: block; margin: 36px 0 30px }
  .section-heading > div { margin-top: 20px }
  .section-heading p { font-size: 15px }

  .product-grid { grid-template-columns: 1fr; gap: 40px }
  .product-photo { aspect-ratio: 4/4.1 }
  .product-meta { flex-wrap: nowrap; margin: 16px 0 12px }
  .product-meta h3 { font-size: calc(20px * var(--h3-scale)) }
  .view-product { display: none }
  .add-button { padding-top: 14px; font-size: 14px }

  .story { grid-template-columns: 1fr; gap: 60px }
  .story-seal { right: 8px; bottom: -28px }
  .story-copy h2 { font-size: var(--fs-h2); margin: 16px 0 22px }
  .story-copy > p:not(.eyebrow) { font-size: 15px; max-width: none }
  .story-copy .under-link { margin-top: 8px }

  .ritual-heading { display: block; margin: 36px 0 26px }
  .ritual-heading h2 { font-size: var(--fs-h2) }
  .recipe-switch { display: inline-flex; margin-top: 24px }
  .recipe-switch button { padding: 10px 18px }
  .recipe-measures { gap: 10px; justify-content: space-between; padding: 22px 0; margin-bottom: 32px }
  .recipe-measures b { font-size: calc(26px * var(--h3-scale)); margin-bottom: 6px }
  .recipe-measures > span { font-size: 9px; letter-spacing: .04em; max-width: 12ch }
  .recipe-measures > i { font-size: 18px }
  .ritual-grid { grid-template-columns: 1fr; gap: 28px }
  .ritual-grid > article {
    position: relative;
    padding: 0 0 26px 78px;
    border-bottom: 1px solid var(--line);
    min-height: 140px;
  }
  .step-index { position: absolute; left: 0; top: 2px }
  .step-art { position: absolute; left: -5px; top: 32px; width: 64px; height: 60px; margin: 0 }
  .ritual-grid h3 { font-size: calc(20px * var(--h3-scale)); margin: 0 0 8px }
  .ritual-grid p { font-size: 14px; max-width: none }
  .ritual > .under-link { margin-top: 28px }

  .closing { padding: 64px var(--gutter) 72px }
  .closing .eyebrow { font-size: 10px; max-width: 22ch }
  .closing h2 { margin: 24px 0 30px }
  .closing-emblem { width: 62px; height: 78px; right: var(--gutter); top: 40px }
  .closing-emblem img { width: 46px; height: 56px }
  .closing-leaf { right: -70px; top: 150px }
  .closing-leaf svg { width: 220px; height: 260px }

  footer { padding: 56px var(--gutter) 24px }
  .footer-top { padding-bottom: 40px }
  .footer-logo img { width: 52px; height: 57px }
  .footer-logo strong { font-size: 28px; margin-top: 18px }
  .footer-top p { font-size: 14px; margin-top: 22px }
  .footer-top nav { gap: 12px 26px; margin-top: 30px; padding-top: 26px }
  .footer-bottom { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 12px }
  .footer-bottom > a { justify-self: center }

  .product-dialog { max-width: calc(100% - 20px); max-height: 94dvh; overflow: auto }
  .product-detail { grid-template-columns: 1fr }
  .product-detail > img { height: 280px }
  .product-detail > div { padding: 28px }
  .product-detail h2 { font-size: 32px }
  .product-detail ul { margin: 14px 0 22px }
  .bag-dialog { padding: 24px }
  .bag-header h2 { font-size: 32px }
  .film-dialog { max-width: calc(100% - 16px) }
  .film-dialog > p { font-size: 19px; padding: 14px 16px }
  .film-dialog .close-dialog { right: 8px; top: 8px; width: 30px; height: 30px; font-size: 18px }
  .toast { width: max-content }
}

/* ---------- hero, stacked: phones and tall screens — headline, film band, then the call to action ---------- */

@media (max-width: 650px), (max-aspect-ratio: 11/10) {
  .hero-scroll { height: 310vh }
  .hero-stage { min-height: 700px; background: var(--sand) }
  .hero-canvas, .hero-poster {
    top: 34%;
    height: 44%;
    bottom: auto;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 80%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 80%, transparent);
  }
  .hero-wash {
    background: linear-gradient(180deg, var(--sand) 0%, var(--sand) 25%, transparent 43%, transparent 70%, var(--sand) 82%, var(--sand) 100%);
  }
  .hero-copy {
    inset: 0;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--header-h) + 30px) var(--gutter) 104px;
    pointer-events: none;
  }
  .hero-copy > * { pointer-events: auto }
  h1 { font-size: clamp(46px, 17vw, 124px); margin: 0 }
  .hero-description { margin: auto 0 18px; font-size: 14px; max-width: none }
  .hero-copy > .button { padding: 12px 16px 12px 20px; font-size: 13px }

  .hero-note {
    top: auto;
    right: var(--gutter);
    bottom: 106px;
    width: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }
  .chapter-no { font-size: 34px; margin: 0 }
  .chapter-label { font-size: 9px; margin-top: 4px }
  .chapter-text, .note-line { display: none }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  .hero-scroll { height: 100svh; min-height: 700px }
  *, *::before, *::after { transition: none !important; animation: none !important }
}
