/* ============================================================
   ARCANUM VAULT — trading floor for every card ever released
   Composition: clashing warm neons · mixed-weight collage headline
   · one-shot load orchestration · museum wall labels · diagonal
   split with opposing scroll · patterned SVG background
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #0a0a0a;
  --bg-soft: #121212;
  --ink: #ffffff;
  --ink-dim: #b8b8b8;
  --accent-a: #ff2f92;   /* magenta */
  --accent-b: #ff8a00;   /* acid orange */
  --accent-c: #f4ff33;   /* electric yellow */
  --line: rgba(255, 255, 255, 0.14);
  --font-head: 'Bricolage Grotesque', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-head);
  line-height: 1.5;
  background-color: var(--bg);
  /* Patterned SVG tile — dot matrix, ties to the design language */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="2" cy="2" r="1" fill="%23ffffff" fill-opacity="0.06"/><circle cx="12" cy="2" r="1" fill="%23ff2f92" fill-opacity="0.10"/><circle cx="2" cy="12" r="1" fill="%23ff8a00" fill-opacity="0.10"/><circle cx="12" cy="12" r="1" fill="%23f4ff33" fill-opacity="0.08"/></svg>');
  background-size: 20px 20px;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-a); color: #000; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 0.5rem; letter-spacing: 0.08em; }
.brand-mark { color: var(--accent-c); font-size: 0.9rem; }
.brand-word { font-weight: 800; font-size: 1.05rem; }
.brand-sub { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent-b); letter-spacing: 0.2em; }
.nav-links { display: flex; gap: clamp(0.8rem, 2vw, 1.6rem); }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 0.4rem 0.2rem;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--accent-c); }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
  background: var(--accent-a);
  padding: 0.55rem 1rem;
  border-radius: 2px;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--accent-c); }

/* ---------- Diagonal split hero ---------- */
.split {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 92vh;
  /* Diagonal split via clip-path */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.split-panel { position: relative; overflow: hidden; padding: clamp(2rem, 5vw, 4rem); }
.split-up {
  background: linear-gradient(160deg, rgba(255,47,146,0.16), rgba(255,138,0,0.10) 60%, transparent);
  border-right: 1px solid var(--line);
  /* Opposing scroll: this panel scrolls UP */
  transform: translateY(0);
}
.split-down {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.4rem;
  /* Opposing scroll: this panel scrolls DOWN */
  transform: translateY(0);
}

/* Ticker rows in the up-panel */
.ticker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  margin-bottom: 1.2rem;
}
.ticker .tick { color: var(--accent-c); }
.ticker-b { margin-top: 2rem; }

/* ---------- Mixed-weight collage headline ---------- */
.hero-title {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  gap: 0.08em 0.18em;
}
.hero-title span { display: inline-block; }
.w1 { font-weight: 200; font-stretch: 75%; color: var(--ink-dim); }
.w2 { font-weight: 800; font-stretch: 125%; color: var(--accent-a); }
.w3 { font-weight: 600; font-stretch: 100%; color: var(--accent-c); }
.w4 { font-weight: 300; font-stretch: 80%; color: var(--ink-dim); }
.w5 { font-weight: 700; font-stretch: 115%; color: var(--ink); }
.w6 { font-weight: 900; font-stretch: 130%; color: var(--accent-b); }
.w7 { font-weight: 400; font-stretch: 90%; color: var(--ink-dim); }
.w8 { font-weight: 800; font-stretch: 120%; color: var(--accent-a); }

.hero-sub {
  max-width: 34rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--ink-dim);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8rem 1.3rem;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-a { color: #000; background: var(--accent-c); }
.btn-a:hover { background: var(--accent-a); }
.btn-b { color: var(--ink); border: 1px solid var(--line); }
.btn-b:hover { border-color: var(--accent-b); color: var(--accent-b); }
.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent-b);
  margin-top: 0.6rem;
}

/* ---------- One-shot load orchestration ---------- */
/* Staggered reveal: nav slides from top, hero types in, sub fades up.
   Everything is still after load. */
@starting-style {
  .nav { transform: translateY(-100%); opacity: 0; }
}
.nav { animation: nav-in 0.5s ease both; }

