/* The Vault (ZardoCards concept), in the language of zardocards.com: near-black, bold Geist,
   gold-gradient pill buttons, dark rounded cards, gold accents. Phone first. */
:root {
  --bg: #0a0908;
  --ink: #ffffff;
  --mute: #b5afa5;
  --faint: #827c73;
  --gold: #ecc354;
  --gold-deep: #c79a4a;
  --gold-grad: linear-gradient(90deg, #fae49e 0%, #f0c862 42%, #d6a12a 100%);
  --gold-text: linear-gradient(180deg, #fde9a9 0%, #f0c457 55%, #c8901d 100%);
  --card: #131210;
  --card-hi: #1a1916;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pad: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 600px) { :root { --pad: 28px; } }
@media (min-width: 900px) { :root { --pad: 48px; } }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  min-height: 100dvh;
  overflow: hidden;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; }
svg { display: block; }

#stage {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: none; outline: none;
  opacity: 0; transition: opacity 1.1s var(--ease);
}
body.ready #stage { opacity: 1; }

/* the door, drawn in CSS until the 3D one paints */
.door-ph {
  position: fixed; left: 50%; top: 32%;
  width: min(96vw, 50vh); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(199,154,74,.9) 0 3.5%, transparent 4% 17%, rgba(199,154,74,.55) 17.5% 18.5%, transparent 19% 39%,
      rgba(199,154,74,.65) 39.5% 41%, transparent 41.5% 52.5%, rgba(199,154,74,.4) 53% 53.6%, transparent 54% 64.5%,
      rgba(199,154,74,.85) 65% 67.5%, #131110 68% 72%, rgba(199,154,74,.5) 72.5% 73.5%, transparent 74%),
    radial-gradient(circle, #1a1714 0 67%, transparent 67.5%);
  opacity: 0.85;
  transition: opacity 0.9s var(--ease);
  pointer-events: none;
}
body.ready .door-ph { opacity: 0; }

/* header: centred logo like his site, language on the left, a small private-preview tag on the right */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 6;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(var(--safe-t) + 10px) var(--pad) 8px;
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand img { display: block; height: 34px; width: auto; }
.lang { justify-self: start; display: flex; align-items: center; font: 700 12px/1 var(--sans); letter-spacing: 0.04em; }
.lang button {
  appearance: none; background: none; border: 0; cursor: pointer;
  color: var(--faint); padding: 12px 9px; min-width: 40px;
}
.lang button[aria-pressed="true"] { color: var(--ink); }
.lang button + button { border-left: 1px solid var(--line-strong); }
.top-tag {
  justify-self: end; font: 600 11px/1 var(--sans); color: var(--mute);
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(19, 18, 16, 0.6);
}

/* panels: one per state, faded in by state */
.panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 0 var(--pad) calc(var(--safe-b) + 16px);
  visibility: hidden; pointer-events: none;
  transition: visibility 0s linear 0.6s;
}
.panel::before {
  content: ""; position: absolute; left: 0; right: 0; top: -80px; bottom: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(10, 9, 8, 0), rgba(10, 9, 8, 0.86) 38%, rgba(10, 9, 8, 0.97));
  opacity: 0; transition: opacity 0.6s var(--ease);
  pointer-events: none;
}
.panel > * { opacity: 0; transform: translateY(14px); transition: opacity 0.45s var(--ease), transform 0.6s var(--ease); }
body[data-state="door"] .intro,
body[data-state="case"] .overview,
body[data-state="lift"] .lift { visibility: visible; pointer-events: auto; transition-delay: 0s; }
body[data-state="door"] .intro::before,
body[data-state="case"] .overview::before,
body[data-state="lift"] .lift::before { opacity: 1; }
body[data-state="door"] .intro > *,
body[data-state="case"] .overview > *,
body[data-state="lift"] .lift > * { opacity: 1; transform: none; }
.panel > :nth-child(2) { transition-delay: 0.05s; }
.panel > :nth-child(3) { transition-delay: 0.1s; }
.panel > :nth-child(4) { transition-delay: 0.15s; }
.panel > :nth-child(5) { transition-delay: 0.2s; }

