/* =============================================
   ARCANIUM STUDIOS — BEHIND THE ARTEFACT
   Aztec Medallion Exhibition
   ============================================= */

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

:root {
  --bronze:        #b87333;
  --bronze-light:  #d4956a;
  --bronze-dark:   #7a4a1e;
  --gold:          #c9a84c;
  --gold-light:    #e8d5a3;
  --dark-bg:       #080808;
  --mid-bg:        #0f0f0f;
  --surface:       #161616;
  --surface-alt:   #1c1c1c;
  --border:        #2a2a2a;
  --text-primary:  #e8e0d0;
  --text-muted:    #7a6e60;
  --text-dim:      #3a3530;
  --verified:      #3d7a5a;
  --prop:          #5a4a7a;
  --font-display:  'Cinzel', 'Georgia', serif;
  --font-body:     'EB Garamond', 'Georgia', serif;
  --max-width:     1100px;
  --col-gap:       4rem;
}

html { scroll-behavior: smooth; font-size: 18px; }

body {
  background-color: var(--dark-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--bronze-light); text-decoration: none; }
a:hover { color: var(--gold-light); text-decoration: underline; }

/* =============================================
   TOP NAV
   ============================================= */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 52px;
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topnav__brand {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  white-space: nowrap;
  flex-shrink: 0;
}
.topnav__brand:hover { color: var(--gold-light); text-decoration: none; }

.topnav__links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.topnav__link {
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
}
.topnav__link:hover { color: var(--gold-light); background: rgba(184,115,51,0.08); text-decoration: none; }
.topnav__link.is-active { color: var(--bronze-light); }

.topnav__hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile nav drawer */
.nav-drawer {
  position: fixed;
  top: 52px; left: 0; right: 0;
  z-index: 190;
  background: rgba(8,8,8,0.98);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}
.nav-drawer__link {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.9rem 2rem;
  border-bottom: 1px solid var(--border);
}
.nav-drawer__link:hover { color: var(--gold-light); text-decoration: none; background: rgba(184,115,51,0.06); }

@media (max-width: 768px) {
  .topnav__links { display: none; }
  .topnav__hamburger { display: block; }
}

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 4rem;
  background: radial-gradient(ellipse at 50% 20%, rgba(184,115,51,0.07) 0%, transparent 65%), var(--dark-bg);
  text-align: center;
}

.hero__inner { max-width: 860px; width: 100%; }

.hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.hero__hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
}

.hero__store-link {
  display: inline-block;
  margin-top: 1.4rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(201,168,76,0.4);
  padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.hero__store-link:hover {
  color: var(--gold-light);
  border-color: var(--gold-light);
  text-decoration: none;
}

.hero__scroll-cue {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2.5rem;
  animation: bob 2.2s ease-in-out infinite;
}
.hero__scroll-cue:hover { color: var(--bronze-light); text-decoration: none; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* =============================================
   MODEL VIEWER
   ============================================= */
.viewer-wrap {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  border-radius: 4px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, #100e08 0%, var(--dark-bg) 100%);
  border: 1px solid var(--border);
}

model-viewer {
  width: 100%;
  height: 520px;
  --poster-color: transparent;
  background-color: transparent;
}

@media (max-width: 600px) { model-viewer { height: 360px; } }

/* Hotspots */
.hotspot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hotspot__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(184,115,51,0.9);
  border: 2px solid var(--gold-light);
  box-shadow: 0 0 0 0 rgba(184,115,51,0.5);
  animation: pulse 2.2s ease-in-out infinite;
  transition: transform 0.2s;
}
.hotspot:hover .hotspot__dot,
.hotspot:focus .hotspot__dot { transform: scale(1.35); background: var(--gold); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(184,115,51,0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(184,115,51,0); }
  100% { box-shadow: 0 0 0 0 rgba(184,115,51,0); }
}

.hotspot__label {
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(8,8,8,0.88);
  padding: 0.18rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
  pointer-events: none;
}

/* Viewer loading */
.viewer-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.82rem;
  pointer-events: none;
}
.viewer-loading__spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--text-dim);
  border-top-color: var(--bronze);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Hotspot panels */
.hotspot-panels { max-width: 680px; margin: 1.25rem auto 0; text-align: left; }

.hotspot-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--bronze);
  border-radius: 3px;
  padding: 1.5rem;
  animation: fadeIn 0.22s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hotspot-panel__close {
  position: absolute;
  top: 0.6rem; right: 0.75rem;
  background: none; border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 2px;
  transition: color 0.2s;
}
.hotspot-panel__close:hover { color: var(--gold-light); }

.hotspot-panel__two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 560px) { .hotspot-panel__two-col { grid-template-columns: 1fr; } }

.hotspot-panel__analysis {
  background: rgba(184,115,51,0.06);
  border-left: 2px solid var(--bronze-dark);
  padding: 0.85rem 1rem;
  border-radius: 0 3px 3px 0;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.7;
}

