@font-face {
  font-family: "Arthaus";
  src: url("../assets/Arthaus-Black.otf") format("opentype");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../assets/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --forest: #14271b;
  --forest-2: #1c3626;
  --court: #6f8a66;
  --court-light: #8fa585;
  --cream: #f4efe4;
  --ink: #17191a;
  --grey: #6b6f6c;
  --pink: #f2a9bd;
  --pink-deep: #e58aa5;
  --orange: #ee8a52;
  --line: rgba(244, 239, 228, .55);
  --display: "Arthaus", "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--forest);
  color: var(--cream);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }

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

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  transition: background .3s, backdrop-filter .3s;
}
.nav.is-solid { background: rgba(20, 39, 27, .82); backdrop-filter: blur(12px); }
.nav__logo img { height: 30px; width: auto; }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a {
  text-decoration: none; font-weight: 500; font-size: 15px; opacity: .85;
}
.nav__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cream); color: var(--ink);
  border: 0; border-radius: 999px; padding: 9px 10px 9px 18px;
  font-weight: 700; font-size: 15px;
}
.cart-btn__count {
  min-width: 26px; height: 26px; border-radius: 999px; padding: 0 7px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--cream); font-size: 13px;
}
.cart-btn.bump .cart-btn__count { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.35); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; padding: 15px 28px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  transition: transform .15s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--pink { background: var(--pink); color: var(--ink); }
.btn--pink:hover { background: #f7bccc; }
.btn--dark { background: var(--ink); color: var(--cream); }
.btn--dark:hover { background: #2b2e2f; }
.btn--full { width: 100%; }

.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--pink);
}
.eyebrow--dark { color: #a04d67; }

/* ---------- 3D stage ---------- */
.stage { height: 480vh; position: relative; }
.stage__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
}
.court {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 70% at 50% 108%, var(--court-light) 0%, var(--court) 38%, transparent 70%),
    linear-gradient(180deg, #0f1f15 0%, var(--forest-2) 46%, #33523a 62%, var(--court) 100%);
}
/* court lines, drawn in perspective */
.court::before {
  content: ""; position: absolute; left: 50%; bottom: -6%;
  width: 150vmax; height: 46%;
  transform: translateX(-50%) perspective(900px) rotateX(64deg);
  transform-origin: 50% 100%;
  background:
    linear-gradient(var(--line), var(--line)) 0 34% / 100% 4px no-repeat,
    linear-gradient(var(--line), var(--line)) 22% 0 / 4px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) 78% 0 / 4px 100% no-repeat;
  opacity: .5;
}
#scene {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: pan-y;
}

.hero, .steps {
  position: absolute; left: 0; right: 0; top: 0;
  padding: clamp(76px, 10.5vh, 120px) var(--gutter) 0;
  text-align: center; pointer-events: none;
}
.hero h1 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(34px, min(7vw, 8.6vh), 96px); line-height: .98; letter-spacing: -.01em;
  text-transform: lowercase; text-wrap: balance;
  margin: 12px 0 18px;
}
.hero__cta {
  display: flex; gap: 22px; justify-content: center; align-items: center; flex-wrap: wrap;
}
.hero__cta .btn { pointer-events: auto; }
.hint { font-size: 14px; opacity: .8; display: inline-flex; align-items: center; gap: 8px; }
.hint__icon {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border: 1.5px solid currentColor; border-radius: 50%;
  animation: nudge 2.2s ease-in-out infinite;
}
@keyframes nudge { 0%, 100% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }

.step {
  position: absolute; left: 0; right: 0; top: clamp(84px, 13vh, 132px);
  padding: 0 var(--gutter);
  opacity: 0; transform: translateY(18px);
  transition: opacity .45s, transform .45s;
}
.step.is-on { opacity: 1; transform: none; }
.step__n {
  display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: .22em;
  color: var(--pink); margin-bottom: 10px;
}
.step h2 {
  font-family: var(--display); font-weight: 900; text-transform: lowercase;
  font-size: clamp(32px, 5.6vw, 76px); line-height: 1; text-wrap: balance;
}
.step p { margin-top: 12px; font-size: clamp(16px, 1.5vw, 20px); opacity: .85; }

