/* Museum theme. Tokens first; Tailwind utilities in the templates read the same warm
   scale through tailwind.config in base.html, so the two cannot drift apart. */
:root {
  --bg: #0d0b09;
  --surface: #15120e;
  --surface-2: #221d17;
  --line: #3a3228;
  --text: #f3ede2;
  --text-soft: #cfc4b1;
  --muted: #a89a85;
  --accent: #c9a35a;        /* aged brass */
  --accent-bright: #e6c988;
  --ember: #d9722e;
  --radius: 14px;
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', Menlo, Monaco, monospace;
}

body { background: var(--bg); color: var(--text); font-family: var(--font-body); }
h1, h2.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }
code, .mono { font-family: var(--font-mono); }

/* Links in running text are underlined, so they read as links without relying on hue. */
main a:not([class*="bg-"]):not([class*="rounded-xl"]):not([class*="rounded-2xl"]):not(.btn):not(.placard):not(.crumb) {
  color: var(--accent-bright);
  text-decoration: underline;
  text-decoration-color: rgba(201, 163, 90, 0.45);
  text-underline-offset: 3px;
}
main a:not([class*="bg-"]):not([class*="rounded-xl"]):not([class*="rounded-2xl"]):not(.btn):not(.placard):not(.crumb):hover {
  color: #fff3d6;
  text-decoration-color: var(--accent-bright);
}
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }

/* Nav */
.site-nav { border-bottom: 1px solid var(--line); background: rgba(13, 11, 9, 0.86); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 30; }
.wordmark { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--text); text-decoration: none; }
.wordmark .dot { color: var(--accent); }

/* Crumb (back-link): a small pill at the top of every sub-page */
.crumb { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; margin-bottom: 16px;
         border-radius: 999px; border: 1px solid var(--line); font-size: 0.78rem; color: var(--muted);
         transition: all 120ms; text-decoration: none; }
.crumb:hover { color: var(--text); border-color: var(--muted); background: var(--surface); }
.crumb-substandard:hover { color: #6ee7b7; border-color: #047857; }
.crumb-pilgrims:hover    { color: #fcd34d; border-color: #b45309; }
.crumb-rrrad:hover       { color: #f0abfc; border-color: #86198f; }
.crumb-karmacats:hover   { color: #fdba74; border-color: #c2410c; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
       font-weight: 500; text-decoration: none; transition: transform 150ms, background 150ms, border-color 150ms; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #17120a; }
.btn-primary:hover { background: var(--accent-bright); }
.btn-ghost { border: 1px solid var(--line); color: var(--text-soft); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* Home hero: the gallery photograph runs edge to edge, the headline sits on its dark left wall */
.hero { position: relative; margin: -2.5rem calc(50% - 50vw) 0; min-height: min(78vh, 760px);
        display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
/* The photograph owns the right two thirds and fades into the wall, so the cases never sit under the headline. */
.hero-art { position: absolute; top: 0; bottom: 0; right: 0; left: 36%; width: 64%; height: 100%; object-fit: cover; object-position: 100% 50%;
            -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%); mask-image: linear-gradient(90deg, transparent 0%, #000 22%); }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
               background: linear-gradient(0deg, rgba(13,11,9,0.9) 0%, rgba(13,11,9,0) 26%); }
.hero-copy { position: relative; z-index: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 4rem 1rem; }
.hero-copy > * { max-width: 34rem; }
.eyebrow { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(3rem, 7vw, 5.6rem); line-height: 0.98; margin: 1rem 0 1.25rem; }
.hero h1 em { color: var(--muted); }
.hero p.lede { color: var(--text-soft); font-size: 1.1rem; line-height: 1.65; }

/* Exhibit placards */
.placards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.placard { position: relative; display: block; padding: 22px 22px 20px; border-radius: var(--radius);
           background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border: 1px solid var(--line);
           text-decoration: none; color: inherit; transition: transform 180ms, border-color 180ms; }
.placard::before { content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 2px; background: var(--wing, var(--accent)); }
.placard:hover { transform: translateY(-3px); border-color: var(--wing, var(--accent)); }
.placard-art { display: block; width: calc(100% + 44px); max-width: none; margin: -22px -22px 18px; aspect-ratio: 4 / 3; object-fit: cover;
               border-radius: var(--radius) var(--radius) 0 0;
               -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
.placard:has(.placard-art)::before { display: none; }
/* The case that opens each project page */
.exhibit-art { display: block; width: min(100%, 560px); height: auto; margin: 0 auto 8px; border-radius: var(--radius);
               -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse at 50% 45%, #000 55%, transparent 100%); }
.placard .cat-no { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wing, var(--accent)); }
.placard h2 { font-family: var(--font-display); font-size: 2rem; line-height: 1.05; margin: 10px 0 8px; }
.placard p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.placard .enter { display: inline-block; margin-top: 14px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-soft); }
.placard:hover .enter { color: var(--wing, var(--accent)); }
.wing-karma { --wing: #fb923c; } .wing-subs { --wing: #34d399; } .wing-pilg { --wing: #fbbf24; } .wing-rrad { --wing: #e879f9; }

/* A frieze of real tokens under the hero */
.frieze { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.frieze img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.caption { text-align: center; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--muted); margin-top: 12px; }

.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); margin: 4rem 0; }
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.5rem 1rem; text-align: center;
               font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--muted); }

/* One page-load reveal */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal > * { animation: rise 700ms cubic-bezier(.2,.7,.2,1) both; }
.reveal > *:nth-child(2) { animation-delay: 90ms; } .reveal > *:nth-child(3) { animation-delay: 180ms; }
.reveal > *:nth-child(4) { animation-delay: 270ms; } .reveal > *:nth-child(5) { animation-delay: 360ms; }
@media (prefers-reduced-motion: reduce) { .reveal > *, .btn, .placard { animation: none; transition: none; } }
@media (max-width: 720px) {
  .hero { min-height: 0; }
  .hero-art { left: 0; width: 100%; object-position: 72% 50%; opacity: 0.45; -webkit-mask-image: none; mask-image: none; }
  .hero::after { background: linear-gradient(0deg, rgba(13,11,9,0.95) 0%, rgba(13,11,9,0.5) 100%); }
  .frieze { grid-template-columns: repeat(3, 1fr); }
}

.playground-canvas {
  display: block;
  margin: 0 auto;
  background: var(--surface-2);
  border-radius: 0.75rem;
}

.trait-pick {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  transition: border-color 0.15s, transform 0.15s;
}
.trait-pick:hover { transform: translateY(-2px); }
.trait-pick.selected { border-color: #34d399; }