/* trust pill and icon chips, as on his homepage */
.trust {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px;
  padding: 7px 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(19, 18, 16, 0.75);
  font: 600 12.5px/1 var(--sans); color: var(--ink);
}
.stars { color: var(--gold); letter-spacing: 1.5px; font-size: 11px; }
.chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.chips li { display: flex; align-items: center; gap: 8px; font: 600 12.5px/1.2 var(--sans); color: var(--ink); }
.chips svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.credit { margin: 14px 0 0; font: 500 11px/1 var(--sans); color: var(--faint); }

.title {
  margin: 0 0 8px;
  font-weight: 800; font-size: clamp(56px, 16.5vw, 128px); line-height: 0.95; letter-spacing: -0.04em;
}
.title em, .case-title em {
  font-style: normal;
  background: var(--gold-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin: 0 0 18px; max-width: 34ch; font: 500 15.5px/1.45 var(--sans); color: var(--mute); }

/* buttons: pills, the primary one in his gold gradient */
.row { display: flex; gap: 10px; }
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 999px;
  font: 700 14px/1 var(--sans); letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn.gold {
  background: var(--gold-grad); color: #15110a; border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 22px -10px rgba(214, 161, 42, 0.55);
}
.btn.dark { background: var(--card-hi); color: var(--ink); border: 1px solid var(--line-strong); font-size: 13px; letter-spacing: 0.02em; }
.btn.dark:hover { border-color: rgba(236, 195, 84, 0.6); }
.btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.intro .btn.gold { width: 100%; }

/* the case overview */
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 700 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.eyebrow svg { width: 15px; height: 15px; }
.case-title em { white-space: nowrap; }
.case-title { margin: 0 0 4px; font-weight: 800; font-size: clamp(32px, 9vw, 60px); line-height: 1; letter-spacing: -0.035em; }
.case-value { margin: 0 0 12px; font: 600 14.5px/1.3 var(--sans); color: var(--mute); }
.case-value b { color: var(--gold); font-weight: 800; }
.rail {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad) 4px; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rcard {
  appearance: none; flex: 0 0 auto; width: 214px; scroll-snap-align: start;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 10px 14px 10px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  color: inherit; text-align: left; cursor: pointer; transition: transform 0.25s var(--ease);
}
.rcard:hover { transform: translateY(-2px); border-color: rgba(236, 195, 84, 0.45); }
.rcard:active { transform: scale(0.98); }
.rcard img { width: 44px; height: 75px; object-fit: cover; border-radius: 4px; display: block; }
.rcard .g { display: block; font: 700 10.5px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.rcard .n { display: block; margin: 5px 0 6px; font: 700 15px/1.1 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard .p { display: block; font: 700 13px/1 var(--sans); color: #f2cc62; }

/* the lifted grail: a product page in miniature */
.plate-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.count { margin: 0; font: 700 12.5px/1 var(--sans); color: var(--gold); letter-spacing: 0.04em; }
.count .of { color: var(--faint); margin-left: 6px; }
.arrows { display: flex; gap: 8px; }
.arrow {
  appearance: none; width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--card-hi); border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.arrow svg { width: 16px; height: 16px; }
.arrow:hover { transform: translateY(-1px); border-color: rgba(236, 195, 84, 0.6); }
.arrow:active { transform: scale(0.95); }
.swap { transition: opacity 0.18s var(--ease), transform 0.25s var(--ease); }
.swap.out { opacity: 0; transform: translateY(6px); }
.name { margin: 2px 0 3px; font-weight: 800; font-size: clamp(30px, 8.6vw, 54px); line-height: 1; letter-spacing: -0.035em; }
.set { margin: 0 0 10px; font: 500 13px/1.3 var(--sans); color: var(--mute); }
.meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.tag { padding: 6px 10px; white-space: nowrap; border-radius: 999px; border: 1px solid var(--line-strong); font: 600 12px/1 var(--sans); color: var(--ink); background: rgba(19, 18, 16, 0.7); }
.gold-tag { border-color: rgba(236, 195, 84, 0.7); color: var(--gold); }
.price {
  margin: 0; flex: none; font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: -0.02em;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lift .row.two .btn { flex: 1 1 0; padding: 0 12px; height: 42px; font-size: 12px; }
.lift > .btn.gold { width: 100%; margin-top: 8px; height: 50px; }
.listing { display: none; margin: 12px 0 0; font: 500 10.5px/1.45 var(--mono); color: var(--faint); letter-spacing: 0.02em; }

.back {
  position: fixed; z-index: 6; left: var(--pad); top: calc(var(--safe-t) + 60px);
  appearance: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px;
  background: rgba(26, 25, 22, 0.8); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
  font: 700 12.5px/1 var(--sans); letter-spacing: 0.02em;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.back svg { width: 15px; height: 15px; }
body[data-state="lift"] .back { opacity: 1; transform: none; pointer-events: auto; }

/* reading the label: the typed cert */
.certline { margin: 0 0 12px; }
.certline[hidden] { display: none; }
.typed { margin: 0; font: 600 24px/1 var(--mono); letter-spacing: 0.05em; }
.typed .lbl { font: 700 11px/1 var(--sans); letter-spacing: 0.1em; color: var(--gold); margin-right: 12px; vertical-align: 0.3em; text-transform: uppercase; }
.caret { display: inline-block; width: 2px; height: 0.9em; margin-left: 4px; vertical-align: -0.08em; background: var(--gold); animation: blink 1s steps(1) infinite; }
.certline.done .caret { opacity: 0; animation: none; }
@keyframes blink { 50% { opacity: 0; } }
.subgrades { margin: 12px 0 0; max-width: 360px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); font: 600 11px/1.2 var(--sans); color: var(--faint); }
.subgrades:empty { display: none; }
.subgrades span { display: flex; flex-direction: column; gap: 4px; padding: 0 8px; }
.subgrades span:first-child { padding-left: 0; }
.subgrades span + span { border-left: 1px solid var(--line); }
.subgrades b { font: 600 16px/1 var(--mono); color: var(--ink); }
.verify {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font: 700 12.5px/1 var(--sans); color: var(--gold); text-decoration: none;
  opacity: 0; transform: translateY(4px); transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.verify svg { width: 14px; height: 14px; }
.certline.done .verify { opacity: 1; transform: none; }
.verify[hidden] { display: none; }
body.labeling .lift::before { top: -150px; background: linear-gradient(to bottom, rgba(10, 9, 8, 0), rgba(10, 9, 8, 0.93) 34%, #0a0908); }

/* the entrance can be skipped with a tap */
.skip {
  position: fixed; z-index: 5; left: 0; right: 0; bottom: calc(var(--safe-b) + 22px); margin: 0;
  text-align: center; font: 600 11.5px/1 var(--sans); color: var(--faint); letter-spacing: 0.04em;
  opacity: 0; transition: opacity 0.5s var(--ease); pointer-events: none;
}
body[data-state="opening"] .skip { opacity: 1; transition-delay: 1.2s; }

/* the call to action on the case screen: a gold pill that taps, with a ring that pulses outward */
.tap-cta {
  position: fixed; z-index: 5; left: 50%; top: calc(var(--safe-t) + 62px); margin: 0;
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px 0 15px;
  border-radius: 999px; background: var(--gold-grad); color: #15110a;
  font: 800 13px/1 var(--sans); letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 30px -10px rgba(214, 161, 42, 0.7);
  opacity: 0; transform: translate(-50%, -8px); pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.tap-cta svg { width: 21px; height: 21px; flex: none; animation: tapFinger 1.8s var(--ease) infinite; }
.tap-cta .ring {
  position: absolute; inset: -5px; border-radius: 999px; border: 2px solid rgba(242, 204, 104, 0.85);
  opacity: 0; animation: tapRing 1.8s var(--ease) infinite;
}
body[data-state="case"] .tap-cta { opacity: 1; transform: translate(-50%, 0); transition-delay: 0.5s; }
body.lifted-once .tap-cta svg, body.lifted-once .tap-cta .ring { animation: none; }
@keyframes tapRing { 0% { opacity: 0.9; transform: scale(0.96); } 100% { opacity: 0; transform: scale(1.12, 1.5); } }
@keyframes tapFinger { 0%, 55%, 100% { transform: none; } 22% { transform: translateY(2px) scale(0.9); } 38% { transform: none; } }

/* no WebGL: a plain list of the same six slabs */
.fallback { position: fixed; inset: 0; z-index: 7; overflow: auto; padding: calc(var(--safe-t) + 70px) var(--pad) 40px; background: var(--bg); }
.fallback ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.fallback img { width: 100%; height: auto; display: block; border-radius: 6px; }
.fallback h3 { margin: 12px 0 4px; font-weight: 700; font-size: 20px; }
.fallback p { margin: 0; font: 500 12px/1.5 var(--sans); color: var(--mute); }

/* wide screens: the logo left like his desktop header, text in a left column, the 3D to the right */
@media (min-width: 900px) {
  .top { grid-template-columns: auto 1fr auto auto; gap: 18px; }
  .brand { order: -1; }
  .brand img { height: 40px; }
  .lang { order: 3; }
  .top-tag { order: 2; }
  /* the column starts below the header and sits at the bottom only when it fits (margin-top: auto),
     so a short window can never push it up under the logo */
  .intro, .overview, .lift {
    right: auto; top: 0; width: min(460px, 40vw);
    display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start;
    padding-top: calc(var(--safe-t) + 96px);
    padding-bottom: calc(var(--safe-b) + 40px);
  }
  .intro > :first-child, .overview > :first-child, .lift > :first-child { margin-top: auto; }
  .intro::before, .overview::before, .lift::before {
    top: 0; right: -160px;
    background: linear-gradient(to right, rgba(10, 9, 8, 0.97), rgba(10, 9, 8, 0.9) 62%, rgba(10, 9, 8, 0));
  }
  .title { font-size: clamp(84px, 8vw, 132px); }
  .intro .btn.gold { width: auto; padding: 0 32px; }
  .case-title { font-size: clamp(40px, 4.2vw, 62px); }
  .overview .rail { flex-direction: column; flex: 0 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; gap: 8px; margin: 4px 0 0; padding: 0; width: 100%; }
  .rcard { width: 100%; grid-template-columns: 34px minmax(0, 1fr); padding: 7px 14px 7px 8px; }
  .rcard img { width: 34px; height: 58px; }
  .rcard .n { margin: 4px 0 4px; font-size: 14px; }
  .lift > * { width: 100%; }
  .lift .listing { display: block; }
  .door-ph { left: calc(min(460px, 40vw) + (100vw - min(460px, 40vw)) / 2); top: 54%; width: min(56vw, 84vh); }
  .back { top: calc(var(--safe-t) + 76px); }
  .tap-cta { top: calc(var(--safe-t) + 80px); left: calc(min(460px, 40vw) + (100vw - min(460px, 40vw)) / 2); }
}
/* wide but short windows (laptops): a tighter column so everything fits under the header */
@media (min-width: 900px) and (max-height: 880px) {
  .case-title { font-size: clamp(36px, 3.6vw, 50px); }
  .case-value { margin-bottom: 8px; }
  .overview .rail { gap: 6px; }
  .rcard { padding: 5px 12px 5px 6px; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .rcard img { width: 28px; height: 48px; }
  .rcard .g { font-size: 10px; }
  .rcard .n { margin: 3px 0; font-size: 13px; }
  .rcard .p { font-size: 12px; }
  .title { font-size: clamp(72px, 7vw, 110px); }
}
@media (prefers-reduced-motion: reduce) {
  .panel > *, .back, .verify, .swap, .tap-cta, #stage, .door-ph { transition-duration: 0.01s !important; }
  .caret, .tap-cta svg, .tap-cta .ring { animation: none; }
}
