/* ============================================================
   AMBRÉ — luxury fragrance STORE. Deep espresso + warm amber,
   Cormorant + Jost, glossy 3D "perfume drop" + a working cart.
   Robust: if WebGL/Three fail, the espresso gradient + content
   remain; the cart is pure DOM and always works.
   ============================================================ */
:root {
  --bg: #120c08;
  --bg-2: #1c130b;
  --ink: #f3e9dc;
  --ink-soft: #a18d77;
  --amber: #d99a4e;
  --amber-deep: #b06d27;
  --line: rgba(217, 154, 78, 0.22);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  background: radial-gradient(125% 115% at 72% 6%, #25180d 0%, var(--bg) 55%);
  color: var(--ink); font-family: var(--sans); font-weight: 300; line-height: 1.6; overflow-x: hidden;
}
body.ready, body.ready * { cursor: none; }
@media (hover: none) { body.ready, body.ready * { cursor: auto; } .cursor { display: none; } }
em { font-style: italic; color: var(--amber); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; }
.cursor { position: fixed; top: 0; left: 0; z-index: 90; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid var(--amber); border-radius: 50%; pointer-events: none; transition: width .35s var(--ease), height .35s var(--ease), background .35s, border-color .35s; }
.cursor.hov { width: 62px; height: 62px; margin: -31px 0 0 -31px; background: rgba(217,154,78,0.14); border-color: transparent; }

#preloader { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; }
.pre-word { font-family: var(--serif); font-size: clamp(2rem, 8vw, 3.6rem); letter-spacing: 0.34em; color: var(--amber); padding-left: 0.34em; }

.nav, main, .foot { position: relative; z-index: 3; }
.nav { display: flex; justify-content: space-between; align-items: center; padding: 24px clamp(22px, 6vw, 84px); position: fixed; top: 0; left: 0; width: 100%; z-index: 40; }
.brand { font-family: var(--serif); font-size: 1.7rem; letter-spacing: 0.28em; padding-left: 0.28em; }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); }
.nav-links a { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); transition: color .3s; }
.nav-links a:hover { color: var(--amber); }
.cart-btn { border: 1px solid var(--line); border-radius: 100px; padding: 10px 20px; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; transition: background .35s, color .35s; }
.cart-btn:hover { background: var(--amber); color: var(--bg); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 100px; background: var(--amber); color: var(--bg); font-weight: 600; font-size: 0.74rem; }
.cart-btn:hover .count { background: var(--bg); color: var(--amber); }

.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: clamp(96px,13vh,140px) clamp(22px, 6vw, 84px) 48px; max-width: 1000px; }
.eyebrow { font-size: 0.76rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--amber); margin-bottom: 28px; }
.title { font-family: var(--serif); font-weight: 400; font-size: clamp(3.4rem, 14vw, 11rem); line-height: 0.92; }
.ln { display: block; overflow: hidden; } .ln > span { display: block; }
.sub { margin-top: clamp(26px, 4vw, 42px); max-width: 50ch; color: var(--ink-soft); font-size: clamp(1.02rem, 1.4vw, 1.2rem); }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: clamp(32px, 4vw, 46px); }

.btn { display: inline-block; font-family: var(--sans); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; padding: 16px 34px; border-radius: 100px; transition: transform .4s var(--ease), background .4s, color .4s, border-color .4s; }
.btn-fill { background: var(--amber); color: var(--bg); }
.btn-fill:hover { background: var(--ink); }
.btn-line { border: 1px solid var(--line); color: var(--amber); }
.btn-line:hover { border-color: var(--amber); }
.btn.big { width: 100%; text-align: center; padding: 17px; }

.cue { display: inline-flex; align-items: center; gap: 12px; margin-top: 52px; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); }
.cue i { width: 50px; height: 1px; background: var(--amber); transform-origin: left; animation: cue 2.6s var(--ease) infinite; }
@keyframes cue { 0%,100%{transform:scaleX(.3);opacity:.5} 50%{transform:scaleX(1);opacity:1} }

