/* ABYSSAL v5 — editorial luxury: Instrument Serif display + Inter, champagne-gold accent, glass buttons */
:root {
  --bg: #02121a;
  --fg: #f3efe6;            /* warm ivory */
  --soft: rgba(243, 239, 230, 0.72);
  --dim: rgba(243, 239, 230, 0.48);
  --line: rgba(243, 239, 230, 0.14);
  --gold: #d8b77a;          /* matches the mask's gold lenses */
  --gold-2: #f1dcae;
  --glass: rgba(255, 255, 255, 0.07);
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: #08131a; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }

/* film grain — gives the whole page a printed, photographic finish */
.grain { position: fixed; inset: -50%; z-index: 3; 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='220' height='220'%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)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

/* type helpers */
.label { font: 500 10.5px/1.4 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim); }
.eyebrow { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 30px; color: var(--soft); }
.eyebrow::before { content: ''; width: 36px; height: 1px; background: var(--gold); }
.lead { font: 300 15.5px/1.7 var(--sans); color: var(--soft); max-width: 36ch; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.025em; line-height: 0.9; }
h1 em, h2 em { font-style: italic; color: var(--gold-2);
  background: linear-gradient(100deg, #f6e7c4 0%, #d8b77a 45%, #a9824a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding-right: 0.06em; }
h1 { font-size: clamp(76px, 10.5vw, 176px); margin-bottom: 30px; }
h2 { font-size: clamp(52px, 6.6vw, 112px); margin-bottom: 28px; }

/* nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 26px 48px; background: linear-gradient(to bottom, rgba(2,14,20,0.75), rgba(2,14,20,0)); }
.logo { font: 400 28px/1 var(--serif); letter-spacing: 0.01em; }
.logo sup { font: 500 8px var(--sans); letter-spacing: 0.2em; color: var(--gold); margin-left: 4px; vertical-align: 14px; }
.nav nav { display: flex; gap: 38px; }
.nav nav a { position: relative; color: var(--soft); text-decoration: none; font: 400 13px var(--sans); letter-spacing: 0.02em; transition: color .3s; }
.nav nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav nav a:hover { color: var(--fg); }
.nav nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.bag { justify-self: end; display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 18px; border-radius: 999px; cursor: pointer;
  color: var(--fg); font: 400 13px var(--sans); background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); transition: border-color .3s, background .3s; }
.bag i { font-style: normal; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--fg); color: #06141b; font-size: 10.5px; font-weight: 600; }
.bag:hover { border-color: rgba(216,183,122,0.55); background: rgba(255,255,255,0.1); }

/* buttons */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 18px; text-decoration: none; cursor: pointer;
  padding: 7px 7px 7px 28px; border-radius: 999px; color: var(--fg); font: 500 14px var(--sans); letter-spacing: 0.01em;
  background: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.04));
  border: 1px solid rgba(243,239,230,0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 18px 40px -18px rgba(0,0,0,0.7);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  transition: border-color .5s var(--ease), transform .5s var(--ease); }
.btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(241,220,174,0.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 1s var(--ease); }
.btn:hover::before { transform: translateX(120%); }
.btn:hover { border-color: rgba(216,183,122,0.7); transform: translateY(-1px); }
.btn .ic { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: var(--fg); color: #06141b; transition: background .5s var(--ease); }
.btn .ic svg { width: 15px; height: 15px; transition: transform .6s var(--ease); }
.btn:hover .ic { background: var(--gold); }
.btn:hover .ic svg { transform: translateX(3px); }
.btn.solid { background: linear-gradient(180deg, #fbf6ea, #e9e1cf); color: #06141b; border-color: transparent; box-shadow: 0 20px 44px -20px rgba(216,183,122,0.6); }
.btn.solid .ic { background: #06141b; color: var(--fg); }
.btn.solid:hover .ic { background: var(--gold); color: #06141b; }
.textlink { display: inline-flex; align-items: center; gap: 12px; color: var(--soft); font: 400 13px var(--sans); }
.textlink .line { position: relative; width: 1px; height: 34px; background: var(--line); overflow: hidden; }
.textlink .line::after { content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

/* depth meter */
.depth { position: fixed; right: 48px; top: 50%; transform: translateY(-50%); z-index: 10; text-align: right; }
.depth .num { font: 400 64px/1 var(--serif); letter-spacing: -0.03em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.depth .num small { font: italic 400 26px var(--serif); color: var(--gold); margin-left: 4px; }
.depth .ticks { margin: 16px 0 0 auto; width: 40px; height: 160px; position: relative;
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 16px);
  -webkit-mask: linear-gradient(to left, #000 40%, transparent); mask: linear-gradient(to left, #000 40%, transparent); }
.depth .ticks i { position: absolute; right: 0; width: 40px; height: 1px; background: var(--gold); top: 0; box-shadow: 0 0 10px var(--gold); }

/* hud */
.hud.gone { opacity: 0; }
.hud { transition: opacity .5s; position: fixed; left: 48px; bottom: 32px; z-index: 10; display: flex; align-items: center; gap: 18px; }
.hud #hud-section { font: italic 400 17px var(--serif); color: var(--fg); min-width: 110px; }
.hud #hud-section b { font: 500 10px var(--sans); font-style: normal; letter-spacing: 0.2em; color: var(--gold); margin-right: 10px; vertical-align: 2px; }
.hud .bar { width: 160px; height: 1px; background: var(--line); position: relative; }
.hud .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.hud #hud-pct { font: 500 10.5px var(--sans); letter-spacing: 0.18em; color: var(--dim); font-variant-numeric: tabular-nums; }

/* scrim behind text */
.scrim { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(1,10,15,0.7) 0%, rgba(1,10,15,0.38) 32%, rgba(1,10,15,0) 55%); transition: transform 0.9s var(--ease); }
.scrim.flip { transform: scaleX(-1); }

/* sections */
main { position: relative; z-index: 4; pointer-events: none; }
main a, main button { pointer-events: auto; }
.panel { min-height: 100vh; display: flex; align-items: center; padding: 130px 48px; position: relative; }
.copy { max-width: 470px; }

.hero { flex-direction: column; align-items: flex-start; justify-content: flex-end; padding-bottom: 120px; }
.cta-row { display: flex; align-items: center; gap: 34px; margin-top: 40px; }

/* optics specs */
.specs { list-style: none; margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.specs li { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.specs li:nth-child(odd) { padding-right: 24px; border-right: 1px solid var(--line); }
.specs li:nth-child(even) { padding-left: 24px; }
.specs b { display: block; margin-bottom: 8px; }
.specs span { font: 400 26px/1.1 var(--serif); letter-spacing: -0.01em; }
.specs span small { font: 300 12.5px var(--sans); color: var(--dim); display: block; margin-top: 6px; letter-spacing: 0; }

/* anatomy */
.tech { justify-content: space-between; }
.layers { list-style: none; margin-top: 38px; max-width: 360px; }
.layers li { display: flex; align-items: baseline; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); font: 300 15px var(--sans); color: var(--soft); transition: color .4s, padding .5s var(--ease); }
.layers li:first-child { border-top: 1px solid var(--line); }
.layers li b { font: italic 400 20px var(--serif); color: var(--gold); min-width: 26px; }
.layers li:hover { color: var(--fg); padding-left: 8px; }

/* colours */
.collection { justify-content: flex-end; }
.collection .copy { margin-right: 140px; }
.swatches { display: flex; gap: 16px; margin: 34px 0 34px; }
.sw { position: relative; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; border: 0;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.75) 0, var(--c) 34%, color-mix(in srgb, var(--c) 55%, #000) 100%);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.35), 0 6px 14px -6px rgba(0,0,0,0.8); transition: transform .5s var(--ease); }
.sw::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid transparent; transition: border-color .4s, inset .5s var(--ease); }
.sw:hover { transform: translateY(-2px); }
.sw.active::after { border-color: var(--gold); inset: -6px; }
.price-row { display: flex; justify-content: space-between; align-items: flex-end; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.cw { font: italic 400 34px/1 var(--serif); margin-top: 10px; letter-spacing: -0.01em; text-transform: capitalize; }
.price { font: 400 46px/1 var(--serif); letter-spacing: -0.02em; text-align: right; }
.price small { display: block; font: 300 11.5px var(--sans); color: var(--dim); margin-top: 8px; letter-spacing: 0.02em; }

.foot { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 34px 48px 90px; border-top: 1px solid var(--line); }
.foot .mark { font: 400 22px var(--serif); color: var(--fg); letter-spacing: 0; text-transform: none; }

/* reveal on scroll (only when JS is running) */
.js .rv { opacity: 0; transform: translateY(26px); filter: blur(6px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .in .rv, .js .rv.in { opacity: 1; transform: none; filter: none; }

@media (max-width: 760px), (max-aspect-ratio: 85/100) {
  .nav { padding: 18px 16px; grid-template-columns: 1fr auto; }
  .nav nav { display: none; }
  .logo { font-size: 24px; }
  .panel { padding: 110px 16px; align-items: flex-end; }
  .hero { align-items: flex-start; padding-bottom: 84px; }
  .hero h1 { font-size: 74px; margin-bottom: 20px; }
  .hero .eyebrow { margin-bottom: 18px; }
  .hero .cta-row { margin-top: 26px; }
  h1 { font-size: 84px; }
  h2 { font-size: 56px; }
  .lead { font-size: 14.5px; }
  .cta-row { flex-direction: column; align-items: flex-start; gap: 22px; }
  .tech, .collection { flex-direction: column; justify-content: flex-end; align-items: flex-start; }
  .layers { margin: 26px 0 0; min-width: 0; width: 100%; }
  .collection .copy { margin-right: 0; }
  .depth { right: 16px; top: 76px; transform: none; }
  .depth .num { font-size: 34px; }
  .depth .num small { font-size: 16px; }
  .depth .ticks, .depth .label { display: none; }
  .hud { left: 16px; bottom: 18px; }
  .hud .bar { width: 90px; }
  .scrim { background: linear-gradient(0deg, rgba(1,10,15,0.82) 0%, rgba(1,10,15,0.3) 55%, rgba(1,10,15,0) 72%); }
  .foot { flex-direction: column; align-items: flex-start; gap: 8px; padding: 26px 16px 80px; }
}
