/* TIMEEXIST Watch — The Twelve */

:root {
  --bg: #050816;
  --bg-elevated: #0a1024;
  --bg-card: rgba(14, 22, 48, 0.72);
  --border: rgba(140, 170, 255, 0.14);
  --border-strong: rgba(160, 190, 255, 0.28);
  --text: #e8eefc;
  --text-muted: #9aabd0;
  --text-soft: #6d7fa8;
  --accent: #8eb4ff;
  --accent-soft: rgba(142, 180, 255, 0.15);
  --glow: #6b8cff;
  --violet: #a78bfa;
  --cyan: #67e8f9;
  --gold: #f0d78c;
  --watch-accent: #d4af37;
  --font-display: "Cormorant Garamond", "Noto Sans TC", "Noto Sans SC", Georgia, serif;
  --font-body: "Outfit", "Noto Sans TC", "Noto Sans SC", system-ui, sans-serif;
  --radius: 18px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1180px;
}

body.lang-zh-TW {
  --font-body: "Noto Sans TC", "Outfit", system-ui, sans-serif;
  --font-display: "Noto Sans TC", "Cormorant Garamond", Georgia, serif;
}

body.lang-zh-CN {
  --font-body: "Noto Sans SC", "Outfit", system-ui, sans-serif;
  --font-display: "Noto Sans SC", "Cormorant Garamond", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(80, 60, 180, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 30%, rgba(40, 100, 200, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 40% at 70% 80%, rgba(212, 175, 55, 0.06), transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 90%, rgba(90, 40, 140, 0.12), transparent 55%);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  background: linear-gradient(to bottom, rgba(5, 8, 22, 0.92), rgba(5, 8, 22, 0.55) 70%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
  z-index: 100;
}

.site-header.scrolled {
  background: rgba(5, 8, 22, 0.88);
  box-shadow: 0 1px 0 var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.brand-mark {
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border);
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name small {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--gold);
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.nav a {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.nav-cta {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--gold) !important;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.35rem;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(10, 16, 36, 0.45);
}

.lang-btn {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}

.lang-btn:hover { color: var(--text); }

.lang-btn.active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(142, 180, 255, 0.25);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.lede {
  color: var(--text-muted);
  max-width: 46rem;
  font-size: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(180deg, #f3e3ad, #c9a44a);
  color: #1a1408;
  font-weight: 500;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  gap: 2rem;
  padding: calc(var(--header-h) + 2rem) 0 3rem;
  width: min(100% - 2.5rem, 1320px);
  margin-inline: auto;
}

.hero-copy {
  max-width: 36rem;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  margin-bottom: 1.1rem;
}

.hero-title em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.08rem;
  margin-bottom: 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.scroll-hint {
  margin-top: 2.4rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-soft);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.stage {
  position: relative;
  min-height: min(78vh, 760px);
  height: min(78vh, 760px);
  border-radius: 28px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(240, 215, 140, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(10, 16, 36, 0.4), rgba(5, 8, 22, 0.2));
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

#watch-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  cursor: grab;
  touch-action: none;
}

[hidden] { display: none !important; }

#watch-canvas:active { cursor: grabbing; }

#watch-canvas.ready { opacity: 1; }

.stage-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.hero-portrait-wrap {
  display: grid;
  place-items: center;
  color: inherit;
}

.hero-portrait,
.stage-fallback img {
  width: min(86%, 520px);
  border-radius: 8px;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
  animation: floaty 8s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotateY(-8deg); }
  50% { transform: translateY(-10px) rotateY(8deg); }
}

.stage-hud {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  pointer-events: none;
}

.stage-hud > * { pointer-events: auto; }

.hint {
  font-size: 0.72rem;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-btns {
  display: flex;
  gap: 0.4rem;
}

.hud-btn {
  border: 1px solid var(--border);
  background: rgba(5, 8, 22, 0.55);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.hud-btn.active,
.hud-btn[aria-pressed="true"] {
  color: var(--gold);
  border-color: rgba(240, 215, 140, 0.4);
}

.section {
  padding: 5.5rem 0;
}

.section-head {
  margin-bottom: 2.2rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  margin-bottom: 0.7rem;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.watch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s;
}

.watch-card:hover,
.watch-card:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 55%, white);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.watch-card.active {
  border-color: var(--watch-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--watch-accent) 50%, transparent);
}

.watch-card img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  background: #070b18;
}

.watch-card-no {
  position: absolute;
  top: 0.7rem;
  left: 0.8rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.12em;
}

.watch-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem 1rem;
}

.watch-card-maison {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.watch-card-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.watch-card-year {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.studio-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.studio-stage {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  min-height: 64vh;
  height: min(72vh, 700px);
}

.story-panel {
  padding: 0.4rem 0.2rem 2rem;
}

.story-kicker {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}

.story-no {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
}

.story-maison {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--text-soft);
}

.story-panel h2 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  margin-bottom: 0.25rem;
}

.story-year {
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.story-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.story-block {
  margin: 1.4rem 0;
}

.story-block h3 {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.45rem;
  font-family: var(--font-body);
  font-weight: 500;
}

.story-block p {
  color: var(--text-muted);
}

.specs {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.specs div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.6rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.specs dt {
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
  padding-top: 0.25rem;
}

.story-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.story-nav button {
  flex: 1;
  background: rgba(10, 16, 36, 0.5);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  padding: 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
}

.story-nav button:last-child { text-align: right; }

.story-nav small {
  display: block;
  color: var(--text-soft);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.nav-label {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

.about-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.6rem;
  background: var(--bg-card);
}

.about-card p + p { margin-top: 1rem; color: var(--text-muted); }

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: center;
}

.footer-copy a { color: var(--text-muted); }

.footer-copy a:hover { color: var(--gold); }

body.lang-zh-TW .hero-title,
body.lang-zh-CN .hero-title,
body.lang-zh-TW h2,
body.lang-zh-CN h2 {
  letter-spacing: 0.04em;
  line-height: 1.28;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--header-h) + 1.2rem);
  }

  .stage,
  .studio-stage {
    height: min(62vh, 560px);
    min-height: 420px;
  }

  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .studio-layout,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .studio-stage { position: relative; top: 0; }

  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.4rem 1.4rem;
    background: rgba(5, 8, 22, 0.96);
    border-bottom: 1px solid var(--border);
    gap: 0.85rem;
  }

  .nav.open { display: flex; }

  .lang-switch {
    margin: 0.5rem 0 0;
    align-self: flex-start;
  }

  .specs div { grid-template-columns: 1fr; gap: 0.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-portrait,
  .stage-fallback img { animation: none; }
  .watch-card { transition: none; }
}

@media (max-width: 560px) {
  .collection-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .watch-card-name { font-size: 1rem; }
  .hero-title { font-size: 2.35rem; }
  .container { width: min(100% - 1.4rem, var(--max)); }
  .hero { width: min(100% - 1.4rem, 1320px); }
}