.sec-tag { font-family: var(--serif); font-size: 0.92rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--amber); margin-bottom: 24px; }
.sec-head { margin-bottom: clamp(40px, 6vw, 64px); }
.sec-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.04; }

.shop { padding: clamp(80px, 12vw, 150px) clamp(22px, 6vw, 84px); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.prod { background: linear-gradient(180deg, rgba(28,19,11,0.8), rgba(18,12,8,0.8)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .5s var(--ease), border-color .5s; }
.prod:hover { transform: translateY(-6px); border-color: var(--amber); }
.bottle { height: 230px; position: relative; display: grid; place-items: center; overflow: hidden; }
.bottle span { font-family: var(--serif); font-size: 1rem; color: rgba(243,233,220,0.5); position: absolute; top: 14px; left: 16px; }
.bottle::before { content: ""; width: 86px; height: 150px; border-radius: 16px 16px 22px 22px; background: linear-gradient(160deg, rgba(255,225,170,0.85), var(--amber) 45%, var(--amber-deep)); box-shadow: 0 18px 50px rgba(217,154,78,0.3), inset 0 0 30px rgba(255,240,210,0.4); position: relative; }
.bottle::after { content: ""; position: absolute; width: 30px; height: 22px; background: #2a1a0d; border-radius: 4px; transform: translateY(-86px); }
.b1::before { filter: hue-rotate(-12deg) brightness(0.92); } .b2::before { filter: brightness(1.08); }
.b3::before { filter: hue-rotate(40deg) saturate(0.7) brightness(0.95); } .b4::before { filter: hue-rotate(-30deg) saturate(1.2); }
.pb { padding: 24px 24px 26px; display: flex; flex-direction: column; flex-grow: 1; border-top: 1px solid var(--line); }
.pb h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; }
.pb p { color: var(--ink-soft); font-size: 0.9rem; margin: 8px 0 18px; flex-grow: 1; }
.row { display: flex; align-items: center; justify-content: space-between; }
.price { font-family: var(--serif); font-size: 1.4rem; color: var(--amber); }
.add { border: 1px solid var(--line); border-radius: 100px; padding: 9px 20px; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; transition: background .3s, color .3s; }
.add:hover, .add.added { background: var(--amber); color: var(--bg); border-color: transparent; }

.house { padding: clamp(70px, 11vw, 150px) clamp(22px, 6vw, 84px); max-width: 1040px; border-top: 1px solid var(--line); }
.stmt { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 4.4vw, 3.6rem); line-height: 1.24; }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 36px clamp(22px, 6vw, 84px); border-top: 1px solid var(--line); }
.foot-brand { font-family: var(--serif); font-size: 1.2rem; letter-spacing: 0.28em; padding-left: 0.28em; color: var(--amber); }
.foot-note { font-size: 0.74rem; color: var(--ink-soft); align-self: center; }

/* cart drawer */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.6); opacity: 0; pointer-events: none; transition: opacity .4s; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; z-index: 70; width: min(400px, 90vw); height: 100%; background: var(--bg-2); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .45s var(--ease); display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-top { display: flex; justify-content: space-between; align-items: center; padding: 26px 26px 18px; border-bottom: 1px solid var(--line); }
.drawer-top h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; }
.x { font-size: 1.1rem; color: var(--ink-soft); }
.items { flex-grow: 1; overflow-y: auto; padding: 18px 26px; }
.empty { color: var(--ink-soft); font-size: 0.92rem; }
.ci { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ci .nm { font-family: var(--serif); font-size: 1.15rem; }
.ci .meta { color: var(--ink-soft); font-size: 0.82rem; margin-top: 2px; }
.ci .qty { display: flex; align-items: center; gap: 10px; }
.ci .qty button { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; color: var(--amber); }
.ci .rm { color: var(--ink-soft); font-size: 0.74rem; text-decoration: underline; }
.drawer-foot { padding: 22px 26px 26px; border-top: 1px solid var(--line); }
.tot { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; font-family: var(--serif); font-size: 1.4rem; }
.checkout { cursor: pointer; }
.note { text-align: center; color: var(--ink-soft); font-size: 0.72rem; margin-top: 12px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto; } }