.hero-title span {
  opacity: 0;
  transform: translateY(0.4em);
}
.hero-sub, .hero-actions, .hero-meta {
  opacity: 0;
  transform: translateY(1.2em);
}
.load-ready .hero-title span {
  animation: word-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.load-ready .hero-title span:nth-child(1) { animation-delay: 0.12s; }
.load-ready .hero-title span:nth-child(2) { animation-delay: 0.24s; }
.load-ready .hero-title span:nth-child(3) { animation-delay: 0.36s; }
.load-ready .hero-title span:nth-child(4) { animation-delay: 0.48s; }
.load-ready .hero-title span:nth-child(5) { animation-delay: 0.60s; }
.load-ready .hero-title span:nth-child(6) { animation-delay: 0.72s; }
.load-ready .hero-title span:nth-child(7) { animation-delay: 0.84s; }
.load-ready .hero-title span:nth-child(8) { animation-delay: 0.96s; }
.load-ready .hero-sub { animation: fade-up 0.6s ease 1.0s both; }
.load-ready .hero-actions { animation: fade-up 0.6s ease 1.12s both; }
.load-ready .hero-meta { animation: fade-up 0.6s ease 1.24s both; }

@keyframes nav-in { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes word-in { from { opacity: 0; transform: translateY(0.4em); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(1.2em); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Sections / museum wall labels ---------- */
.section {
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
}
.section-head { margin-bottom: 2.5rem; }
.section-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.section-title::before { content: '◆ '; color: var(--accent-b); }
.section-note { max-width: 42rem; color: var(--ink-dim); margin: 0; }

/* Gallery — items hung like on a museum wall, generous negative space */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.work { display: flex; flex-direction: column; gap: 0.8rem; }
.work-visual {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.work-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 60%);
}
.card-glyph { font-size: 3rem; color: #000; opacity: 0.85; }
.work-a { background: linear-gradient(140deg, var(--accent-a), var(--accent-b)); }
.work-b { background: linear-gradient(140deg, var(--accent-c), var(--accent-a)); }
.work-c { background: linear-gradient(140deg, var(--accent-b), var(--accent-c)); }
.work-d { background: linear-gradient(140deg, var(--accent-a), var(--accent-c)); }
.work-e { background: linear-gradient(140deg, var(--accent-b), var(--accent-a)); }
.work-f { background: linear-gradient(140deg, var(--accent-c), var(--accent-b)); }

/* Museum wall label */
.label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-left: 2px solid var(--accent-a);
  padding-left: 0.7rem;
}
.label-title { color: var(--ink); font-weight: 500; }
.label-date { color: var(--ink-dim); }
.label-medium { color: var(--accent-c); }

/* ---------- Era grid ---------- */
.era-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.era {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.era:hover { border-color: var(--accent-b); transform: translateY(-3px); }
.era-era { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--accent-b); }
.era-name { font-weight: 700; font-size: 1.1rem; }
.era-count { font-size: 0.85rem; color: var(--ink-dim); }

/* ---------- Vault ---------- */
.vault-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-soft);
  padding: clamp(1.2rem, 3vw, 2rem);
}
.vault-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.vault-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--accent-c); }
.stat-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }

.vault-rows { display: flex; flex-direction: column; margin-bottom: 1.6rem; }
.vrow {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 0.2rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.vrow-name { font-weight: 500; }
.vrow-qty, .vrow-price { color: var(--ink-dim); }
.vrow-delta { font-weight: 700; }
.vrow-delta.up { color: var(--accent-c); }
.vrow-delta.down { color: var(--accent-a); }

.vault-add {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 0.8rem;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.field input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  padding: 0.7rem 0.8rem;
  font-family: var(--font-head);
  font-size: 0.95rem;
}
.field input:focus { outline: 2px solid var(--accent-b); outline-offset: 1px; border-color: transparent; }
.form-status { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-c); margin: 0.4rem 0 0; }

/* ---------- About ---------- */
.about-body { display: grid; gap: 1.2rem; max-width: 46rem; }
.about-body p { margin: 0; color: var(--ink-dim); font-size: 1.05rem; }
.about-body p:first-child { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem clamp(1rem, 4vw, 3rem);
}
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.3rem; }
.footer-brand { font-weight: 800; letter-spacing: 0.08em; }
.footer-line { color: var(--ink-dim); font-size: 0.9rem; }
.muted { color: var(--ink-dim); font-size: 0.75rem; }
.attribution { font-family: var(--font-mono); margin: 0.6rem 0 0; }
.attribution a { color: var(--accent-b); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split-up { display: none; }
  .nav-links { display: none; }
  .vault-add { grid-template-columns: 1fr; }
  .vrow { grid-template-columns: 1fr auto auto; }
  .vrow-qty { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-title span, .hero-sub, .hero-actions, .hero-meta { opacity: 1; transform: none; }
}
