/* PHIAL. Colours come from config.palette via the custom properties on :root. */
:root {
  --bg: #0e0a0d; --ink: #f2eadb; --muted: #a89a8c; --line: rgba(242, 234, 219, 0.14); --gold: #d9b26f;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
}
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
::selection { background: var(--gold); color: var(--bg); }
em { font-style: italic; color: var(--gold); font-weight: 400; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 0.95; margin: 0; }
.kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }

/* Canvas and grain sit behind the whole page. */
.gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.grain { position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -3%); } 100% { transform: translate(0, 0); } }
main, .foot { position: relative; z-index: 2; }

/* Navigation */
.nav { position: fixed; z-index: 10; inset: 0 0 auto; display: flex; align-items: center; gap: 32px; padding: 22px var(--pad); transition: background 0.4s, padding 0.4s, backdrop-filter 0.4s; }
.nav.is-solid { background: rgba(14, 10, 13, 0.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding-block: 14px; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-size: 26px; letter-spacing: 0.32em; text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.brand span { font-family: var(--sans); font-size: 9px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.nav nav { display: flex; gap: 30px; margin-left: auto; }
.nav nav a { font-size: 13px; text-decoration: none; color: var(--muted); transition: color 0.3s; }
.nav nav a:hover { color: var(--ink); }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 24px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none; background: rgba(255, 255, 255, 0.02); transition: background 0.3s, border-color 0.3s, transform 0.3s; }
.pill:hover { border-color: var(--gold); transform: translateY(-1px); }
.pill.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill.solid:hover { background: var(--gold); border-color: var(--gold); }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px var(--pad) 80px; max-width: min(900px, 56vw); }
.hero h1 { font-size: clamp(56px, 8.6vw, 150px); }
.sub { max-width: 430px; margin: 30px 0 38px; color: var(--muted); font-size: 17px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.scroll-cue { position: absolute; left: var(--pad); bottom: 34px; display: flex; align-items: center; gap: 14px; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.scroll-cue span { width: 1px; height: 46px; background: linear-gradient(var(--gold), transparent); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Notes: pinned while the bottle changes colour */
.notes .sticky { display: grid; align-items: center; }
.note { position: absolute; right: var(--pad); width: min(440px, 40vw); top: 50%; margin-top: -120px; visibility: hidden; }
.note h2 { font-size: clamp(44px, 5vw, 76px); margin-bottom: 22px; }
.note h2::after { content: ""; display: block; width: 48px; height: 2px; margin-top: 26px; background: var(--c); box-shadow: 0 0 22px var(--c); }
.note p:last-child { color: var(--muted); font-size: 17px; margin: 0; }
.notes-rail { position: absolute; left: var(--pad); top: 50%; transform: translateY(-50%); display: grid; gap: 16px; }
.notes-rail i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--muted); transition: background 0.4s, transform 0.4s; }
.notes-rail i.on { background: var(--gold); border-color: var(--gold); transform: scale(1.4); }

/* The house */
.house { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: end; padding: 180px var(--pad) 140px; border-top: 1px solid var(--line); background: var(--bg); }
.house h2 { font-size: clamp(48px, 6vw, 96px); margin-bottom: 30px; }
.house-copy > p:last-child { color: var(--muted); max-width: 520px; font-size: 17px; }
.stats { display: grid; gap: 0; margin: 0; }
.stats div { display: flex; justify-content: space-between; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); }
.stats dt { font-family: var(--serif); font-size: clamp(44px, 4.6vw, 70px); line-height: 1; }
.stats dd { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 0.06em; text-align: right; max-width: 160px; }

/* Collection */
.collection { padding: 120px var(--pad) 160px; background: var(--bg); }
.collection h2 { font-size: clamp(48px, 6vw, 96px); margin-bottom: 70px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; perspective: 1200px; }
.card { position: relative; padding: 38px 32px 30px; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.4s, opacity 0.9s; transform-style: preserve-3d;
  background: radial-gradient(120% 80% at var(--mx, 50%) var(--my, 20%), color-mix(in srgb, var(--c) 22%, transparent), transparent 60%), rgba(255, 255, 255, 0.015); }
.js .card[data-reveal].in { transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); }
.card:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.card h3 { font-size: 40px; margin-top: 34px; }
.card p { color: var(--muted); font-size: 13px; letter-spacing: 0.08em; margin: 10px 0 34px; }
.card .row { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.card strong { color: var(--ink); font-size: 16px; font-weight: 600; }
/* A small flacon drawn in CSS, in each scent's colour. */
.flacon { height: 230px; display: grid; justify-items: center; align-content: end; transform: translateZ(40px); }
.flacon .cap { width: 46px; height: 52px; border-radius: 6px 6px 3px 3px; background: linear-gradient(90deg, #8a6a33, #f0d39a 35%, #b68b45 60%, #f6dfaa 80%, #8a6a33); }
.flacon .neck { width: 30px; height: 10px; background: linear-gradient(90deg, #a07a3e, #f3d9a2, #a07a3e); }
.flacon .body { position: relative; width: 132px; height: 150px; border-radius: 20px 20px 14px 14px; overflow: hidden;
  background: linear-gradient(100deg, rgba(255,255,255,0.22), rgba(255,255,255,0.04) 30%, rgba(255,255,255,0.02) 70%, rgba(255,255,255,0.18)); border: 1px solid rgba(255,255,255,0.28); box-shadow: inset 0 0 30px rgba(255,255,255,0.08), 0 30px 50px rgba(0,0,0,0.45); }
.flacon .body b { position: absolute; inset: 34% 8px 8px; border-radius: 6px 6px 10px 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c) 40%, color-mix(in srgb, var(--c) 70%, #000)); box-shadow: 0 0 40px var(--c); opacity: 0.92; }
.flacon .body::after { content: ""; position: absolute; left: 14%; top: 8px; bottom: 8px; width: 10px; border-radius: 6px; background: linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0)); }

/* Ritual: horizontal track while pinned */
.ritual { background: var(--bg); border-top: 1px solid var(--line); }
.ritual .sticky { display: flex; flex-direction: column; justify-content: center; gap: 60px; }
.ritual-head { padding: 0 var(--pad); }
.ritual-head h2 { font-size: clamp(48px, 6vw, 96px); }
.ritual-track { display: flex; gap: 22px; padding: 0 var(--pad); width: max-content; will-change: transform; }
.step { width: clamp(280px, 30vw, 420px); padding: 34px; border-radius: 26px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.step span { font-family: var(--serif); font-size: 64px; color: var(--gold); line-height: 1; }
.step h3 { font-size: 34px; margin: 26px 0 12px; }
.step p { color: var(--muted); margin: 0; }
.ritual-bar { margin: 0 var(--pad); height: 1px; background: var(--line); }
.ritual-bar i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }

/* Closing */
.closing { padding: 180px var(--pad); text-align: center; background: radial-gradient(60% 60% at 50% 100%, rgba(217, 178, 111, 0.14), transparent 70%), var(--bg); }
.closing h2 { font-size: clamp(56px, 8vw, 130px); }
.closing > p { color: var(--muted); margin: 26px 0 40px; }
.signup { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; max-width: 560px; margin: 0 auto; }
.signup input { flex: 1 1 260px; height: 46px; padding: 0 22px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--ink); font: inherit; font-size: 14px; }
.signup input:focus { outline: none; border-color: var(--gold); }
.thanks { flex-basis: 100%; color: var(--gold); margin: 14px 0 0; }

.foot { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; padding: 40px var(--pad); border-top: 1px solid var(--line); background: var(--bg); font-size: 13px; color: var(--muted); }
.foot nav { display: flex; gap: 22px; }
.foot nav a { text-decoration: none; }
.foot small { margin-left: auto; }

@media (max-width: 820px) {
  .nav nav { display: none; }
  .nav .pill { margin-left: auto; }
  .hero { justify-content: flex-end; padding-bottom: 110px; max-width: none; }
  .hero h1 { font-size: clamp(56px, 16vw, 90px); }
  .note { left: var(--pad); right: var(--pad); width: auto; top: auto; bottom: 9vh; margin: 0; }
  .note h2 { font-size: 40px; }
  .notes-rail { display: none; }
  .house { grid-template-columns: 1fr; gap: 40px; padding-block: 120px 90px; }
  .cards { grid-template-columns: 1fr; }
  .foot small { margin-left: 0; }
}
