*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #010B13;
  --surface: #041C2C;
  --text: #E0FBFC;
  --muted: #98C1D9;
  --primary: #3D5A80;
  --secondary: #293241;
  --accent: #EE6C4D;
  --border: rgba(152, 193, 217, 0.1);
  --max-w: 1280px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --museum-serif: Georgia, "Times New Roman", Times, serif;
  --gallery-sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --exhibition-transition: 0.45s ease;
  --shadow-soft: 0 4px 24px rgba(1, 11, 19, 0.4);
  --shadow-card: 0 8px 32px rgba(1, 11, 19, 0.55);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--gallery-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(61, 90, 128, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(238, 108, 77, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, #021520 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(152, 193, 217, 0.02) 0px, transparent 1px, transparent 48px),
    repeating-linear-gradient(0deg, rgba(152, 193, 217, 0.015) 0px, transparent 1px, transparent 48px);
  pointer-events: none;
  z-index: 0;
}

body.modal-open,
body.nav-open {
  overflow: hidden;
}

a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--exhibition-transition);
}

a:hover {
  color: var(--text);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

main {
  flex: 1;
  position: relative;
  z-index: 1;
}

.disclosure-banner {
  position: relative;
  z-index: 2;
  width: 100%;
  background: var(--accent);
  padding: 8px 16px;
}

.disclosure-text {
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  text-align: center;
  line-height: 1.5;
  max-width: var(--max-w);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 56px;
}

.nav-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  transition: background var(--exhibition-transition), border-color var(--exhibition-transition);
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.nav-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform var(--exhibition-transition), opacity var(--exhibition-transition);
}

.nav-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-burger.open span:nth-child(2) {
  opacity: 0;
}

.nav-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(1, 11, 19, 0.7);
  z-index: 950;
}

.nav-overlay.open {
  display: block;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 960;
  background: var(--surface);
  padding: 80px 24px 40px;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
  overflow-y: auto;
}

.mobile-nav.open {
  display: grid;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 12px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  min-height: 44px;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  margin-bottom: 32px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand img {
  margin-bottom: 12px;
  height: 36px;
  width: auto;
}

.footer-brand p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-content: flex-start;
}

.footer-links a {
  font-size: 13px;
  color: var(--muted);
}

.footer-badges {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.footer-badge img {
  height: 48px;
  width: auto;
}

.footer-disclosure {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-bottom: 16px;
}

.footer-disclosure p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 6px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(152, 193, 217, 0.5);
}

.age-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(1, 11, 19, 0.92);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.age-gate.active {
  display: flex;
}

.age-gate.hidden {
  display: none;
}

.age-gate-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.age-gate-box h2 {
  font-family: var(--museum-serif);
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text);
}

.age-gate-box p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  box-shadow: 0 -8px 32px rgba(1, 11, 19, 0.5);
}

.cookie-banner.active {
  display: block;
}

.cookie-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-inner p {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  min-width: 220px;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--exhibition-transition), transform var(--exhibition-transition);
  font-family: var(--gallery-sans);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #d95a3d;
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.legal-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.legal-content h1 {
  font-family: var(--museum-serif);
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text);
}

.legal-content h2 {
  font-family: var(--museum-serif);
  font-size: 1.25rem;
  margin: 28px 0 12px;
  color: var(--text);
}

.legal-content h3 {
  font-size: 1.05rem;
  margin: 16px 0 8px;
  color: var(--text);
}

.legal-content p {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.7;
}

.legal-content ul {
  margin: 0 0 16px 20px;
  color: var(--muted);
}

.legal-content li {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.6;
}

