/* AURENNE — Scarab Brooch landing page
   Desktop: everything lives on a 1440×900 stage (the Figma frame), scaled to fit the window.
   Mobile (< 900px wide or portrait): the stage is the viewport, layout is fluid. */

:root {
  --gold: #cca363;
  --gold-dim: #665232;
  --cream: #ebe0d1;
  --black: #000;
  --serif: "Bodoni 72 Oldstyle", "Bodoni 72", "Bodoni Moda", "Didot", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--black);
  color: var(--cream);
  overflow: hidden;              /* the story is step-based; there is no page scroll */
  overscroll-behavior: none;
}
body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
p, h1, h2, h3, ul { margin: 0; padding: 0; font-weight: 400; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--black);
  touch-action: none;
}

/* ---------- Stage (desktop) ---------- */
.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1440px;
  height: 900px;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  transform-origin: 50% 50%;
}

.frame-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 1440px;
  height: 898px;               /* the frames are 1732×1080 → 1440×898 */
  transform-origin: 0 0;
  background: url("../assets/img/poster.webp") 0 0 / 100% 100% no-repeat;
  will-change: transform;
}
.frame-layer canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.seq { opacity: 0; transition: opacity .6s var(--ease); }
.is-ready .seq { opacity: 1; }
.fx { pointer-events: none; }

.hits {
  position: absolute;
  left: 0;
  top: 0;
  width: 1440px;
  height: 898px;
  transform-origin: 0 0;
  pointer-events: none;
}
.hit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.at-4 .hit { pointer-events: auto; }
.hit:focus-visible { outline-offset: 0; }

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  left: 20px;
  top: 0;
  width: 1397px;
  height: 119px;
  z-index: 5;
}
.nav {
  position: absolute;
  top: 23px;
  height: 87px;
  display: flex;
  align-items: center;
  font: 500 13px/24px var(--sans);
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--cream);
}
.nav--left { left: 60px; gap: 48px; }
.nav--right { right: 60px; gap: 29px; }
.nav a { transition: color .3s var(--ease); }
.nav a:hover { color: var(--gold); }
.nav .icon img { width: auto; height: 24px; }
.logo {
  position: absolute;
  left: 50%;
  top: 0;
  width: 274px;
  height: 119px;
  transform: translateX(-50%);
}
.logo img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Steps ---------- */
.step {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  visibility: hidden;
}
.step.is-on { visibility: visible; }
.step.is-on a, .step.is-on button, .step.is-on .callout { pointer-events: auto; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 64px;
  line-height: 1.1;
  color: var(--gold);
  text-transform: uppercase;
}
.display--xl { font-size: 100px; }
.eyebrow {
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 5.04px;
  text-transform: uppercase;
  color: var(--cream);
}
.body {
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: .6px;
  color: var(--cream);
}
.body--narrow { width: 336px; }
.lede {
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: .72px;
}

.counter {
  position: absolute;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 4.32px;
  white-space: nowrap;
  color: var(--cream);
}
.counter span { color: var(--gold); }
.counter .rule {
  position: absolute;
  left: 93px;
  top: 7px;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold) 50%, var(--gold-dim));
}
.counter--bottom { left: 84px; top: 789px; }

