/*
  maxxwell-styles.css
  Shared stylesheet — Maxxwell's Equations
  ubiqtek.biz/maxxwell/
  © 2026 Patricia Carando / Five Nines Press
*/

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Share+Tech+Mono&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

/* ── CSS VARIABLES ── */
:root {
  --gold: #c9a84c;
  --gold-dim: rgba(201,168,76,0.3);
  --gold-faint: rgba(201,168,76,0.08);
  --teal: #2dd4bf;
  --phosphor: #00ff41;
  --phosphor-dim: #00aa2a;
  --phosphor-faint: #004d14;
  --amber: #ffb700;
  --red: #ff4444;
  --silver: #c0c0c0;
  --dark: #0a0800;
  --darker: #060400;
  --text-primary: #f0e8d4;
  --text-secondary: rgba(240,232,212,0.75);
  --text-muted: rgba(240,232,212,0.4);
  --border: rgba(201,168,76,0.15);
  --border-warm: rgba(201,168,76,0.25);
  --mono: 'Share Tech Mono', monospace;
  --serif: 'Cormorant Garamond', serif;
  --courier: 'Courier Prime', monospace;
}

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

/* ── BASE ── */
body {
  background: var(--darker);
  color: var(--text-primary);
  font-family: var(--serif);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NAV BAR ── */
.nav-bar {
  background: rgba(0,8,0,0.95);
  border-bottom: 1px solid var(--phosphor-faint);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
}

.nav-label {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--phosphor-dim);
  letter-spacing: 0.1em;
  border-right: 1px solid var(--phosphor-faint);
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--mono);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  color: var(--phosphor);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.08em;
  border-right: 1px solid var(--phosphor-faint);
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--phosphor);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-item:hover { background: rgba(0,255,65,0.05); }
.nav-item:hover::before { transform: scaleX(1); }

.nav-item.gold:hover { color: var(--gold); background: rgba(201,168,76,0.05); }
.nav-item.gold:hover::before { background: var(--gold); }

.nav-item.teal:hover { color: var(--teal); background: rgba(45,212,191,0.05); }
.nav-item.teal:hover::before { background: var(--teal); }

.nav-item.amber:hover { color: var(--amber); background: rgba(255,183,0,0.05); }
.nav-item.amber:hover::before { background: var(--amber); }

.nav-index {
  color: var(--phosphor-dim);
  font-size: 12px;
}

.nav-status {
  margin-left: auto;
  padding: 10px 20px;
  font-size: 12px;
  color: var(--phosphor-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--phosphor);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── BODY WRAP ── */
.body-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

/* ── SECTION LABELS ── */
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: var(--border);
}

/* ── METADATA BAR ── */
.meta-bar {
  display: flex;
  gap: 32px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 48px;
  padding: 24px 0;
  flex-wrap: wrap;
}

.meta-item { display: flex; flex-direction: column; gap: 4px; }

.meta-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-value {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--text-secondary);
}

.meta-value.gold { color: var(--gold); }

/* ── SYNOPSIS / BODY TEXT ── */
.synopsis-text {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ── EXCERPT ── */
.excerpt-body {
  padding-left: 16px;
  border-left: 2px solid var(--gold-dim);
}

.excerpt-text {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-secondary);
  font-weight: 300;
  font-style: italic;
}

.excerpt-text p { margin-bottom: 1.4em; }
.excerpt-text p:last-child { margin-bottom: 0; }

.excerpt-note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gold);
  opacity: 0.6;
  margin-top: 20px;
  font-style: normal;
  display: block;
}

.excerpt-source {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 8px;
  display: block;
}

/* ── CHARACTER CARDS ── */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.character-card {
  border: 0.5px solid var(--border);
  padding: 16px;
  background: var(--gold-faint);
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
  color: inherit;
  cursor: pointer;
}

.character-card:hover {
  border-color: rgba(201,168,76,0.5);
  background: rgba(201,168,76,0.08);
  text-decoration: none;
  color: inherit;
}

.character-card:visited { color: inherit; text-decoration: none; }

.character-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.character-role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.character-desc {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
}

.character-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.2s;
  display: block;
  margin-top: 8px;
}

.character-card:hover .character-link { opacity: 1; }

/* ── CTA SECTION ── */
.cta-section { text-align: center; padding: 16px 0; }

.cta-text {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 520px;
  margin: 0 auto 28px;
}

.cta-btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--gold);
  border: 0.5px solid var(--gold-dim);
  padding: 14px 32px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cta-btn:hover {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
}

/* ── PAGE SECTION WRAPPER ── */
.section {
  padding: 0 0 48px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 48px;
}

/* ── HERO IMAGE ── */
.location-hero {
  width: 100%;
  height: 540px;
  position: relative;
  overflow: hidden;
}

.location-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: saturate(0.88) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6,4,0,0.1) 0%,
    rgba(6,4,0,0.25) 50%,
    rgba(6,4,0,0.88) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 60px;
}

.location-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.location-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.location-name {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.location-subtitle {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 300;
  font-style: italic;
  color: rgba(240,232,212,0.6);
}

/* ── FLOATING FIGURES BUTTON ── */
#figures-btn {
  position: fixed;
  right: 0; top: 50%;
  transform: translateY(-50%);
  z-index: 500;
  writing-mode: vertical-rl;
  background: rgba(0,8,0,0.95);
  border: 1px solid var(--gold);
  border-right: none;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.15em;
  padding: 20px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

#figures-btn:hover {
  background: rgba(201,168,76,0.1);
  box-shadow: -4px 0 20px rgba(201,168,76,0.2);
}

/* ── PAGE FOOTER ── */
.page-footer {
  max-width: 1000px;
  margin: 48px auto 0;
  padding: 20px 32px;
  border-top: 1px solid var(--phosphor-faint);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--phosphor-faint);
  letter-spacing: 0.1em;
  font-family: var(--mono);
  margin-bottom: 48px;
}

/* ── SCANLINES ── */
body::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.025) 2px, rgba(0,0,0,0.025) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── LIGHTBOX — IMAGES ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 32px;
  cursor: zoom-out;
}

#lightbox.open { display: flex; }

#lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 0 60px rgba(0,255,65,0.1);
}

#lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  color: var(--phosphor-dim);
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--mono);
  transition: color 0.2s;
}

#lightbox-close:hover { color: var(--phosphor); }

#lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--phosphor-faint);
  letter-spacing: 0.1em;
  white-space: nowrap;
  font-family: var(--mono);
}

/* ── LIGHTBOX — VIDEO ── */
#video-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 1001;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#video-lightbox.open { display: flex; }

#video-container {
  position: relative;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#video-container iframe {
  box-shadow: 0 0 60px rgba(201,168,76,0.15);
  max-width: 90vw;
  max-height: 80vh;
}

#video-caption {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.15em;
  font-family: var(--mono);
}

#video-lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  color: var(--phosphor-dim);
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--mono);
  transition: color 0.2s;
  z-index: 10;
}

#video-lightbox-close:hover { color: var(--phosphor); }

/* ── UTILITY ── */
.gold { color: var(--gold); }
.teal { color: var(--teal); }
.phosphor { color: var(--phosphor); }
.muted { color: var(--text-muted); }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
