/* Halden Coffee Co. — concept storefront
   Warm editorial palette, Fraunces / Instrument Sans / DM Mono. */

:root {
  --paper: #F4EDE1;
  --paper-2: #EAE0CE;
  --cream: #FBF7EF;
  --ink: #1F1712;
  --ink-2: #5A4D43;
  --line: rgba(31, 23, 18, .16);
  --rust: #B5502B;
  --rust-deep: #96401F;
  --moss: #2C382B;
  --espresso: #1A1310;
  --gold: #D9A441;

  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gut: clamp(20px, 4vw, 56px);
  --section: clamp(72px, 10vw, 152px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

/* Paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--rust-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--ink); color: var(--cream); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* Pre-hide what GSAP will bring in (class set by the inline head script, removed by app.js) */
.motion .hero .ln__in,
.motion .coll-head .ln__in,
.motion .hero [data-hero-fade],
.motion [data-reveal] { opacity: 0; }

/* ---------- Type ---------- */

.display {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(2.6rem, 12.4vw, 6.4rem);
  line-height: .98;
  letter-spacing: -.032em;
  font-optical-sizing: auto;
}
.display em, .pdp__title em, .footer__mark em {
  font-style: italic;
  font-weight: 300;
  color: var(--rust);
}
.display--sm { font-size: clamp(2.1rem, 5.4vw, 4.2rem); line-height: 1.02; }

/* Headline line masks */
.ln {
  display: block;
  overflow: hidden;
  padding: .08em 0 .14em;
  margin: -.08em 0 -.14em;
}
.ln__in { display: block; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn--primary { background: var(--ink); color: var(--cream); }
.btn--primary:hover { background: var(--rust-deep); }
.btn--ghost { border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-weight: 500;
  font-size: .95rem;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .45s var(--ease);
}
.link-arrow::after {
  content: '→';
  transition: transform .45s var(--ease);
}
.link-arrow:hover { background-size: 0 1px; background-position: 100% 100%; }
.link-arrow:hover::after { transform: translateX(5px); }

.link-btn {
  font-size: .88rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--ink-2);
}
.link-btn:hover { color: var(--ink); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-right: -10px;
  border-radius: 50%;
  transition: background-color .3s var(--ease);
}
.icon-btn:hover { background: rgba(31, 23, 18, .08); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

/* ---------- Concept label, announcement, header ---------- */

.concept-pill {
  position: fixed;
  left: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px 8px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  line-height: 1.2;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(31, 23, 18, .22);
}
.concept-pill span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.announce {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px var(--gut);
}
.announce i { font-style: normal; opacity: .5; margin-inline: 10px; }
.announce .announce__more { display: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 237, 225, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease);
}
.site-header.is-stuck, .site-header.nav-open { border-bottom-color: var(--line); }

.site-header__in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  justify-self: center;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1;
}
.logo span {
  display: none;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.menu-btn {
  justify-self: start;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-left: -10px;
}
.menu-btn__bars, .menu-btn__bars::before {
  display: block;
  width: 22px; height: 1.5px;
  background: currentColor;
  transition: transform .4s var(--ease);
}
.menu-btn__bars { position: relative; transform: translateY(-3.5px); }
.menu-btn__bars::before { content: ''; position: absolute; top: 7px; left: 0; }
.nav-open .menu-btn__bars { transform: translateY(0) rotate(45deg); }
.nav-open .menu-btn__bars::before { transform: translateY(-7px) rotate(-90deg); }

.site-nav {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  display: grid;
  gap: 4px;
  padding: 14px var(--gut) 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s;
}
.nav-open .site-nav {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}
.site-nav a {
  font-family: var(--serif);
  font-size: 2rem;
  letter-spacing: -.02em;
  padding: 8px 0;
}
.site-nav a[aria-current] { font-style: italic; color: var(--rust-deep); }

.cart-btn {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: .92rem;
  font-weight: 500;
}
.cart-count {
  display: grid;
  place-items: center;
  min-width: 24px; height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1;
}
.cart-count.is-empty { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

@media (min-width: 520px) {
  .logo span { display: inline; }
  .announce .announce__more { display: inline; }
}

@media (min-width: 760px) {
  .menu-btn { display: none; }
  .logo { justify-self: start; }
  .site-nav {
    position: static;
    display: flex;
    gap: clamp(20px, 3vw, 40px);
    padding: 0;
    background: none;
    border: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-nav a {
    position: relative;
    font-family: var(--sans);
    font-size: .92rem;
    font-weight: 500;
    letter-spacing: 0;
    padding: 12px 0;
  }
  .site-nav a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 8px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: 100% 50%;
    transition: transform .45s var(--ease);
  }
  .site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); transform-origin: 0 50%; }
  .site-nav a[aria-current] { font-style: normal; color: inherit; }
}

/* ---------- Procedural art ---------- */

.bag-art { width: 100%; height: 100%; overflow: visible; }
.ba-s { font-family: var(--serif); font-weight: 400; }
.ba-i { font-style: italic; font-weight: 300; }
.ba-m { font-family: var(--mono); }
.ba-n { font-family: var(--sans); }

.cup-art { width: 100%; height: auto; }
.steam { overflow: visible; }
svg.steam { filter: blur(2.5px); }
.steam path {
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-linecap: round;
  opacity: .42;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(20px, 4vw, 40px) clamp(40px, 6vw, 64px);
  /* Floating beans, badge and steam must never widen the page. */
  overflow: hidden;
}
@supports (overflow: clip) {
  .hero { overflow: visible; overflow-x: clip; }
}
.hero__in {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
.hero__copy {
  display: grid;
  gap: clamp(18px, 2vw, 24px);
  justify-items: start;
  min-width: 0;
  container-type: inline-size;
}
/* Sized to the column, so "Poured honest." always fills it without wrapping or overflowing. */
.hero .display {
  font-size: clamp(2.6rem, 12.4vw, 6.4rem);
  font-size: clamp(2.6rem, 15.6cqi, 8.6rem);
  line-height: .95;
  letter-spacing: -.038em;
}
.hero__lede { font-size: clamp(1.05rem, 1.35vw, 1.22rem); line-height: 1.5; color: var(--ink-2); max-width: 31em; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 12px clamp(20px, 3.4vw, 48px);
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 520px;
}
.hero__facts dt { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.hero__facts dd { font-family: var(--serif); font-size: clamp(1.05rem, 1.6vw, 1.3rem); letter-spacing: -.01em; }

/* Every layer sits inside the box (no negative insets) so nothing pokes past the viewport. */
.hero-art {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  aspect-ratio: 1 / 1.04;
}
.hero-art > * { position: absolute; display: block; }
.hero-art__arch {
  inset: 15% 10% 0;
  border-radius: 999px 999px 4px 4px;
  background: radial-gradient(120% 70% at 50% 0%, #4B5E43 0%, var(--moss) 62%);
}
.hero-art__arch::after {
  content: '';
  position: absolute;
  inset: 5% 7% auto;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(251, 247, 239, .14);
}
.hero-art__bag {
  left: 12%;
  bottom: 0;
  width: 76%;
  aspect-ratio: 400 / 520;
  z-index: 2;
  border-radius: 6px;
}
.hero-art__float { width: 100%; height: 100%; filter: drop-shadow(0 30px 34px rgba(20, 14, 10, .28)); }
.hero-art__cup { left: 0; bottom: 0; width: 31%; z-index: 3; }
.hero-art__cup .steam { position: absolute; left: 0; bottom: 64%; width: 100%; height: auto; }
.hero-art__badge {
  right: 0;
  top: 4%;
  width: 23%;
  aspect-ratio: 1;
  z-index: 3;
  border-radius: 50%;
  background: var(--rust);
  color: var(--cream);
  box-shadow: 0 10px 24px rgba(31, 23, 18, .18);
}
.hero-art__badge svg { width: 100%; height: 100%; }
.hero-art__bean { width: 6%; z-index: 4; }
.hero-art__bean svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .25)); }
.hero-art__bean--1 { left: 4%; top: 26%; }
.hero-art__bean--1 svg { rotate: 32deg; }
.hero-art__bean--2 { right: 5%; top: 46%; width: 7%; }
.hero-art__bean--2 svg { rotate: -48deg; }
.hero-art__bean--3 { left: 14%; top: 5%; width: 4.8%; }
.hero-art__bean--3 svg { rotate: 110deg; }
.hero-art__bean--4 { right: 9%; bottom: 3%; width: 7.4%; }
.hero-art__bean--4 svg { rotate: 68deg; }
.hero-art__bean--5 { right: 3%; bottom: 30%; width: 5.2%; }
.hero-art__bean--5 svg { rotate: -15deg; }

@media (min-width: 900px) {
  .hero { padding-block: 8px 28px; }
  .hero__in {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    gap: clamp(32px, 4vw, 64px);
  }
  /* Tie the art to the viewport height so the featured row still peeks above the fold. */
  .hero-art { max-width: clamp(380px, calc(100svh - 400px), 560px); }
}

/* Home: featured row sits tight under the hero */
.section--featured { padding-top: clamp(40px, 6vw, 72px); }
@media (min-width: 900px) {
  .section--featured { padding-top: 36px; }
  .section--featured .section-head { margin-bottom: 28px; }
}

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 18px;
}
.marquee__track { display: flex; width: max-content; animation: marquee 44s linear infinite; }
.marquee ul { display: flex; flex: none; }
.marquee li {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding-left: clamp(28px, 4vw, 56px);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  white-space: nowrap;
}
.marquee li::after { content: '✦'; font-style: normal; font-size: .6em; color: var(--rust); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections, grid, cards ---------- */

.section { padding-block: var(--section); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(28px, 4vw, 56px);
}
.section-head .eyebrow { margin-bottom: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 12px;
}
@media (min-width: 700px) { .grid { gap: 48px 24px; } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { display: flex; flex-direction: column; min-width: 0; }
.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 5px;
  background: var(--tone, var(--paper-2));
  overflow: hidden;
}
.card__link {
  position: absolute;
  inset: 0;
  padding: 10% 13% 3%;
}
.card__link .bag-art { transition: transform .8s var(--ease); transform-origin: 50% 90%; }
/* Hover: the tile lifts, the bag tilts (and leans toward the pointer via --tilt, set in app.js). */
@media (hover: hover) {
  .card__media { transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
  .card:hover .card__media { transform: translateY(-6px); box-shadow: 0 24px 40px -24px rgba(31, 23, 18, .5); }
  .card:hover .card__link .bag-art { transform: translateY(-3%) rotate(calc(-3deg + var(--tilt, 0deg))) scale(1.045); }
}
.card__tag {
  position: absolute;
  top: 10px; left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(251, 247, 239, .86);
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.2;
}
.card__add {
  position: absolute;
  right: 10px; bottom: 10px;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(31, 23, 18, .14);
  transition: background-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.card__add:hover { background: var(--ink); color: var(--cream); transform: scale(1.06); }
.card__add.is-added { background: var(--rust-deep); color: var(--cream); }
.card__add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card__add-check { opacity: 0; }
.card__add.is-added .card__add-plus { opacity: 0; }
.card__add.is-added .card__add-check { opacity: 1; }

.card__body { display: grid; gap: 3px; padding-top: 14px; }
.card__meta { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.card__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -.02em; line-height: 1.15; }
.card__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease); }
.card:hover .card__title a { background-size: 100% 1px; }
.card__notes { font-size: .88rem; color: var(--ink-2); line-height: 1.4; }
.card__price { margin-top: 6px; font-size: .95rem; font-weight: 500; }
.card__price span { font-weight: 400; color: var(--ink-2); font-size: .82rem; }

@media (min-width: 700px) {
  .card__tag { top: 14px; left: 14px; font-size: .64rem; }
  .card__add { right: 14px; bottom: 14px; width: 46px; height: 46px; }
}

.roasts { display: grid; margin-top: clamp(56px, 8vw, 112px); border-top: 1px solid var(--line); }
.roast-link {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 24px 40px 26px 0;
  border-bottom: 1px solid var(--line);
}
.roast-link__t { font-family: var(--serif); font-weight: 340; font-size: clamp(1.8rem, 3.4vw, 2.8rem); letter-spacing: -.025em; line-height: 1.05; }
.roast-link__t em { font-style: italic; font-weight: 300; color: var(--rust); }
.roast-link__d { color: var(--ink-2); font-size: .95rem; max-width: 26em; }
.roast-link::after {
  content: '→';
  position: absolute;
  right: 4px;
  bottom: 28px;
  font-size: 1.3rem;
  opacity: .35;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.roast-link:hover::after { opacity: 1; transform: translateX(6px); }
.roast-link:hover .roast-link__t { color: var(--rust-deep); }
.roast-link__t { transition: color .4s var(--ease); }
@media (min-width: 800px) {
  .roasts { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .roast-link { padding: 32px 56px 36px 0; border-bottom: 0; }
  .roast-link + .roast-link { padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--line); }
  .roast-link::after { right: clamp(16px, 2vw, 28px); bottom: 36px; }
}

/* ---------- Story ---------- */

.story { background: var(--paper-2); }
.story__in { display: grid; gap: clamp(36px, 6vw, 96px); align-items: center; }
.story__art {
  position: relative;
  aspect-ratio: 480 / 560;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  border-radius: 6px;
  background: #E2CFAE;
  overflow: hidden;
}
.story__art svg { width: 100%; height: 100%; }
.story .steam path { stroke-width: 7; opacity: .34; }
.story__copy { display: grid; gap: clamp(18px, 2vw, 26px); justify-items: start; }
.story__copy p:not(.eyebrow) { color: var(--ink-2); max-width: 34em; font-size: clamp(1rem, 1.25vw, 1.12rem); }
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  margin-top: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stats dt { order: 2; font-size: .84rem; color: var(--ink-2); line-height: 1.35; margin-top: 6px; }
.stats dd { font-family: var(--serif); font-weight: 340; font-size: clamp(2.2rem, 4.6vw, 3.8rem); letter-spacing: -.03em; line-height: 1; }
.stats dd small { font-size: .42em; letter-spacing: 0; margin-left: .15em; font-style: italic; color: var(--rust-deep); }
.stats > div { display: flex; flex-direction: column; }

@media (min-width: 900px) {
  .story__in { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

.steps {
  display: grid;
  gap: 0;
  margin-top: var(--section);
  border-top: 1px solid var(--line);
}
.step { display: grid; gap: 10px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.step__n { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; color: var(--rust-deep); }
.step h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.02em; line-height: 1.1; }
.step p { color: var(--ink-2); max-width: 30em; font-size: .97rem; }
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .step { padding: 32px clamp(20px, 3vw, 40px) 36px 0; border-bottom: 0; }
  .step + .step { padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--line); }
}

/* ---------- Subscription ---------- */

.sub {
  background: var(--espresso);
  color: var(--cream);
  overflow: hidden;
}
.sub :focus-visible { outline-color: var(--gold); }
.sub__in { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
.sub__copy { display: grid; gap: clamp(18px, 2vw, 26px); justify-items: start; }
.sub .eyebrow { color: var(--gold); }
.sub .display em { color: var(--gold); }
.sub__copy > p:not(.eyebrow) { color: rgba(251, 247, 239, .72); max-width: 32em; font-size: clamp(1rem, 1.25vw, 1.12rem); }
.sub__perks { display: grid; gap: 8px; font-size: .95rem; }
.sub__perks li { display: flex; gap: 12px; align-items: baseline; }
.sub__perks li::before { content: '✦'; color: var(--gold); font-size: .7em; }

.sub__calc {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 520px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(251, 247, 239, .18);
  border-radius: 8px;
}
.sub__calc legend { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(251, 247, 239, .6); margin-bottom: 10px; }
.sub__total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(251, 247, 239, .18);
}
.sub__total strong { font-family: var(--serif); font-weight: 340; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.sub__total span { font-size: .84rem; color: rgba(251, 247, 239, .6); }
.sub__note { font-size: .84rem; color: rgba(251, 247, 239, .6); }
.sub .btn--primary { background: var(--cream); color: var(--ink); }
.sub .btn--primary:hover { background: var(--gold); }
.sub .pill span { border-color: rgba(251, 247, 239, .28); }
.sub .pill input:checked + span { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.sub .pill input:focus-visible + span { outline-color: var(--gold); }

.sub-art {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
  aspect-ratio: 1 / .92;
}
.sub-art::before {
  content: '';
  position: absolute;
  inset: 8% 6% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(217, 164, 65, .2), rgba(217, 164, 65, 0));
}
.sub-art__bag {
  position: absolute;
  bottom: 4%;
  width: 46%;
  aspect-ratio: 400 / 520;
  transform-origin: 50% 100%;
}
.sub-art__bag--1 { left: 4%; transform: rotate(-11deg); }
.sub-art__bag--2 { left: 27%; bottom: 9%; z-index: 2; }
.sub-art__bag--3 { left: 50%; transform: rotate(11deg); }

@media (min-width: 900px) {
  .sub__in { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
}

/* ---------- Form controls shared by PDP + subscription ---------- */

.opt__row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; display: inline-flex; cursor: pointer; }
.pill input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.pill span {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.4;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.pill small { font-family: var(--mono); font-size: .72rem; font-weight: 400; opacity: .7; }
.pill:hover span { border-color: currentColor; }
.pill input:checked + span { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pill input:focus-visible + span { outline: 2px solid var(--rust-deep); outline-offset: 3px; }

.qty {
  display: inline-flex;
  align-items: center;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.qty button {
  display: grid;
  place-items: center;
  width: 46px; height: 100%;
  border-radius: 999px;
  font-size: 1.15rem;
  line-height: 1;
}
.qty button:hover { background: rgba(31, 23, 18, .07); }
.qty button:disabled { opacity: .3; cursor: default; }
.qty input, .qty__n {
  width: 2.4em;
  border: 0;
  background: none;
  text-align: center;
  font-family: var(--mono);
  font-size: .92rem;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm { height: 38px; }
.qty--sm button { width: 36px; font-size: 1rem; }
.qty--sm .qty__n { width: 1.8em; font-size: .82rem; }

/* ---------- Collection ---------- */

.coll-head { padding-block: clamp(36px, 6vw, 88px) clamp(28px, 4vw, 56px); display: grid; gap: clamp(14px, 2vw, 22px); }
.coll-head .display { font-size: clamp(3.2rem, 12vw, 9rem); line-height: .92; }
.coll { padding-bottom: var(--section); }

.filters__body { display: grid; gap: 22px; }
.filters__head h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; letter-spacing: -.02em; }
.filters__label {
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.4;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.chip span { font-family: var(--mono); font-size: .68rem; font-weight: 400; opacity: .6; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding-block: 12px;
  margin-bottom: clamp(24px, 3vw, 40px);
  border-block: 1px solid var(--line);
}
.toolbar__count { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.sort { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; font-size: .9rem; }

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: .9rem;
  font-weight: 500;
  transition: background-color .3s var(--ease);
}
.filter-btn:hover { background: var(--rust-deep); }
.filter-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.filter-btn__n {
  display: grid;
  place-items: center;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .68rem;
}

/* Mobile / tablet: filters live in a bottom sheet */
@media (max-width: 999.98px) {
  .filters {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 96;
    display: flex;
    flex-direction: column;
    max-height: min(86svh, 720px);
    background: var(--cream);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -20px 60px rgba(26, 19, 16, .22);
    transform: translateY(102%);
    visibility: hidden;
    transition: transform .5s var(--ease), visibility 0s .5s;
  }
  .filters.is-open { transform: none; visibility: visible; transition: transform .55s var(--ease); }
  .filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
  }
  .filters__head::before {
    content: '';
    position: absolute;
    top: 7px; left: 50%;
    width: 38px; height: 4px;
    margin-left: -19px;
    border-radius: 4px;
    background: var(--line);
  }
  .filters__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 26px; }
  .filters__foot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
  }
  .filters__foot .btn { flex: 1; margin-left: auto; }
  .sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 95;
    background: rgba(26, 19, 16, .62);
    visibility: hidden;
    opacity: 0;
    transition: opacity .4s var(--ease), visibility 0s .4s;
  }
  .sheet-overlay.is-open { visibility: visible; opacity: 1; transition: opacity .4s var(--ease); }
  html.sheet-open { overflow: hidden; }
}
@media (max-width: 599.98px) {
  .toolbar__count { order: 3; width: 100%; }
}

/* Desktop: compact header + sticky sidebar so two rows of coffee are on screen at 1440 × 900 */
@media (min-width: 1000px) {
  .coll-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
    align-items: end;
    column-gap: 48px;
    padding-block: 20px 22px;
  }
  .coll-head .eyebrow { grid-column: 1 / -1; }
  .coll-head .display { font-size: clamp(3.6rem, 5.4vw, 5.6rem); }
  .coll-head .lede { justify-self: end; font-size: 1rem; padding-bottom: 6px; }

  .coll {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    column-gap: clamp(32px, 3.4vw, 52px);
    align-items: start;
  }
  .filters {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: calc(var(--header-h) + 16px);
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }
  .filters__head, .filters__foot, .filter-btn, .sheet-overlay { display: none; }
  .filters .chip { min-height: 36px; padding: 6px 13px; font-size: .86rem; }
  .coll .toolbar { grid-column: 2; grid-row: 1; padding-block: 10px; margin-bottom: 22px; }
  .coll .grid, .coll .empty { grid-column: 2; grid-row: 2; }
  .coll .grid { row-gap: 32px; }
  .coll .card__media { aspect-ratio: 1 / 1.12; }
}
@media (min-width: 1240px) {
  .coll .grid--3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.sort span { color: var(--ink-2); }
.sort select {
  -webkit-appearance: none;
  appearance: none;
  min-height: 40px;
  padding: 6px 34px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231F1712' stroke-width='1.4'/%3E%3C/svg%3E") right 14px center / 10px auto no-repeat;
  font-weight: 500;
  cursor: pointer;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(48px, 8vw, 110px) 0;
  text-align: center;
}
.empty .cup-art { width: 130px; margin-bottom: 6px; }
.empty h2 { font-family: var(--serif); font-weight: 340; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -.025em; line-height: 1.1; }
.empty p { color: var(--ink-2); max-width: 28em; }
.empty .btn { margin-top: 10px; }

/* ---------- Product ---------- */

.crumbs { padding-block: 22px; font-size: .84rem; color: var(--ink-2); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: '/'; margin-right: 8px; opacity: .5; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.crumbs [aria-current] { color: var(--ink); }

.pdp { display: grid; gap: 32px; padding-bottom: var(--section); }
.gallery { display: grid; gap: 12px; min-width: 0; }
.gallery__stage {
  position: relative;
  aspect-ratio: 1 / 1.08;
  max-height: calc(100svh - 150px);
  width: 100%;
  border-radius: 6px;
  background: var(--tone, var(--paper-2));
  overflow: hidden;
}
.gallery__frame { position: absolute; inset: 6% 10% 3%; }
.gallery__no, .gallery__cap {
  position: absolute;
  top: 16px;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.gallery__no { left: 18px; }
.gallery__cap { right: 18px; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 16px); padding-top: 4px; }
.thumb { display: grid; gap: 8px; min-width: 0; text-align: left; }
.thumb__media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--tone, var(--paper-2));
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(31, 23, 18, .14);
  transition: box-shadow .35s var(--ease);
}
.thumb__media .bag-art {
  position: absolute;
  left: 10%; top: 8%;
  width: 80%; height: 88%;
  transition: transform .6s var(--ease);
}
.thumb:hover .thumb__media .bag-art { transform: scale(1.1) translateY(-2%); }
.thumb:hover .thumb__media { box-shadow: inset 0 0 0 1px rgba(31, 23, 18, .4); }
.thumb__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  transition: color .35s var(--ease);
}
.thumb__label::before {
  content: '';
  flex: none;
  width: 14px; height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .4s var(--ease);
}
.thumb[aria-pressed="true"] .thumb__media { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.thumb[aria-pressed="true"] .thumb__label { color: var(--ink); }
.thumb[aria-pressed="true"] .thumb__label::before { transform: scaleX(1); }
.thumb:focus-visible { outline: none; }
.thumb:focus-visible .thumb__media { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--rust-deep); }

.pdp__info { display: grid; gap: 18px; align-content: start; min-width: 0; }
.pdp__title {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(2.8rem, 6.2vw, 5.2rem);
  line-height: .98;
  letter-spacing: -.032em;
}
.pdp__price { display: flex; align-items: baseline; gap: 10px; font-size: 1.5rem; font-family: var(--serif); letter-spacing: -.01em; }
.pdp__price-n { display: inline-block; overflow: hidden; font-variant-numeric: tabular-nums; }
.pdp__price-n span { display: inline-block; }
.pdp__price small { font-family: var(--sans); font-size: .9rem; color: var(--ink-2); letter-spacing: 0; }

.notes { display: flex; flex-wrap: wrap; gap: 8px; }
.notes li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 9px;
  border-radius: 999px;
  background: var(--cream);
  font-size: .88rem;
}
.notes i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.pdp__blurb { color: var(--ink-2); font-size: clamp(1rem, 1.25vw, 1.12rem); max-width: 34em; }