.hint {
  position: absolute;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 5.04px;
  white-space: nowrap;
  color: var(--cream);
  transition: color .3s var(--ease);
}
.hint:hover { color: var(--gold); }
.vline {
  position: absolute;
  width: 1px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
}
.hint--center { left: 50%; top: 789px; transform: translateX(-50%); padding-left: 5.04px; }
.hint--center .vline { left: 50%; top: 33px; height: 60px; transform-origin: top; animation: drip 2.4s var(--ease) infinite; }
.hint--left { left: 115px; top: 789px; }
.hint--left .vline { left: -34px; top: -22px; height: 72px; background: var(--gold); opacity: .8; }
@keyframes drip {
  0% { transform: scaleY(0); opacity: 1; }
  55% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* 01 hero */
.hero-text {
  position: absolute;
  left: 720.5px;
  top: 554px;
  width: 445px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}
.hero-text .display--xl { height: 92px; }

/* 02 / 03 */
.counter--top { top: 206px; }
.step--b2 .counter--top { left: 84px; }
.step--b3 .counter--top { left: 921px; }
.col {
  position: absolute;
  top: 274px;
  width: 445px;
  display: flex;
  flex-direction: column;
  gap: 33px;
}
.step--b2 .col { left: 79px; }
.step--b3 .col { left: 914px; }
.step--b3 .display { width: 467px; }

/* 04 */
.b4-text {
  position: absolute;
  left: 50%;
  top: 554px;
  width: 760px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.btn {
  position: absolute;
  left: 50%;
  top: 782px;
  width: 276px;
  height: 51px;
  margin-left: -138px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font: 500 12px/1.2 var(--sans);
  letter-spacing: 4.32px;
  white-space: nowrap;
  overflow: hidden;
  transition: color .45s var(--ease), background-color .45s var(--ease);
}
.btn span { display: inline-block; margin-left: 2px; transition: transform .45s var(--ease); }
.btn:hover { background: var(--gold); color: var(--black); }
.btn:hover span { transform: translateX(4px); }

/* 04b callouts */
.step--callouts { z-index: 4; }
.leaders {
  position: absolute;
  inset: 0;
  width: 1440px;
  height: 900px;
  overflow: visible;
}
.leaders path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  stroke-opacity: .7;
  transition: stroke-opacity .4s var(--ease), stroke-width .4s var(--ease);
}
.leaders path.is-hot { stroke-opacity: 1; stroke-width: 1.6; filter: url(#leaderGlow); }
.leaders.has-hot path:not(.is-hot) { stroke-opacity: .25; }

.callout {
  position: absolute;
  width: 258px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: default;
  transition: opacity .4s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.callout:focus-visible { outline-offset: 8px; }
.callouts.has-hot .callout:not(.is-hot) { opacity: .4; }
.callout__k {
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 4.32px;
  color: var(--gold);
  white-space: nowrap;
}
.callout__t {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: .84px;
  color: var(--gold);
  transition: text-shadow .4s var(--ease);
}
.callout.is-hot .callout__t { text-shadow: 0 0 18px rgba(204, 163, 99, .55); }
.callout__d {
  width: 239px;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: .54px;
  color: var(--cream);
}
/* Figma positions (box left / top) */
.callout--emerald { left: 1137px; top: 119px; }
.callout--wing { left: 1144px; top: 370px; }
.callout--diamonds { left: 96px; top: 178px; }
.callout--gold { left: 204px; top: 424px; }

/* Progress dots */
.dots {
  position: absolute;
  left: 1098px;
  top: 792px;
  width: 262px;
  height: 10px;
  display: flex;
  align-items: center;
  z-index: 6;
}
.dots i {
  flex: 1;
  height: 1px;
  margin: 0 7px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold) 50%, var(--gold-dim));
}
.dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  transition: background-color .5s var(--ease), transform .5s var(--ease);
}
.dot::after { content: ""; position: absolute; inset: -10px; }   /* bigger hit area */
.dot.is-active { background: var(--gold); }
.dot:hover { transform: scale(1.25); }

/* ---------- Mobile ---------- */
.is-mobile .stage {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: none;
}
.is-mobile .frame-layer { background-image: url("../assets/img/poster-mobile.webp"); }
.is-mobile .site-header {
  left: 0;
  width: 100%;
  height: 72px;
  padding-top: env(safe-area-inset-top);
}
.is-mobile .nav--left { display: none; }
.is-mobile .nav--right { right: 18px; top: 14px; height: 44px; gap: 18px; }
.is-mobile .nav--right > a:first-child { display: none; }
.is-mobile .nav .icon img { height: 21px; }
.is-mobile .logo { top: 2px; width: 150px; height: 65px; }

.is-mobile .step { padding: 0 24px; }
.is-mobile .display { font-size: clamp(34px, 10.5vw, 46px); }
.is-mobile .display--xl { font-size: clamp(56px, 17vw, 76px); height: auto; }
.is-mobile .eyebrow { font-size: 11px; letter-spacing: 3.6px; }
.is-mobile .body { font-size: 16px; letter-spacing: .3px; }
.is-mobile .body--narrow { width: auto; max-width: 340px; }
.is-mobile .lede { font-size: 18px; }

.is-mobile .hero-text,
.is-mobile .col,
.is-mobile .b4-text {
  left: 24px;
  right: 24px;
  top: auto;
  bottom: calc(118px + env(safe-area-inset-bottom));
  width: auto;
  transform: none;
  gap: 16px;
}
.is-mobile .hero-text { gap: 12px; }
.is-mobile .col { gap: 18px; }
.is-mobile .step--b3 .display { width: auto; }
.is-mobile .b4-text { gap: 12px; bottom: calc(150px + env(safe-area-inset-bottom)); }

.is-mobile .counter,
.is-mobile .counter--top,
.is-mobile .step--b3 .counter--top {
  left: 24px;
  top: auto;
  bottom: calc(34px + env(safe-area-inset-bottom));
}
.is-mobile .counter .rule { display: none; }
.is-mobile .hint { display: none; }
.is-mobile .hint--center {
  display: block;
  top: auto;
  bottom: calc(76px + env(safe-area-inset-bottom));
  font-size: 11px;
  letter-spacing: 3.6px;
}
.is-mobile .hint--center .vline { display: none; }
.is-mobile .btn {
  top: auto;
  bottom: calc(80px + env(safe-area-inset-bottom));
  width: 248px;
  margin-left: -124px;
  height: 46px;
  font-size: 11px;
}
.is-mobile .dots {
  left: auto;
  right: 24px;
  top: auto;
  bottom: calc(36px + env(safe-area-inset-bottom));
  width: 170px;
}

/* Callouts on phones: stacked grid under the brooch, tap to highlight */
.is-mobile .leaders { display: none; }
.is-mobile .callouts {
  position: absolute;
  left: 20px;
  right: 20px;
  top: var(--callouts-top, 46%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}
.is-mobile .callout {
  position: static;
  width: auto;
  gap: 4px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(204, 163, 99, .35);
  cursor: pointer;
  transition: opacity .4s var(--ease), border-color .4s var(--ease);
}
.is-mobile .callout.is-hot { border-top-color: var(--gold); }
.is-mobile .callout__k { font-size: 9.5px; letter-spacing: 2.6px; }
.is-mobile .callout__t { font-size: 17px; letter-spacing: .4px; }
.is-mobile .callout__d { width: auto; font-size: 12.5px; line-height: 1.35; letter-spacing: .2px; }
/* On the callouts step the brooch copy steps aside so nothing overlaps */
.is-mobile.at-4 .b4-text { opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s .4s; }

@media (prefers-reduced-motion: reduce) {
  .hint--center .vline { animation: none; }
}
