:root {
  --bg: #0c0a12;
  --bg-soft: #120e1e;
  --card: rgba(167, 139, 250, 0.07);
  --card-border: rgba(167, 139, 250, 0.18);
  --violet: #a78bfa;
  --violet-strong: #7c3aed;
  --violet-soft: rgba(167, 139, 250, 0.55);
  --pink: #f472b6;
  --pink-soft: rgba(244, 114, 182, 0.5);
  --text: #f5f3fb;
  --text-secondary: rgba(245, 243, 251, 0.68);
  --text-tertiary: rgba(245, 243, 251, 0.58);
  --radius-card: 22px;
  --radius-small: 14px;
  --radius-pill: 999px;
  --max-width: 720px;
  --max-width-wide: 1120px;
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--violet);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 64px;
}

header.site-header {
  padding: 28px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--card-border);
  background: var(--card);
  border-radius: var(--radius-pill);
  padding: 3px;
  flex-shrink: 0;
}

.lang-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  transition: background 0.15s, color 0.15s;
}

.lang-btn.active {
  background: var(--violet-strong);
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: block;
}

.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.2px;
  background: linear-gradient(120deg, var(--text) 30%, var(--violet) 75%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text);
}

nav.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

nav.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14.5px;
  cursor: pointer;
}

nav.site-nav a:hover,
nav.site-nav a[aria-current="page"] {
  color: var(--violet);
}

main {
  padding-top: 28px;
}

h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 34px;
  margin: 0 0 6px;
  letter-spacing: -0.6px;
}

.updated {
  color: var(--text-tertiary);
  font-size: 13.5px;
  margin: 0 0 28px;
}

.lede {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 56ch;
}

section.doc-section {
  border-top: 1px solid var(--card-border);
  padding: 22px 0;
}

section.doc-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

section.doc-section h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17.5px;
  color: var(--violet);
  margin: 0 0 10px;
  letter-spacing: 0.1px;
}

section.doc-section p,
section.doc-section ul {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 10px;
}

section.doc-section ul {
  padding-left: 20px;
}

section.doc-section li {
  margin-bottom: 6px;
}

.hero-card {
  margin-top: 24px;
  border: 1px solid var(--card-border);
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 28px;
}

.hero-card p {
  color: var(--text-secondary);
  font-size: 16px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  background: var(--violet-strong);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 13px 20px;
  border-radius: var(--radius-small);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 24px -8px rgba(124, 58, 237, 0.55);
}

.pill-link:hover {
  background: #8b5cf6;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(124, 58, 237, 0.7);
}

.pill-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: var(--radius-small);
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.pill-ghost:hover {
  border-color: var(--pink-soft);
  color: var(--pink);
}

.card-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.card-link {
  border: 1px solid var(--card-border);
  background: var(--card);
  border-radius: var(--radius-small);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  display: block;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.card-link:hover {
  border-color: var(--violet-soft);
  background: rgba(167, 139, 250, 0.12);
  transform: translateY(-2px);
}

.card-link .card-title {
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
}

.card-link .card-desc {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--text-tertiary);
}

footer.site-footer {
  border-top: 1px solid var(--card-border);
  margin-top: 48px;
  padding-top: 20px;
  color: var(--text-tertiary);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}

footer.site-footer a {
  color: var(--text-tertiary);
}

footer.site-footer a:hover {
  color: var(--violet);
}

/* ============================================================
   Home page — gallery / exhibit system
   ============================================================ */

.wrap-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ---------- Hero: AI-native glow ---------- */
.hero-exhibit {
  position: relative;
  padding: 48px 0 12px;
  text-align: center;
  overflow: hidden;
}

.hero-exhibit::before {
  content: "";
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 480px;
  background:
    radial-gradient(closest-side, rgba(167, 139, 250, 0.22), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgba(244, 114, 182, 0.14), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-exhibit > * {
  position: relative;
  z-index: 1;
}

.hero-dome {
  width: 148px;
  height: 148px;
  margin: 0 auto 22px;
  filter: drop-shadow(0 24px 44px rgba(124, 58, 237, 0.35));
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet);
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet-soft));
}

.hero-eyebrow::after {
  background: linear-gradient(90deg, var(--pink-soft), transparent);
}

.hero-exhibit h1 {
  margin-top: 18px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.06;
  max-width: 15ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-exhibit h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-exhibit .lede {
  max-width: 46ch;
  margin: 18px auto 0;
  font-size: 17px;
}

.hero-cta-row {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-cta-row .pill-link,
.hero-cta-row .pill-ghost {
  margin-top: 0;
}

.store-note {
  margin-top: 16px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

/* ---------- Gallery wall ---------- */
.gallery-section {
  padding: 56px 0 8px;
}

.gallery-head {
  max-width: 46ch;
  margin: 0 auto 34px;
  text-align: center;
}

.gallery-head .hero-eyebrow {
  margin-bottom: 12px;
}

.gallery-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(24px, 3.6vw, 30px);
  margin: 0;
  letter-spacing: -0.3px;
}

.gallery-head p {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 15.5px;
}

.gallery-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.exhibit {
  position: relative;
  border-radius: var(--radius-small);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #000;
  cursor: pointer;
  aspect-ratio: 11 / 8;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.exhibit:hover {
  border-color: var(--violet-soft);
  box-shadow: 0 14px 32px -14px rgba(124, 58, 237, 0.55);
}

.exhibit img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

.exhibit img.is-night {
  opacity: 0;
}

.exhibit.is-flipped img.is-day {
  opacity: 0;
}

.exhibit.is-flipped img.is-night {
  opacity: 1;
}

.exhibit-plate {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(12, 10, 18, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
}

.exhibit-plate .name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.2;
}

.exhibit-plate .place {
  display: block;
  font-family: var(--body);
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
  margin-top: 1px;
}

.exhibit-toggle {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(167, 139, 250, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--violet);
}

.exhibit-toggle svg {
  width: 14px;
  height: 14px;
  display: block;
}

.exhibit-toggle .icon-moon {
  display: block;
}

.exhibit-toggle .icon-sun {
  display: none;
}

.exhibit.is-flipped .exhibit-toggle .icon-moon {
  display: none;
}

.exhibit.is-flipped .exhibit-toggle .icon-sun {
  display: block;
}

.gallery-foot-note {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---------- Feature strip ---------- */
.feature-row {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-item {
  text-align: center;
  padding: 4px 12px;
}

.feature-glyph {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 13px;
  border: 1px solid var(--card-border);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--violet);
}

.feature-glyph svg {
  width: 20px;
  height: 20px;
}

.feature-item h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  margin: 0 0 6px;
}

.feature-item p {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin: 0;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 56px 0 0;
}

.legal-head {
  padding-top: 48px;
  text-align: center;
  max-width: 46ch;
  margin: 0 auto;
}

.legal-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 3.2vw, 26px);
  margin: 0;
  letter-spacing: -0.2px;
}

.legal-head p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-tertiary);
}

/* ---------- Scroll reveal ----------
   Content is visible by default (works with JS disabled, for crawlers, and
   before motion.js has a chance to run). motion.js adds "js-reveal" to <html>
   only when it will actually animate (JS available, IntersectionObserver
   supported, no prefers-reduced-motion) — only then do .reveal elements
   start hidden and fade/lift in as they scroll into view. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .pill-link:hover,
  .exhibit:hover,
  .card-link:hover {
    transform: none;
  }
}

@media (max-width: 760px) {
  .gallery-wall {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 26px;
  }
  header.site-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .gallery-wall {
    grid-template-columns: 1fr;
  }
  .hero-dome {
    width: 116px;
    height: 116px;
  }
}