.scrollcue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--forest); display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: opacity .3s;
}
.scrollcue span {
  width: 2px; height: 26px; background: var(--forest); transform-origin: top;
  animation: drip 1.6s ease-in-out infinite;
}
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.progress {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  width: 3px; height: 140px; background: rgba(244, 239, 228, .25); border-radius: 3px;
  opacity: 0; transition: opacity .3s;
}
.progress.is-on { opacity: 1; }
.progress i { display: block; width: 100%; height: 100%; background: var(--pink); border-radius: 3px; transform-origin: top; transform: scaleY(0); }

/* ---------- Features ---------- */
.features { background: var(--cream); color: var(--ink); padding: clamp(72px, 10vw, 140px) 0; }
.h-xl {
  font-family: var(--display); font-weight: 900; text-transform: lowercase;
  font-size: clamp(34px, 5.4vw, 72px); line-height: 1; margin-top: 12px; text-wrap: balance;
}
.feature-grid {
  list-style: none; padding: 0; margin: clamp(40px, 6vw, 72px) 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.feature-grid li { border-top: 2px solid var(--ink); padding-top: 22px; }
.feature-grid svg {
  width: 52px; height: 52px; fill: none; stroke: var(--ink); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px;
}
.feature-grid h3 { font-size: 20px; font-weight: 700; line-height: 1.2; }
.feature-grid p { color: var(--grey); margin-top: 8px; font-size: 16px; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px;
  background: var(--cream); padding: 0 6px 6px;
}
.gallery figure { margin: 0; overflow: hidden; border-radius: 14px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery__big { grid-row: span 2; aspect-ratio: 1; }

/* ---------- Shop ---------- */
.shop { background: var(--cream); color: var(--ink); padding: clamp(72px, 10vw, 140px) 0; }
.products {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  margin-top: clamp(32px, 5vw, 56px);
}
.product {
  background: #fff; border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.product__media {
  position: relative; aspect-ratio: 4 / 5; background: var(--tint, #eee);
}
.product__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transition: opacity .45s, transform .6s cubic-bezier(.2,.7,.2,1);
}
.product__media img.folded { opacity: 0; transform: scale(.94); }
.product:hover .product__media img.open,
.product.show-folded .product__media img.open { opacity: 0; transform: scale(1.04); }
.product:hover .product__media img.folded,
.product.show-folded .product__media img.folded { opacity: 1; transform: none; }
.product__flip {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(255,255,255,.85); border: 0; border-radius: 999px;
  padding: 6px 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--ink);
}
.product__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.product__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.product__name { font-family: var(--display); font-weight: 900; font-size: 26px; text-transform: lowercase; line-height: 1.1; }
.product__price { font-weight: 700; font-size: 18px; white-space: nowrap; }
.product__desc { color: var(--grey); font-size: 15px; }
.product__buy { display: flex; gap: 10px; margin-top: auto; }
.qty {
  display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 999px;
}
.qty button { background: none; border: 0; width: 38px; height: 46px; font-size: 20px; line-height: 1; color: var(--ink); }
.qty output { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.product__buy .btn { flex: 1; padding: 13px 18px; }

/* ---------- Footer ---------- */
.footer { padding: 72px var(--gutter) 48px; text-align: center; }
.footer__logo { height: 54px; width: auto; margin: 0 auto 16px; }
.footer__small { opacity: .55; font-size: 14px; margin-top: 26px; }

/* ---------- Cart ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8, 16, 11, .55); z-index: 40; }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(430px, 100vw); background: var(--cream); color: var(--ink);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.cart.is-open { transform: none; }
.cart__head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid rgba(0,0,0,.1); }
.cart__head h2 { font-family: var(--display); font-size: 28px; text-transform: lowercase; }
.cart__close { background: none; border: 0; font-size: 32px; line-height: 1; padding: 0 6px; color: var(--ink); }
.cart__items { list-style: none; margin: 0; padding: 0 22px; overflow-y: auto; flex: 1; }
.cart__items li { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.cart__thumb { width: 72px; height: 90px; border-radius: 12px; background: var(--tint, #eee); object-fit: contain; }
.cart__name { font-weight: 700; }
.cart__meta { color: var(--grey); font-size: 14px; }
.cart__items .qty button { width: 30px; height: 34px; font-size: 17px; }
.cart__line { text-align: right; font-weight: 700; }
.cart__remove { background: none; border: 0; padding: 0; font-size: 13px; color: var(--grey); text-decoration: underline; display: block; margin: 6px 0 0 auto; }
.cart__empty { padding: 40px 22px; color: var(--grey); text-align: center; flex: 1; }
.cart__foot { padding: 20px 22px 24px; border-top: 1px solid rgba(0,0,0,.1); }
.cart__total { display: flex; justify-content: space-between; font-size: 18px; margin-bottom: 14px; }
.cart__note { margin-top: 12px; font-size: 14px; color: var(--grey); text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .products { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .gallery__big { grid-column: span 2; grid-row: auto; }
  .gallery figure:not(.gallery__big) { aspect-ratio: 1; }
}
@media (max-width: 640px) {
  .nav__links { display: none; }
  .cart-btn { margin-left: auto; }
  .hint { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .progress { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hint__icon, .scrollcue span { animation: none; }
}

/* ---------- Headline follows the hovered bottle ---------- */
.hero h1, .step h2 { transition: color .35s, -webkit-text-stroke-color .35s; -webkit-text-stroke: 0 transparent; paint-order: stroke fill; }
.stage__sticky[data-hover="pink"] :is(.hero h1, .step h2) { color: var(--pink); }
.stage__sticky[data-hover="orange"] :is(.hero h1, .step h2) { color: var(--orange); }
/* black on the dark court needs a light outline to stay readable */
.stage__sticky[data-hover="black"] :is(.hero h1, .step h2) { color: #17191a; -webkit-text-stroke: .045em var(--cream); }
.limit-note { font-size: 13px; color: #a04d67; min-height: 1.2em; }

/* every line of the fold captions (and hero labels) follows the hovered bottle */
.step__n, .step p, .hero .eyebrow, .hint { transition: color .35s; paint-order: stroke fill; }
.step p { opacity: 1; }
.stage__sticky[data-hover="pink"] :is(.step__n, .step p, .hero .eyebrow, .hint) { color: var(--pink); }
.stage__sticky[data-hover="orange"] :is(.step__n, .step p, .hero .eyebrow, .hint) { color: var(--orange); }
.stage__sticky[data-hover="black"] :is(.step__n, .step p, .hero .eyebrow, .hint) { color: #17191a; -webkit-text-stroke: .16em var(--cream); }
.stage__sticky[data-hover="pink"] .progress i { background: var(--pink); }
.stage__sticky[data-hover="orange"] .progress i { background: var(--orange); }
.stage__sticky[data-hover="black"] .progress i { background: #17191a; }

/* the hero button follows the hovered bottle too */
.hero .btn { transition: transform .15s, background .35s, color .35s, box-shadow .35s; }
.stage__sticky[data-hover="pink"] .hero .btn { background: var(--pink); color: var(--ink); }
.stage__sticky[data-hover="orange"] .hero .btn { background: var(--orange); color: var(--ink); }
.stage__sticky[data-hover="black"] .hero .btn { background: #17191a; color: var(--cream); box-shadow: 0 0 0 2px var(--cream); }

/* ---------- Marketplace links on product cards ---------- */
.product__markets {
  border-top: 1px solid rgba(0,0,0,.1); padding-top: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.product__markets span { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.product__markets div { display: flex; flex-wrap: wrap; gap: 8px; }
.product__markets a {
  flex: 1 1 auto; text-align: center; white-space: nowrap;
  border: 1.5px solid rgba(23,25,26,.3); border-radius: 999px; padding: 8px 12px;
  font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none;
  transition: border-color .2s, background .2s;
}
.product__markets a:hover { border-color: var(--ink); background: rgba(23,25,26,.06); }
