/* =====================================================================
 * UNDERGLASS — landing page
 * Tokyo-night / technical-spec aesthetic. Ink black, bone, champagne gold,
 * with a vaporwave magenta→cyan accent echoing the hero watch.
 * ===================================================================== */

:root {
  --ink: #0b0b0e;
  --ink-2: #121217;
  --panel: #15151b;
  --line: #26262f;
  --bone: #ece6d8;
  --bone-dim: #a7a290;
  --gold: #d8b46a;
  --gold-lt: #f0d49a;
  --mag: #ff3da6;
  --cyan: #36e0e6;
  --maxw: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: var(--ink); }

/* ---- shared bits --------------------------------------------------- */
.eyebrow {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--bone-dim);
  text-transform: uppercase;
  margin: 0 0 22px;
}
.eyebrow--center { text-align: center; }

.section-title {
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
}

.btn {
  --pad: 12px 20px;
  font-family: "Space Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--pad);
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn--solid {
  background: var(--bone);
  color: var(--ink);
  border-color: var(--bone);
  font-weight: 700;
}
.btn--solid:hover { background: #fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { border-color: var(--bone); transform: translateY(-2px); }
.btn--sm { --pad: 9px 16px; font-size: 11px; }
.btn--lg { --pad: 15px 26px; font-size: 14px; }
.btn--xl { --pad: 20px 38px; font-size: 16px; }

/* ---- NAV ----------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 4vw, 46px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.nav.is-stuck {
  background: rgba(11,11,14,0.72);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.wordmark {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
}
.wordmark__jp {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--bone-dim);
}
.nav__links { display: flex; gap: 26px; font-size: 14px; color: var(--bone-dim); }
.nav__links a:hover { color: var(--bone); }
.nav__right { display: flex; align-items: center; gap: 18px; }
.nav__clock {
  font-family: "Space Mono", monospace;
  font-size: 13px;
  color: var(--bone-dim);
  letter-spacing: 0.08em;
}
@media (max-width: 880px) { .nav__links, .nav__clock { display: none; } }

/* ---- SECTION SHELL ------------------------------------------------- */
section { position: relative; }
.gallery {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 52px) clamp(20px, 4vw, 46px) clamp(70px, 10vw, 130px);
  scroll-margin-top: 80px;
}
.section-head { margin-bottom: 54px; }
.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.gallery__lede {
  color: var(--bone-dim);
  font-size: 15px;
  line-height: 1.6;
  margin: 16px 0 0;
  max-width: 44ch;
}

/* ---- GALLERY (reactive grid) -------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  perspective: 1100px;          /* gives the card tilt real depth */
}
.card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--ink-2);
  /* tilt + lift driven by CSS vars the JS updates from cursor position */
  transform:
    rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) translateY(var(--lift, 0px));
  transition: transform 0.5s var(--ease), border-color 0.4s;
  will-change: transform;
}
.card.is-tilting { transition: border-color 0.4s; }   /* follow cursor instantly */
.card:hover { --lift: -6px; border-color: var(--bone-dim); }

.card__stage {
  position: relative;
  padding: 34px 22px 18px;
  display: flex;
  justify-content: center;
}
.card__stage img {
  position: relative; z-index: 1;
  width: 70%;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,0.45));
  transition: transform 0.5s var(--ease);
}
.card:hover .card__stage img { transform: scale(1.06); }

/* cursor-following sheen */
.card__glare {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255,255,255,0.16), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s;
  mix-blend-mode: screen;
}
.card:hover .card__glare { opacity: 1; }

/* edition status pill */
.pill {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.pill--live {
  color: #0b0b0e;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 700;
}
.pill--sold { color: var(--bone-dim); background: rgba(255,255,255,0.05); }

/* sold-out cards read as retired */
.card--sold .card__stage img { filter: grayscale(0.55) brightness(0.78); opacity: 0.85; }
.card--sold .card__name { color: var(--bone-dim); }

.card figcaption {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
}
.card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.card__name { font-weight: 600; letter-spacing: 0.02em; font-size: 15px; }
.card__price {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  color: var(--bone);
  white-space: nowrap;
}
.card--sold .card__price { color: var(--bone-dim); }
.card__meta {
  display: block;
  margin-top: 4px;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  color: var(--bone-dim);
  letter-spacing: 0.05em;
}

/* detail that expands on hover */
.card__more {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows 0.45s var(--ease), opacity 0.35s, margin-top 0.45s var(--ease);
}
.card__more-inner { overflow: hidden; min-height: 0; }
.card:hover .card__more,
.card:focus-within .card__more {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 14px;
}
.card__desc {
  color: var(--bone-dim);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 14px;
}

@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } }
/* touch / no-hover devices: reveal detail, drop the tilt */
@media (hover: none) {
  .card { transform: none !important; }
  .card__more { grid-template-rows: 1fr; opacity: 1; margin-top: 14px; }
  .card__glare { display: none; }
}

/* ---- PRODUCT PAGE -------------------------------------------------- */
.pdp {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 40px) clamp(20px, 4vw, 46px) clamp(60px, 8vw, 100px);
}
.pdp__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: clamp(22px, 3vw, 36px);
}
.pdp__back:hover { color: var(--bone); }
.pdp__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}