.compare-col h4 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.compare-col__label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze-light);
}
.compare-col p { font-size: 0.88rem; color: var(--text-primary); line-height: 1.7; }

/* Confidence tags */
.confidence-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 2px;
  vertical-align: middle;
}
.confidence-tag--verified { background: rgba(61,122,90,0.18); color: #6db890; border: 1px solid rgba(61,122,90,0.35); }
.confidence-tag--prop     { background: rgba(90,74,122,0.18); color: #a090cc; border: 1px solid rgba(90,74,122,0.35); }

/* =============================================
   EDITORIAL SECTIONS (left/right layout)
   ============================================= */
.editorial {
  padding: 6rem 2rem;
  background: var(--dark-bg);
  border-top: 1px solid var(--border);
}
.editorial--alt { background: var(--mid-bg); }

.editorial__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--col-gap);
  align-items: center;
}

/* Image left = default */
.editorial__inner--img-left .editorial__media { order: 1; }
.editorial__inner--img-left .editorial__content { order: 2; }

/* Image right = flip */
.editorial__inner--img-right .editorial__media { order: 2; }
.editorial__inner--img-right .editorial__content { order: 1; }

@media (max-width: 800px) {
  .editorial__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .editorial__inner--img-left .editorial__media,
  .editorial__inner--img-right .editorial__media { order: 1; }
  .editorial__inner--img-left .editorial__content,
  .editorial__inner--img-right .editorial__content { order: 2; }
}

.editorial__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--border);
  display: block;
}

.editorial__img-caption {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.6rem;
  line-height: 1.5;
}

/* =============================================
   SHARED SECTION TYPOGRAPHY
   ============================================= */
.section__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
  border: 1px solid var(--bronze-dark);
  padding: 0.22rem 0.7rem;
  border-radius: 2px;
  margin-bottom: 1.1rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

.section__body {
  font-size: 0.97rem;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
  max-width: 58ch;
}

.section__note {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* =============================================
   DETAIL GRID
   ============================================= */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 1.75rem;
}
@media (max-width: 480px) { .detail-grid { grid-template-columns: repeat(2, 1fr); } }

.detail-grid__item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
}
.detail-grid__label {
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.detail-grid__value {
  font-size: 0.95rem;
  color: var(--gold-light);
  font-weight: 500;
}

/* =============================================
   PULL QUOTE
   ============================================= */
.pull-quote {
  border-left: 3px solid var(--bronze-dark);
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
  background: var(--surface);
  border-radius: 0 3px 3px 0;
}
.pull-quote p {
  font-style: italic;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}
.pull-quote cite {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: normal;
}

/* =============================================
   COMPARE TABLE
   ============================================= */
.compare-table {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  font-size: 0.83rem;
}

.compare-table__row {
  display: grid;
  grid-template-columns: 1.2fr 2fr 2fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.compare-table__row:last-child { border-bottom: none; }

.compare-table__row span {
  padding: 0.75rem 0.9rem;
  color: var(--text-primary);
  border-right: 1px solid var(--border);
  line-height: 1.5;
}
.compare-table__row span:last-child { border-right: none; }

.compare-table__row--header {
  background: var(--surface-alt);
}
.compare-table__row--header span {
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bronze);
}

.compare-table__row:not(.compare-table__row--header):nth-child(even) span {
  background: var(--surface);
}
.compare-table__row:not(.compare-table__row--header):nth-child(odd) span {
  background: var(--dark-bg);
}

@media (max-width: 640px) {
  .compare-table__row { grid-template-columns: 1fr; }
  .compare-table__row span { border-right: none; border-bottom: 1px solid var(--border); }
  .compare-table__row span:last-child { border-bottom: none; }
}

/* =============================================
   LINK ROW
   ============================================= */
.link-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 700px) { .link-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .link-row { grid-template-columns: 1fr; } }

.link-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.link-card:hover { border-color: var(--bronze-dark); background: rgba(184,115,51,0.05); text-decoration: none; }
.link-card__label { font-family: var(--font-display); font-size: 0.55rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--bronze); }
.link-card__title { font-size: 0.9rem; color: var(--gold-light); font-weight: 500; }
.link-card__source { font-size: 0.72rem; color: var(--text-muted); font-style: italic; }

.link-card--store {
  border-color: rgba(201,168,76,0.25);
}
.link-card--store:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
}
.link-card--store .link-card__label { color: var(--gold); }
.link-card--store .link-card__title { color: var(--gold-light); }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  padding: 3rem 2rem;
  background: var(--dark-bg);
  border-top: 1px solid var(--border);
}
.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer__brand { font-family: var(--font-display); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bronze); }
.footer__copy { font-size: 0.72rem; color: var(--text-muted); max-width: 58ch; margin: 0 auto; line-height: 1.65; }
.footer__back { font-size: 0.75rem; color: var(--text-dim); }
.footer__back:hover { color: var(--bronze-light); }

/* =============================================
   SCROLL REVEAL
   ============================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 480px) { html { font-size: 16px; } }