.contact-form {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form.hidden {
  display: none;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: var(--gallery-sans);
  transition: border-color var(--exhibition-transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-error {
  display: none;
  font-size: 12px;
  color: var(--accent);
  margin-top: 4px;
}

.form-error.visible {
  display: block;
}

.contact-success {
  display: none;
  margin-top: 28px;
  padding: 24px;
  background: rgba(61, 90, 128, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.contact-success.visible {
  display: block;
}

.contact-success h3 {
  font-family: var(--museum-serif);
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text);
}

.contact-success p {
  font-size: 14px;
  color: var(--muted);
}

.go-ad-label {
  position: fixed;
  top: 8px;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  z-index: 10;
}

.go-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  background: var(--bg);
}

.go-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 24px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.go-page h1 {
  font-family: var(--museum-serif);
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: var(--text);
}

.go-page p {
  font-size: 14px;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 8px;
}

.go-compliance {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.go-compliance p {
  font-size: 12px;
  color: rgba(152, 193, 217, 0.6);
}

.error-page {
  text-align: center;
  padding: 80px 24px;
  max-width: 520px;
  margin: 0 auto;
}

.error-page h1 {
  font-family: var(--museum-serif);
  font-size: 5rem;
  color: var(--accent);
  margin-bottom: 16px;
  line-height: 1;
}

.error-page p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 28px;
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }

  .nav-burger {
    display: none;
  }
}

.subpage-hero {
  background: var(--bg);
  padding: 36px 24px;
  text-align: center;
  border-bottom: 8px solid var(--accent);
}

.subpage-hero h1 {
  font-family: var(--museum-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--text);
  font-weight: 400;
  margin-bottom: 10px;
}

.subpage-hero p {
  font-size: 14px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

.guide-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.guide-content h2 {
  font-family: var(--museum-serif);
  font-size: 1.35rem;
  color: var(--text);
  margin: 32px 0 14px;
  font-weight: 400;
}

.guide-content h3 {
  font-family: var(--museum-serif);
  font-size: 1.1rem;
  color: var(--text);
  margin: 20px 0 10px;
}

.guide-content p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 14px;
}

.guide-content ul {
  margin: 0 0 16px 20px;
  color: var(--muted);
}

.guide-content li {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.6;
}

.guide-sidebar-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.guide-sidebar {
  order: -1;
}

.guide-sidebar .art-frame {
  max-width: 500px;
  margin-bottom: 20px;
}

.guide-sidebar .art-frame img {
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  width: 100%;
}

.guide-pullquote {
  padding: 24px 28px;
  border-left: 4px solid var(--accent);
  background: rgba(61, 90, 128, 0.15);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 28px 0;
  font-family: var(--museum-serif);
  font-size: 1.1rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.6;
}

.guide-stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.guide-stat {
  text-align: center;
  padding: 20px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.guide-stat strong {
  display: block;
  font-family: var(--museum-serif);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 6px;
}

.guide-stat span {
  font-size: 12px;
  color: var(--muted);
}

.guide-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}

.guide-mosaic .mosaic-item {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-height: 320px;
}

.guide-mosaic .mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 320px;
}

.guide-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 28px 0;
}

.guide-rail-img {
  max-width: 500px;
}

.guide-rail-img img {
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  width: 100%;
}

.guide-callout {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 24px 0;
}

.guide-callout h3 {
  margin-top: 0;
}

.guide-hero-strip {
  background: var(--surface);
  padding: 32px 24px;
  border-bottom: 1px solid var(--border);
}

.guide-hero-strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.guide-hero-strip .strip-visual {
  flex: 0 0 280px;
  max-width: 500px;
}

.guide-hero-strip .strip-visual img {
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  width: 100%;
}

.guide-hero-strip .strip-text {
  flex: 1;
  min-width: 240px;
}

.guide-hero-strip .strip-text h1 {
  font-family: var(--museum-serif);
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 10px;
}

.guide-hero-strip .strip-text p {
  font-size: 14px;
  color: var(--muted);
}

.bonus-gallery-layout .exhibition-plaque {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

.withdraw-rail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

.slots-museum-layout .gallery-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 28px 0;
}

.slots-museum-layout .guide-sidebar-layout {
  padding-top: 48px;
}

.slots-quote-band {
  padding: 32px 28px;
  background: rgba(61, 90, 128, 0.18);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: 28px 0;
}

.slots-quote-band p {
  max-width: 600px;
  font-family: var(--museum-serif);
  font-size: 1.05rem;
  color: var(--text);
  font-style: italic;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .guide-sidebar-layout {
    grid-template-columns: 260px 1fr;
  }

  .guide-sidebar {
    order: 0;
  }

  .guide-split {
    grid-template-columns: 1fr 340px;
  }

  .withdraw-rail-layout {
    grid-template-columns: 1fr 300px;
  }

  .slots-museum-layout .gallery-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .guide-mosaic {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 375px) {
  .guide-sidebar .art-frame,
  .guide-hero-strip .strip-visual,
  .guide-rail-img,
  .guide-mosaic .mosaic-item,
  .withdraw-rail-layout .art-frame {
    max-width: 100%;
    overflow: hidden;
  }

  .guide-sidebar .art-frame img,
  .guide-hero-strip .strip-visual img,
  .guide-rail-img img,
  .guide-mosaic .mosaic-item img,
  .withdraw-rail-layout .art-frame img {
    max-width: 100%;
    max-height: 200px;
  }
}
