:root {
  --bg: #0b0a09;
  --bg-2: #13110f;
  --bg-3: #1c1916;
  --line: #2a2622;
  --text: #f3ede4;
  --muted: #a39a8e;
  --dim: #6f675d;
  --amber: #f4b26a;
  --amber-2: #ffcf94;
  --ivory: #f5eee2;
  --danger: #ff7b6b;
  --ok: #8fd19e;
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --head: 64px; /* header height: the 3D story pins just below it */
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 "Outfit", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
p { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: 11px; color: var(--amber); font-weight: 500; }
.lede { color: var(--muted); font-size: 17px; font-weight: 300; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border-radius: 999px; border: 0;
  font-size: 16px; font-weight: 500; text-decoration: none; letter-spacing: .01em;
  transition: transform .25s var(--ease), background .25s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--amber); color: #1d1206; box-shadow: 0 10px 40px -10px rgba(244, 178, 106, .55); }
.btn-primary:hover { background: var(--amber-2); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-block { width: 100%; }

/* ---------- announcement + header ---------- */
.announce {
  position: relative; z-index: 41; text-align: center; font-size: 12px; letter-spacing: .04em;
  padding: 8px 16px; background: #1a140c; color: var(--amber-2);
}
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: 64px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 10px;
  transition: background .4s, backdrop-filter .4s, transform .4s var(--ease);
}
.top.solid { background: rgba(11, 10, 9, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.has-announce .top { top: 33px; }
.has-announce .top.solid { top: 0; }
.brand { flex: none; display: block; }
.brand img { height: 40px; width: auto; max-width: none; }
.bag-btn {
  position: relative; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.06); display: grid; place-items: center;
}
.bag-count {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--amber); color: #1d1206; font-size: 11px; font-weight: 600; display: grid; place-items: center;
}
.bag-count.pop { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.45); } }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; display: flex; align-items: flex-end; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,10,9,.55) 0%, rgba(11,10,9,0) 22%, rgba(11,10,9,.1) 38%, rgba(11,10,9,.82) 62%, var(--bg) 100%); }
.hero-copy { position: relative; padding: 0 22px calc(88px + var(--safe-b)); width: 100%; }
.hero h1 { font-size: clamp(54px, 15vw, 120px); font-weight: 300; margin: 14px 0 14px; }
.hero .lede { max-width: 30ch; }
.hero-cta { margin-top: 26px; }
.scroll-hint { position: absolute; left: 50%; bottom: calc(24px + var(--safe-b)); width: 24px; height: 38px; margin-left: -12px; border: 1.5px solid rgba(255,255,255,.35); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--amber); animation: hint 1.8s infinite; }
@keyframes hint { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- 3D assembly ---------- */
.assemble { position: relative; height: 560vh; }
.assemble-stage { position: sticky; top: var(--head); height: calc(100svh - var(--head)); overflow: hidden; background: radial-gradient(120% 70% at 50% 40%, #171411 0%, var(--bg) 70%); }
#lampCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.assemble-glow {
  position: absolute; left: 50%; top: 42%; width: 140vmin; height: 140vmin; margin: -70vmin 0 0 -70vmin; z-index: 0;
  background: radial-gradient(circle, rgba(255,170,90,.38) 0%, rgba(255,140,60,.12) 30%, rgba(0,0,0,0) 62%);
  opacity: 0; pointer-events: none; transition: opacity .2s linear;
}
.assemble-loading { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; transition: opacity .6s; }
.assemble-loading span { width: 36px; height: 36px; border: 2px solid var(--line); border-top-color: var(--amber); border-radius: 50%; animation: spin 1s linear infinite; }
.assemble-loading.done { opacity: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.assemble-progress { position: absolute; left: 22px; right: 22px; top: 6px; height: 2px; background: rgba(255,255,255,.08); border-radius: 2px; z-index: 3; overflow: hidden; }
.assemble-progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--amber), var(--amber-2)); }

