:root,
[data-theme="night"] {
  --bg-primary: #09080f;
  --bg-secondary: #12101c;
  --bg-elevated: rgba(20, 18, 31, 0.84);
  --bg-card-frame: #181523;
  --text-primary: #f6f1e7;
  --text-secondary: rgba(246, 241, 231, 0.72);
  --text-muted: rgba(246, 241, 231, 0.48);
  --gold: #e7bc61;
  --gold-bright: #f8dc94;
  --gold-soft: rgba(231, 188, 97, 0.2);
  --chartreuse: #aec424;
  --blossom: #eca8bf;
  --cobalt: #5e83db;
  --terracotta: #d47256;
  --border-subtle: rgba(231, 188, 97, 0.22);
  --border-strong: rgba(231, 188, 97, 0.52);
  --shadow-art: 0 22px 48px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(231, 188, 97, 0.26);
  --hearth-bg: radial-gradient(circle at 50% 34%, rgba(231, 188, 97, 0.26), rgba(18, 16, 28, 0.92) 66%);
  --backdrop-blur: blur(18px);
}

[data-theme="day"] {
  --bg-primary: #f6f0e4;
  --bg-secondary: #ece3d2;
  --bg-elevated: rgba(251, 247, 239, 0.88);
  --bg-card-frame: #fffdf9;
  --text-primary: #1c1815;
  --text-secondary: rgba(28, 24, 21, 0.76);
  --text-muted: rgba(28, 24, 21, 0.52);
  --gold: #a87424;
  --gold-bright: #c88d32;
  --gold-soft: rgba(168, 116, 36, 0.14);
  --chartreuse: #6f8818;
  --blossom: #b85b7c;
  --cobalt: #3858a8;
  --terracotta: #b55339;
  --border-subtle: rgba(168, 116, 36, 0.24);
  --border-strong: rgba(168, 116, 36, 0.55);
  --shadow-art: 0 18px 40px rgba(42, 31, 18, 0.18), 0 0 0 1px rgba(168, 116, 36, 0.25);
  --hearth-bg: radial-gradient(circle at 50% 34%, rgba(218, 168, 75, 0.34), rgba(250, 244, 233, 0.94) 68%);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.65s ease, color 0.5s ease;
}

h1, h2, h3, .serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ==================== TOP NAVIGATION ==================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.6rem;
  background: linear-gradient(to bottom, var(--bg-elevated), transparent);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.brand-mark {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-monogram {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.brand-sub {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.28rem 0.45rem;
  backdrop-filter: var(--backdrop-blur);
}

.top-nav button,
.top-nav a {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.top-nav button:hover,
.top-nav a:hover {
  color: var(--text-primary);
  background: var(--gold-soft);
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.42rem 0.82rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: var(--backdrop-blur);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.pill-btn:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.pill-btn[aria-pressed="true"] {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold);
}

/* ==================== LIVE EVENT RIBBON (VAL-DAVID DEC 1) ==================== */
.live-event-pill {
  position: fixed;
  top: 4.15rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.38rem 0.95rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  backdrop-filter: var(--backdrop-blur);
  color: var(--text-primary);
  font-size: 0.76rem;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.live-event-pill:hover {
  transform: translateX(-50%) scale(1.025);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chartreuse);
  box-shadow: 0 0 12px var(--chartreuse);
  animation: pulseGlow 1.9s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(0.92); opacity: 0.75; }
  50% { transform: scale(1.32); opacity: 1; }
}

/* ==================== HERO PHYSICS STAGE ==================== */
.physics-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

#vibratory-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#artworks-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

/* FLOATING TACTILE ARTWORK CARDS */
.art-card {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  cursor: grab;
  will-change: transform;
  transform-origin: center center;
  border-radius: 8px;
  padding: 6px 6px 24px 6px;
  background: var(--bg-card-frame);
  box-shadow: var(--shadow-art);
  transition: box-shadow 0.25s ease;
}

.art-card.is-dragging {
  cursor: grabbing;
  z-index: 40 !important;
  box-shadow: 0 32px 68px rgba(0, 0, 0, 0.78), 0 0 28px var(--gold-soft), 0 0 0 1.5px var(--gold);
}

.art-card.near-portal {
  box-shadow: 0 0 42px var(--gold), 0 0 0 2px var(--gold-bright);
}

.art-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  pointer-events: none;
  draggable: false;
}

.art-card-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.64rem;
  color: var(--text-secondary);
  pointer-events: none;
  overflow: hidden;
}

.art-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.art-card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.56rem;
  color: var(--gold);
  opacity: 0.9;
  flex-shrink: 0;
}