.buy { display: grid; gap: 20px; padding-block: 24px; margin-top: 4px; border-block: 1px solid var(--line); }
.opt legend {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.buy__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.buy__label {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.buy__note { font-size: .84rem; color: var(--ink-2); }

.btn--add { display: grid; padding-inline: 18px; min-width: 0; overflow: hidden; }
.buy .btn--add { width: 100%; min-height: 60px; font-size: 1rem; }

/* Sticky add-to-cart bar (phones + tablets) */
.buy-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(251, 247, 239, .94);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px rgba(31, 23, 18, .08);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .45s var(--ease), visibility 0s .45s;
}
.buy-bar.is-shown { transform: none; visibility: visible; transition: transform .45s var(--ease); }
.buy-bar__info { flex: 1; min-width: 0; }
.buy-bar__name { font-family: var(--serif); font-size: 1.1rem; letter-spacing: -.015em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buy-bar__meta { font-size: .78rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buy-bar .btn--add { flex: none; min-height: 50px; padding-inline: 20px; font-size: .9rem; }
@media (max-width: 899.98px) {
  html.has-buybar .concept-pill { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  body[data-page="product"] .footer__legal { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 900px) {
  .buy-bar { display: none; }
}
.btn--add > span { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn--add__label { font-variant-numeric: tabular-nums; }
.btn--add__done { visibility: hidden; }
.btn--add__done svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn--add.is-added { background: var(--rust-deep); }
.btn--add.is-added .btn--add__label { visibility: hidden; }
.btn--add.is-added .btn--add__done { visibility: visible; }

.profile { padding-top: 10px; }
.profile__h { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: 8px; }
.meter { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 16px; padding-block: 9px; }
.meter dt { font-size: .88rem; color: var(--ink-2); }
.meter__track { display: block; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter__fill { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--v, 0)); }

.specs { border-top: 1px solid var(--line); }
.specs > div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.specs dt { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding-top: 4px; }

.acc details { border-bottom: 1px solid var(--line); }
.acc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: '';
  flex: none;
  width: 12px; height: 12px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition: transform .4s var(--ease);
}
.acc details[open] summary::after { transform: rotate(135deg); }
.acc__body { display: grid; gap: 14px; padding-bottom: 20px; color: var(--ink-2); font-size: .95rem; max-width: 36em; }
.acc__body strong { color: var(--ink); font-weight: 500; }
.recipe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recipe li { padding: 12px 14px; border-radius: 5px; background: var(--cream); color: var(--ink); font-family: var(--mono); font-size: .86rem; }
.recipe span { display: block; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2px; }

.related { padding-bottom: var(--section); }
.notfound { display: grid; gap: 20px; justify-items: start; padding-block: clamp(72px, 14vw, 180px); }
.notfound p:not(.eyebrow) { color: var(--ink-2); }
.noscript { padding-block: 80px; }

@media (min-width: 480px) {
  .recipe { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(36px, 5vw, 88px); align-items: start; }
  .gallery { position: sticky; top: calc(var(--header-h) + 20px); }
  .gallery__stage { max-height: calc(100svh - var(--header-h) - 250px); min-height: 380px; }
  .gallery__thumbs { max-width: 560px; }
  .pdp__info { padding-top: 6px; }
}

/* ---------- Cart drawer ---------- */

html.cart-open { overflow: hidden; }
html.cart-open body { padding-right: var(--scrollbar, 0px); }

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(22, 16, 13, .7);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  visibility: hidden;
  opacity: 0;
}
.cart-overlay.is-open { visibility: visible; opacity: 1; }

/* Keep the concept label readable above any open drawer or sheet. */
html.cart-open .concept-pill, html.sheet-open .concept-pill { z-index: 110; }
/* Where the drawer would sit on top of the pill, park the pill at the top and give the drawer header room for it. */
@media (max-width: 719.98px) {
  html.cart-open .concept-pill, html.sheet-open .concept-pill {
    top: calc(12px + env(safe-area-inset-top, 0px));
    bottom: auto;
  }
  .cart__head { padding-top: calc(54px + env(safe-area-inset-top, 0px)); }
}

.cart {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  background: var(--cream);
  box-shadow: -20px 0 60px rgba(26, 19, 16, .18);
  transform: translateX(100%);
  visibility: hidden;
}
.cart.is-open { transform: none; visibility: visible; }
.cart:focus { outline: none; }

.cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.cart__head h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; letter-spacing: -.02em; }
.cart__head h2 span { font-family: var(--mono); font-size: .8rem; letter-spacing: 0; color: var(--ink-2); }

.cart__ship { display: grid; gap: 10px; padding: 16px 24px 18px; background: var(--paper); font-size: .88rem; }
.cart__bar { height: 4px; border-radius: 4px; background: rgba(31, 23, 18, .13); overflow: hidden; }
.cart__bar span { display: block; height: 100%; border-radius: 4px; background: var(--rust); transform-origin: 0 50%; transform: scaleX(0); }
.cart__bar.is-full span { background: #4E6A45; }

.cart__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-inline: 24px; }
.line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 14px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.line__art { display: block; height: 92px; padding: 8px 10px 4px; border-radius: 4px; background: var(--tone, var(--paper-2)); }
.line__info { display: grid; gap: 2px; align-content: start; min-width: 0; }
.line__name { font-family: var(--serif); font-size: 1.2rem; letter-spacing: -.015em; line-height: 1.2; }
.line__name:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.line__meta { font-size: .82rem; color: var(--ink-2); }
.line__row { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 2px; }
.line__remove { font-size: .8rem; color: var(--ink-2); text-decoration: underline; text-underline-offset: 4px; padding: 8px 2px; }
.line__remove:hover { color: var(--ink); }
.line__price { font-family: var(--mono); font-size: .86rem; padding-top: 4px; font-variant-numeric: tabular-nums; }

.cart__empty { display: grid; justify-items: center; gap: 8px; padding: 56px 12px; text-align: center; color: var(--ink-2); }
.cart__empty .cup-art { width: 110px; margin-bottom: 12px; }
.cart__empty-title { font-family: var(--serif); font-size: 1.7rem; letter-spacing: -.02em; color: var(--ink); line-height: 1.15; }
.cart__empty .btn { margin-top: 16px; }

.upsell { padding-block: 22px 26px; }
.upsell__h {
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.upsell__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.upsell__item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.upsell__art {
  display: block;
  aspect-ratio: 1 / 1.1;
  margin-bottom: 6px;
  padding: 10% 16% 4%;
  border-radius: 5px;
  background: var(--tone, var(--paper-2));
  overflow: hidden;
}
.upsell__art .bag-art { transition: transform .6s var(--ease); transform-origin: 50% 90%; }
.upsell__item:hover .upsell__art .bag-art { transform: translateY(-3%) rotate(-3deg) scale(1.04); }
.upsell__name { font-family: var(--serif); font-size: 1rem; letter-spacing: -.01em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upsell__name:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.upsell__meta { font-size: .76rem; color: var(--ink-2); }
.upsell__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.upsell__add:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.upsell__add svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.cart__foot {
  display: grid;
  gap: 10px;
  padding: 18px 24px calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}
.cart__sum { display: flex; align-items: baseline; justify-content: space-between; }
.cart__sum strong { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cart__fine { font-size: .8rem; color: var(--ink-2); margin-bottom: 6px; }
.cart__concept { padding: 10px 14px; border-radius: 6px; background: var(--paper-2); font-size: .82rem; line-height: 1.45; }

.fly-dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 120;
  width: 22px; height: 22px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--cream), 0 6px 14px rgba(31, 23, 18, .25);
  pointer-events: none;
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding-top: clamp(48px, 7vw, 96px); overflow: hidden; }
.footer__top { display: grid; gap: 40px; }
.footer__news { display: grid; gap: 14px; max-width: 460px; }
.footer__news h2 { font-family: var(--serif); font-weight: 340; font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.025em; line-height: 1.1; }
.footer__news p { color: var(--ink-2); font-size: .95rem; }
.news { display: flex; gap: 8px; margin-top: 6px; }
.news input {
  flex: 1;
  min-width: 0;
  min-height: 54px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
}
.news input::placeholder { color: var(--ink-2); opacity: .8; }
.news input[aria-invalid="true"] { border-color: var(--rust-deep); }
.news__msg { min-height: 1.5em; font-size: .86rem; color: var(--ink-2); }
.footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.footer__cols h3 { font-family: var(--mono); font-size: .66rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.footer__cols li { margin-bottom: 8px; font-size: .95rem; }
.footer__cols a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__cols p { font-size: .95rem; color: var(--ink-2); }
.footer__mark {
  margin-top: clamp(40px, 6vw, 80px);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(5rem, 25vw, 23rem);
  line-height: .78;
  letter-spacing: -.055em;
  white-space: nowrap;
  user-select: none;
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(28px, 4vw, 48px);
  padding-block: 20px calc(64px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
  .footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* Page-to-page fade: in on load (CSS), out on internal link clicks (html.is-leaving, set in app.js). */
  body { animation: page-in .6s var(--ease) backwards; }
  html.is-leaving body { opacity: 0; transition: opacity .28s ease-in; }
}
@keyframes page-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .marquee__track { width: auto; }
  .marquee ul + ul { display: none; }
  .marquee ul { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
  .card:hover .card__link .bag-art,
  .card:hover .card__media,
  .thumb:hover .thumb__media .bag-art,
  .upsell__item:hover .upsell__art .bag-art { transform: none; }
}
