/* ============================================
   THE POWER OF DEFAULTS
   Main Stylesheet
   ============================================ */

:root {
  --bg:           #0c0c0e;
  --surface:      #111116;
  --card:         #16161e;
  --card-hover:   #1c1c26;
  --border:       #22222e;
  --border-light: #2e2e3e;

  --text:         #ede8e0;
  --text-muted:   #9e99ad;
  --text-dim:     #7c7a8f;

  --accent:       #d4a843;
  --accent-hover: #e0b84d;
  --accent-dim:   rgba(212, 168, 67, 0.12);

  --blue:         #4a90e2;
  --blue-dim:     rgba(74, 144, 226, 0.12);

  --success:      #4ae28a;
  --success-dim:  rgba(74, 226, 138, 0.10);

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  --max-width:  1200px;
  --max-narrow: 720px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 180ms ease;
  --t-mid:  360ms ease;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: clamp(2.8rem, 7vw, 6rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: var(--max-narrow);
  margin: 0 auto;
}

.section {
  padding: 7rem 0;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: rgba(12, 12, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast);
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  transition: opacity var(--t-fast);
}

.nav-logo:hover { opacity: 0.8; }

.nav-logo-mark {
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
}

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

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t-fast);
  white-space: nowrap;
}

.nav-links a:hover { color: var(--text); }

.nav-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: none;
  border: none;
}

.nav-menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: var(--t-fast);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 5rem;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 30px 30px;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  height: 180px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}

.hero-content {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.05;
}

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.65;
  margin: 0;
}

/* ============================================
   DEMO CARD
   ============================================ */

.demo-container {
  width: 100%;
  max-width: 420px;
}

.demo-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.4),
    0 24px 64px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.03);
  opacity: 0;
  transform: translateY(18px);
  animation: demoRise 0.55s var(--ease-out) 1s forwards;
}

@keyframes demoRise {
  to { opacity: 1; transform: translateY(0); }
}

.demo-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  text-align: center;
  padding: 0.38rem 1rem;
  border-bottom: 1px solid var(--border);
}

.demo-front {
  padding: 1.4rem;
}

.demo-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.demo-app-logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.demo-close {
  font-size: 1.1rem;
  color: var(--text-dim);
  cursor: not-allowed;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.5;
}

.demo-body h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.6rem;
  text-align: left;
  line-height: 1.3;
}

.demo-body > p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: left;
  margin-bottom: 1rem;
}

.demo-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.2rem;
  padding: 0.8rem;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.demo-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  cursor: default;
  user-select: none;
}

.demo-check {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: default;
  pointer-events: none;
}

.demo-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.btn-accept {
  background: var(--accent);
  color: #0c0c0e;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  width: 100%;
  transition: background var(--t-fast), transform var(--t-fast);
  letter-spacing: 0.01em;
}

.btn-accept:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-manage {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0.3rem;
  transition: color var(--t-fast);
}

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

/* Demo Reveal */
.demo-reveal {
  padding: 1.4rem;
  animation: fadeUp 0.35s var(--ease-out);
}

.demo-reveal.accepted { border-top: 2px solid var(--accent); }
.demo-reveal.managed  { border-top: 2px solid var(--success); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.demo-stat {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.demo-reveal.accepted .demo-stat { color: var(--accent); }
.demo-reveal.managed  .demo-stat { color: var(--success); }

.demo-headline {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  text-align: left;
}

.demo-body-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  text-align: left;
  margin-bottom: 0.75rem;
}

.demo-replay {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.demo-replay:hover {
  color: var(--text-muted);
  border-color: var(--border-light);
}

/* Scroll Cue */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-dim);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  transition: color var(--t-fast);
  animation: scrollBounce 2.4s ease-in-out infinite 2.5s;
}

.scroll-cue:hover { color: var(--text-muted); }

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

/* ============================================
   INTRO SECTION
   ============================================ */

.intro {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  align-items: start;
}

.intro-text h2 {
  margin-bottom: 1.25rem;
}

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

.intro-text .lead {
  color: var(--text);
  margin-bottom: 1rem;
}

/* Read More */
.read-more-block {
  margin-top: 1.5rem;
}

.read-more-content {
  margin-bottom: 1.25rem;
  border-left: 2px solid var(--border-light);
  padding-left: 1.25rem;
}

.read-more-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.read-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  transition: color var(--t-fast);
  padding: 0;
  background: none;
  border: none;
}

.read-more-toggle:hover { color: var(--accent-hover); }

.read-more-toggle svg {
  transition: transform var(--t-mid);
}

.read-more-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Stat card */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  position: sticky;
  top: 5.5rem;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.stat-source {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ============================================
   EXHIBITS GRID
   ============================================ */

.section-title {
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

.exhibits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.exhibit-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-fast), background var(--t-fast), transform 0.3s var(--ease-out);
  /* entrance animation */
  opacity: 0;
  transform: translateY(16px);
}

.exhibit-card.visible {
  animation: cardEnter 0.5s var(--ease-out) calc(var(--i, 0) * 75ms) both;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.exhibit-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.exhibit-card:hover {
  border-color: var(--border-light);
  background: var(--card-hover);
  transform: translateY(-4px);
}

.exhibit-card:hover::before {
  transform: scaleX(1);
}

.exhibit-card--featured {
  border-color: var(--accent-dim);
}

.exhibit-card--featured::before {
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.exhibit-number {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
}

.exhibit-icon {
  color: var(--accent);
  margin-bottom: 1.25rem;
  opacity: 0.75;
  transition: opacity var(--t-fast);
}

.exhibit-card:hover .exhibit-icon { opacity: 1; }

.exhibit-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.exhibit-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.5rem;
}

.exhibit-cta {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: auto;
}

.exhibit-cta .arrow {
  display: inline-block;
  transition: transform var(--t-fast);
}

.exhibit-card:hover .arrow { transform: translateX(4px); }

/* ============================================
   STATS STRIP
   ============================================ */

.stats-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.stat-divider {
  width: 1px;
  height: 72px;
  background: var(--border);
}

.stat-item {
  text-align: center;
}

.stat-big {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.75rem);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.stat-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 210px;
  margin: 0 auto;
}

/* ============================================
   ABOUT / CTA
   ============================================ */

.about {
  text-align: center;
}

.about h2 { margin-bottom: 1.25rem; }

.about .lead { margin-bottom: 1rem; }

.about p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #0c0c0e;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  letter-spacing: 0.01em;
  transition: background var(--t-fast), transform var(--t-fast);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.75fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.footer-nav h4,
.footer-info h4 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
  font-weight: 500;
}

.footer-nav nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.footer-nav a:hover { color: var(--text); }

.footer-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
  text-align: center;
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .exhibits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .section { padding: 5rem 0; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 2rem;
    gap: 1.1rem;
  }

  .nav-links.open { display: flex; }

  .nav-menu-toggle { display: flex; }

  .exhibits-grid { grid-template-columns: 1fr; }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .stat-item { padding: 2rem 0; }

  .stat-divider {
    width: 60px;
    height: 1px;
    margin: 0 auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand { grid-column: auto; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .hero { padding: 7rem 1.25rem 4rem; }
}