/* ==================== CENTRAL SOUL WINDOW (THE ARCHED PORTAL) ==================== */
.soul-hearth-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.soul-arch {
  position: relative;
  width: 300px;
  padding: 2.3rem 1.6rem 1.75rem;
  border-radius: 160px 160px 22px 22px;
  background: var(--hearth-bg);
  border: 1.5px solid var(--border-strong);
  box-shadow: 0 0 80px rgba(231, 188, 97, 0.14), inset 0 0 38px rgba(231, 188, 97, 0.08);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.soul-arch.portal-armed {
  transform: scale(1.07);
  border-color: var(--gold-bright);
  box-shadow: 0 0 110px rgba(231, 188, 97, 0.45), inset 0 0 50px rgba(231, 188, 97, 0.22);
}

.gong-sun {
  width: 74px;
  height: 74px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  border: 1.5px solid var(--gold-bright);
  background: radial-gradient(circle at 36% 32%, #fff3c4 0%, #e7bc61 42%, #9f6d1d 88%, #5e3d0b 100%);
  box-shadow: 0 0 36px rgba(231, 188, 97, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1a1206;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.gong-sun:hover {
  transform: scale(1.09);
  box-shadow: 0 0 54px rgba(248, 220, 148, 0.88);
}

.gong-sun:active {
  transform: scale(0.94);
}

.hearth-kicker {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.hearth-title {
  margin: 0;
  font-size: 2.05rem;
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hearth-subtitle {
  margin: 0.55rem 0 0.9rem;
  font-size: 0.82rem;
  line-height: 1.48;
  color: var(--text-secondary);
}

.hearth-whisper {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--gold);
  opacity: 0.92;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: var(--gold-soft);
  display: inline-block;
}

/* PORTAL NODES AROUND ARCH */
.portal-satellites {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.42rem;
  margin-top: 0.85rem;
  max-width: 440px;
  pointer-events: auto;
}

.portal-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: var(--backdrop-blur);
  transition: all 0.22s ease;
}

.portal-chip:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
  transform: translateY(-2px);
}

/* ==================== BOTTOM PLAYGROUND DOCK ==================== */
.play-dock {
  position: fixed;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.42rem 0.58rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  backdrop-filter: var(--backdrop-blur);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  max-width: calc(100vw - 1.5rem);
  overflow-x: auto;
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.44rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.dock-btn:hover {
  color: var(--text-primary);
  background: var(--gold-soft);
}

.dock-btn.is-active {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--gold-soft);
}

.status-toast {
  position: fixed;
  bottom: 4.55rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 54;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.73rem;
  color: var(--gold-bright);
  background: rgba(12, 10, 20, 0.78);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.32s ease;
  white-space: nowrap;
}

.status-toast.visible {
  opacity: 1;
}

/* ==================== BELOW-THE-FOLD SANCTUARY SECTIONS ==================== */
.sanctuary-scroll {
  position: relative;
  z-index: 20;
  background: linear-gradient(to bottom, transparent 0%, var(--bg-primary) 90px, var(--bg-secondary) 100%);
  padding: 5rem 1.5rem 6.5rem;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
}

.acclaim-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.2rem 2.4rem;
  padding: 1.35rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4.5rem;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.acclaim-strip span strong {
  color: var(--gold);
  font-weight: 600;
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
  margin-bottom: 5.5rem;
}

.portrait-frame {
  position: relative;
  border-radius: 220px 220px 18px 18px;
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-art);
}

.portrait-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.poem-quote {
  margin: 1.6rem 0;
  padding: 1.35rem 1.6rem;
  border-left: 2px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 14px 14px 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2.2rem;
  flex-wrap: wrap;
}

.section-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 600;
  line-height: 1.08;
}

/* WORLDS BENTO GRID */
.worlds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.world-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.world-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
}

.world-card-media {
  height: 230px;
  overflow: hidden;
  position: relative;
}

.world-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.world-card:hover .world-card-media img {
  transform: scale(1.05);
}

.world-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(10, 9, 16, 0.82);
  color: #f8dc94;
  font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid rgba(231, 188, 97, 0.45);
}

.world-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.world-card-body h3 {
  margin: 0 0 0.55rem;
  font-size: 1.6rem;
}

.world-card-body p {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.84rem;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.cta-link:hover {
  text-decoration: underline;
}

/* ==================== MODAL / PORTAL DRAWER & ORACLE CARD FLIP ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6, 5, 11, 0.82);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.75);
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 1.15rem;
  cursor: pointer;
}

.artwork-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.artwork-detail-grid img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 12px;
  background: var(--bg-card-frame);
  padding: 8px;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f3d27a, #d89f3c);
  color: #191205;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(231, 188, 97, 0.42);
}

/* ORACLE INTERACTIVE 3D FLIP CARD */
.oracle-flip-scene {
  perspective: 1200px;
  width: 270px;
  height: 410px;
  margin: 1rem auto 1.4rem;
  cursor: pointer;
}

.oracle-flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.oracle-flip-card.flipped {
  transform: rotateY(180deg);
}

.oracle-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 18px;
  border: 1.5px solid var(--gold);
  overflow: hidden;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.65);
}

.oracle-back {
  background: radial-gradient(circle at 50% 35%, #2b2240, #0d0b16 75%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.oracle-front {
  transform: rotateY(180deg);
  background: #0d0b16;
}

.oracle-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.8rem 1.5rem 5.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.contact-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin: 1.2rem 0 1.8rem;
}

.credit-line {
  margin-top: 1.2rem;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.credit-line a {
  color: var(--gold);
  text-decoration: none;
}

@media (max-width: 900px) {
  .top-nav { display: none; }
  .manifesto-grid, .artwork-detail-grid { grid-template-columns: 1fr; }
  .soul-arch { width: 256px; padding: 1.65rem 1.15rem 1.3rem; }
  .hearth-title { font-size: 1.65rem; }
  .live-event-pill { font-size: 0.68rem; width: max-content; max-width: 92vw; }
}