/* media — reuses the cursor-tilt + glare vars from the grid cards */
.pdp__media { perspective: 1100px; }
.pdp__stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: clamp(30px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 50% 22%, rgba(255,255,255,0.05), transparent 70%),
    var(--ink-2);
  transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform 0.5s var(--ease);
  will-change: transform;
}
.pdp__stage.is-tilting { transition: none; }
.pdp__stage:hover .card__glare { opacity: 1; }
.pdp__stage img {
  position: relative; z-index: 1;
  width: auto; height: auto;
  max-width: min(100%, 360px);
  max-height: 440px;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.6));
  transition: opacity 0.25s var(--ease);
}
.is-sold .pdp__stage img { filter: grayscale(0.5) brightness(0.8) drop-shadow(0 30px 50px rgba(0,0,0,0.6)); }

/* thumbnail gallery */
.pdp__thumbs { display: flex; gap: 12px; margin-top: 14px; }
.pdp__thumb {
  flex: 1;
  aspect-ratio: 1 / 1;
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.pdp__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pdp__thumb:hover { transform: translateY(-3px); }
.pdp__thumb.is-active { border-color: var(--bone); }

/* gold / silver finish selector */
.pdp__finish { margin: 0 0 26px; }
.pdp__optLabel {
  display: block;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 10px;
}
.pdp__optLabel em { color: var(--bone); font-style: normal; }
.pdp__swatches { display: flex; gap: 10px; }
.swatch {
  width: 34px; height: 34px;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 2px var(--ink);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.swatch--silver { background: linear-gradient(135deg, #f2f2f2, #9a9a9a 60%, #cdcdcd); }
.swatch--gold { background: linear-gradient(135deg, #f6e3a8, #d8b46a 55%, #a87f37); }
.swatch:hover { transform: translateY(-2px); }
.swatch.is-active { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 2px var(--bone); }

.pdp__info { max-width: 520px; }
.pdp__title {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 8px 0 18px;
}
.pdp__priceRow {
  display: flex;
  align-items: baseline;
  gap: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin-bottom: 24px;
}
.pdp__price { font-size: 24px; font-weight: 600; }
.is-sold .pdp__price { color: var(--bone-dim); }
.pdp__edition {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.pdp__desc { color: #cfc9ba; line-height: 1.65; font-size: 16px; margin: 0 0 28px; }
.pdp__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.btn.is-disabled { opacity: 0.5; cursor: not-allowed; }
.pdp__fine {
  margin-top: 24px;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--bone-dim);
}
.pdp__disclaimer {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: #6f6c63;
}

/* spec sheet */
.specsheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.specsheet > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.specsheet > div:nth-child(odd) { border-right: 1px solid var(--line); }
.specsheet > div:nth-last-child(-n+2) { border-bottom: none; }
.specsheet dt {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.specsheet dd { margin: 0; font-weight: 600; font-size: 13px; text-align: right; }

@media (max-width: 860px) {
  .pdp__grid { grid-template-columns: 1fr; }
  .pdp__media { order: -1; }
  .pdp__info { max-width: none; }
}

/* ---- LEGAL / TERMS ------------------------------------------------- */
.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) clamp(20px, 4vw, 46px) clamp(60px, 8vw, 110px);
}
.legal__title {
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 8px 0 12px;
}
.legal__updated {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin: 0 0 30px;
}
.legal__intro {
  color: #cfc9ba;
  font-size: 16px;
  line-height: 1.75;
  margin: 0 0 8px;
}
.legal__sections {
  list-style: none;
  counter-reset: sec;
  margin: 0;
  padding: 0;
}
.legal__sections > li {
  counter-increment: sec;
  border-top: 1px solid var(--line);
  padding-top: 30px;
  margin-top: 38px;
}
.legal__sections > li h2 {
  font-size: 21px;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.legal__sections > li h2::before {
  content: counter(sec, decimal-leading-zero);
  font-family: "Space Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-right: 12px;
  letter-spacing: 0.1em;
}
.legal p, .legal li {
  color: var(--bone-dim);
  font-size: 15px;
  line-height: 1.75;
}
.legal__sections p { margin: 0 0 14px; }
.legal__sections p:last-child { margin-bottom: 0; }
.legal__sections ul {
  margin: 0 0 14px;
  padding-left: 20px;
}
.legal__sections ul li { margin-bottom: 8px; }
.legal strong { color: var(--bone); font-weight: 600; }
.legal a {
  color: var(--bone);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal a:hover { color: var(--gold); }

/* ---- FINAL CTA ----------------------------------------------------- */
.cta {
  position: relative;
  text-align: center;
  padding: clamp(80px, 12vw, 150px) 20px;
  border-top: 1px solid var(--line);
}
.cta__title {
  position: relative;
  font-size: clamp(36px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 38px;
  font-weight: 700;
}
.cta__fine {
  position: relative;
  margin-top: 24px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--bone-dim);
}

/* ---- FOOTER -------------------------------------------------------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px clamp(20px, 4vw, 46px) 40px;
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 40px;
  border-top: 1px solid var(--line);
}
.footer__brand p { color: var(--bone-dim); max-width: 32ch; margin: 16px 0 0; line-height: 1.5; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols h4 {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--bone);
  text-transform: uppercase;
  margin: 0 0 14px;
}
.footer__cols a { display: block; color: var(--bone-dim); padding: 5px 0; font-size: 14px; }
.footer__cols a:hover { color: var(--bone); }
.footer__legal {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin: 16px 0 0;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  line-height: 1.7;
  color: #6f6c63;
  letter-spacing: 0.03em;
}
@media (max-width: 760px) { .footer { grid-template-columns: 1fr; } }

/* ---- reveal animation --------------------------------------------- */
/* opacity-only so it never clobbers the cards' cursor-tilt transform */
.reveal { opacity: 0; transition: opacity 0.7s var(--ease); }
.reveal.is-in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