.steps { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 42%; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,10,9,0) 0%, rgba(11,10,9,.8) 45%, var(--bg) 100%); }
.step {
  position: absolute; left: 22px; right: 22px; bottom: calc(34px + var(--safe-b));
  opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.step.on { opacity: 1; transform: none; }
.step-num { font-size: 12px; letter-spacing: .2em; color: var(--amber); font-weight: 500; }
.step-num b { font-weight: 500; font-variant-numeric: tabular-nums; }
.step h2 { font-size: clamp(32px, 9vw, 60px); font-weight: 300; margin: 10px 0 10px; }
.step p { color: var(--muted); font-weight: 300; max-width: 34ch; }

/* ---------- mood rail ---------- */
.mood { padding: 96px 0 40px; }
.mood-head { padding: 0 22px; }
.mood h2 { font-size: clamp(40px, 11vw, 80px); font-weight: 300; margin: 14px 0 16px; }
.mood-rail {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 34px 22px 8px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.mood-rail::-webkit-scrollbar { display: none; }
.mood-rail figure { margin: 0; flex: 0 0 78%; scroll-snap-align: center; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-2); }
.mood-rail img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.mood-rail figcaption { position: absolute; left: 14px; bottom: 12px; font-size: 13px; padding: 6px 12px; border-radius: 999px; background: rgba(11,10,9,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* ---------- features ---------- */
.features { display: grid; gap: 1px; margin: 60px 22px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--bg); padding: 26px 22px; display: flex; align-items: baseline; gap: 18px; }
.feature span { font-size: 34px; font-weight: 300; color: var(--amber-2); min-width: 120px; letter-spacing: -0.02em; white-space: nowrap; flex: none; }
.feature small { font-size: 16px; margin-left: 2px; color: var(--muted); }
.feature p { color: var(--muted); font-weight: 300; }

/* ---------- product ---------- */
.shop { padding: 40px 0 30px; scroll-margin-top: 50px; }
.skeleton { height: 520px; margin: 0 22px; border-radius: var(--radius); background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.product { display: grid; gap: 26px; }
.gallery { position: relative; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 10px; padding: 0 22px; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: 0 0 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); scroll-snap-align: center; background: var(--bg-2); }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .3s var(--ease), background .3s; }
.dots i.on { width: 20px; background: var(--amber); }
.pinfo { padding: 0 22px; }
.pinfo h2 { font-size: 44px; font-weight: 300; }
.pinfo .tagline { color: var(--muted); margin-top: 8px; font-weight: 300; }
.price-row { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 4px; }
.price { font-size: 30px; font-weight: 400; }
.compare { color: var(--dim); text-decoration: line-through; font-size: 18px; }
.save { font-size: 12px; color: #1d1206; background: var(--amber); padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.cod-note { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.cod-note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.label { font-size: 13px; color: var(--muted); margin: 26px 0 12px; display: flex; justify-content: space-between; }
.label b { color: var(--text); font-weight: 500; }
.swatches { display: flex; gap: 14px; }
.swatch {
  width: 52px; height: 52px; border-radius: 50%; border: 0; padding: 0; position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.swatch::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid transparent; transition: border-color .25s; }
.swatch.on::after { border-color: var(--amber); }
.swatch.out { opacity: .35; }
.swatch.out::before { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1.5px; background: var(--muted); transform: rotate(45deg); }
.stock-note { font-size: 13px; color: var(--amber); margin-top: 12px; min-height: 20px; }
.qty-row { display: flex; gap: 12px; margin-top: 18px; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; height: 54px; }
.qty button { width: 46px; height: 100%; border: 0; background: none; font-size: 22px; color: var(--muted); }
.qty span { width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.qty-row .btn { flex: 1; }
.desc { color: var(--muted); font-weight: 300; margin-top: 30px; white-space: pre-line; }
.specs { margin-top: 26px; border-top: 1px solid var(--line); }
.specs div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 26px; }
.perks div { background: var(--bg-2); border-radius: 14px; padding: 14px 10px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.3; }
.perks svg { display: block; margin: 0 auto 8px; color: var(--amber); }
.closed-banner { background: #2a1a12; color: var(--amber-2); padding: 12px 16px; border-radius: 12px; margin-top: 18px; font-size: 14px; }

.more-products { padding: 70px 22px 0; }
.more-products h3 { font-size: 30px; font-weight: 300; margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { background: var(--bg-2); border-radius: var(--radius); overflow: hidden; border: 0; padding: 0; text-align: left; }
.card img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.card div { padding: 12px 14px 14px; }
.card b { display: block; font-weight: 400; }
.card span { color: var(--muted); font-size: 14px; }

/* ---------- faq + footer ---------- */
.faq { padding: 70px 22px 40px; }
.faq h2 { font-size: 40px; font-weight: 300; margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; padding: 20px 34px 20px 0; position: relative; font-size: 17px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 24px; font-weight: 300; color: var(--amber); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 22px; font-weight: 300; }
.foot { padding: 40px 22px calc(120px + var(--safe-b)); text-align: center; border-top: 1px solid var(--line); }
.foot-logo { width: 150px; height: auto; margin: 0 auto 6px; }
.foot-links { display: flex; justify-content: center; gap: 12px; margin: 10px 0 18px; }
.foot-links a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; }
.fine { color: var(--dim); font-size: 12px; }

/* ---------- sticky buy bar ---------- */
.buybar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 999px;
  background: rgba(28, 25, 22, .82); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255,255,255,.06);
  transform: translateY(140%); transition: transform .5s var(--ease);
}
.buybar.show { transform: none; }
.buybar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.buybar-info b { font-weight: 500; font-size: 15px; }
.buybar-info span { color: var(--muted); font-size: 13px; }
.buybar .btn { min-height: 46px; padding: 0 22px; }

/* ---------- sheet (bag + checkout) ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .35s; }
.scrim.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 92svh; display: flex; flex-direction: column;
  background: var(--bg-2); border-radius: 24px 24px 0 0; transform: translateY(105%); transition: transform .5s var(--ease);
  box-shadow: 0 -20px 60px rgba(0,0,0,.5);
}
.sheet.show { transform: none; }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 22px; }
.sheet-head h3 { flex: 1; font-size: 22px; font-weight: 400; }
.icon-btn { width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.05); display: grid; place-items: center; }
.sheet-body { overflow-y: auto; padding: 6px 22px calc(22px + var(--safe-b)); overscroll-behavior: contain; }

.line { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line img { width: 72px; height: 88px; object-fit: cover; border-radius: 12px; background: var(--bg-3); }
.line-main { flex: 1; min-width: 0; }
.line-main b { font-weight: 400; display: block; }
.line-main span { color: var(--muted); font-size: 14px; }
.line-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.line .qty { height: 38px; }
.line .qty button { width: 36px; font-size: 18px; }
.line-remove { border: 0; background: none; color: var(--dim); font-size: 13px; text-decoration: underline; padding: 6px 0; }
.empty { text-align: center; padding: 40px 0 30px; color: var(--muted); }
.empty .btn { margin-top: 18px; }

.totals { padding: 16px 0 6px; }
.totals div { display: flex; justify-content: space-between; padding: 5px 0; color: var(--muted); font-size: 15px; }
.totals .grand { color: var(--text); font-size: 19px; padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--line); }
.totals .disc { color: var(--ok); }

.form { display: grid; gap: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px 2px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  border-radius: 14px; padding: 15px 14px; font: inherit; font-size: 16px; outline: none; transition: border-color .2s;
  -webkit-appearance: none; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field textarea { resize: none; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--amber); }
.field.err input, .field.err select { border-color: var(--danger); }
.field .msg { color: var(--danger); font-size: 13px; margin: 6px 0 0 2px; }
.phone-wrap { display: flex; gap: 8px; }
.phone-wrap span { display: grid; place-items: center; padding: 0 14px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 14px; color: var(--muted); }
.promo-row { display: flex; gap: 8px; }
.promo-row input { flex: 1; text-transform: uppercase; }
.promo-row button { padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: none; }
.promo-msg { font-size: 13px; margin-top: 6px; }
.promo-msg.ok { color: var(--ok); } .promo-msg.bad { color: var(--danger); }
.pay-card { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--amber); border-radius: 14px; background: rgba(244,178,106,.06); }
.pay-card svg { color: var(--amber); flex: none; }
.pay-card b { font-weight: 500; display: block; }
.pay-card span { color: var(--muted); font-size: 13px; }
.hp { position: absolute; left: -9999px; }
.form-error { color: var(--danger); font-size: 14px; text-align: center; }

.success { text-align: center; padding: 18px 0 10px; }
.success-ring { width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(244,178,106,.35), rgba(244,178,106,0) 70%); }
.success-ring svg { color: var(--amber); }
.success-ring path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .7s .2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h4 { font-size: 28px; font-weight: 300; margin: 0 0 8px; }
.success p { color: var(--muted); }
.order-code { display: inline-block; margin: 18px 0; padding: 10px 18px; border-radius: 12px; background: var(--bg-3); font-size: 20px; letter-spacing: .1em; }
.success .btn { margin-top: 10px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); z-index: 60; transform: translate(-50%, -150%);
  background: var(--ivory); color: #1d1206; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: transform .45s var(--ease); white-space: nowrap; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal:nth-child(2) { transition-delay: .1s; }
.hero .reveal:nth-child(3) { transition-delay: .2s; }
.hero .reveal:nth-child(4) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- larger screens ---------- */
@media (min-width: 760px) {
  :root { --head: 76px; }
  .top { padding: 0 28px 0 22px; height: 76px; }
  .brand img { height: 48px; }
  .hero-copy { padding: 0 6vw 110px; }
  .mood-head, .faq { max-width: 1100px; margin: 0 auto; }
  .mood-rail { padding-left: max(22px, calc(50vw - 550px)); padding-right: max(22px, calc(50vw - 550px)); }
  .mood-rail figure { flex-basis: 38%; }
  .features { grid-template-columns: repeat(3, 1fr); max-width: 1100px; margin: 80px auto; }
  .feature { flex-direction: column; gap: 8px; }
  .step { left: 6vw; right: auto; max-width: 460px; bottom: 60px; }
  .steps { height: 50%; background: linear-gradient(180deg, rgba(11,10,9,0), rgba(11,10,9,.6) 70%); }
  .product { grid-template-columns: 1.1fr 1fr; max-width: 1100px; margin: 0 auto; align-items: start; padding: 0 22px; }
  .gallery-track { padding: 0; }
  .pinfo { padding: 0; position: sticky; top: 100px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .more-products { max-width: 1100px; margin: 0 auto; }
  .sheet { left: auto; right: 16px; bottom: 16px; top: 16px; width: 440px; max-height: none; border-radius: 24px; transform: translateX(110%); }
  .sheet-grip { display: none; }
  .buybar { left: auto; right: 24px; width: 380px; }
}
