@font-face {
  font-family: "Prata";
  src: url("/assets/fonts/prata-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --void: #0a0809;
  --burgundy: #1a0f14;
  --rouge: #b85c38;
  --copper: #c9a87c;
  --violet: #6b4d8a;
  --ink: #f0ebe3;
  --muted: rgba(240, 235, 227, 0.58);
  --faint: rgba(240, 235, 227, 0.32);
  --line: rgba(201, 168, 124, 0.16);
  --display: "Prata", Georgia, serif;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --content: 64rem;
  --gutter: clamp(1rem, 4vw, 1.5rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
html, body { min-height: 100%; }
body {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink);
  background: var(--void);
  overflow-x: clip;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--rouge); color: #fff; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 3px;
}

.spectrum {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 85% 15%, rgba(107, 77, 138, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 85%, rgba(184, 92, 56, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(26, 15, 20, 0.9), transparent 70%),
    linear-gradient(155deg, #120c10 0%, var(--void) 45%, #080607 100%);
}
.monogram {
  position: fixed;
  right: -8%;
  top: 50%;
  translate: 0 -50%;
  z-index: 0;
  pointer-events: none;
  font-family: var(--display);
  font-size: clamp(14rem, 40vw, 28rem);
  line-height: 1;
  color: rgba(201, 168, 124, 0.04);
  user-select: none;
  rotate: -12deg;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    clamp(1.25rem, 4vw, 2rem)
    max(var(--gutter), env(safe-area-inset-right))
    clamp(1.5rem, 5vw, 2.5rem)
    max(var(--gutter), env(safe-area-inset-left));
}

.ledger {
  width: min(var(--content), 100%);
  container-type: inline-size;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(26, 15, 20, 0.92), rgba(10, 8, 9, 0.96));
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.ledger-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.7rem clamp(1rem, 3vw, 1.35rem);
  border-bottom: 1px solid var(--line);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  background: rgba(0, 0, 0, 0.35);
}
.ledger-bar .open {
  color: var(--copper);
}

.ledger-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: clamp(1rem, 3vw, 1.25rem) clamp(1rem, 3.5vw, 1.5rem);
  border-bottom: 1px solid var(--line);
}
.ledger-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.ledger-mark {
  width: 1.85rem;
  height: 1.85rem;
  object-fit: contain;
  flex-shrink: 0;
}
.ledger-brand span {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.ledger-id {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.ledger-body {
  padding: clamp(1.35rem, 4vw, 2rem) clamp(1rem, 3.5vw, 1.5rem);
}

.provenance {
  display: inline-block;
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rouge);
  border-bottom: 1px solid rgba(184, 92, 56, 0.45);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.25rem, 4vw, 2.25rem);
  align-items: start;
  margin-bottom: 1.75rem;
}
.hero-copy { min-width: 0; }

.hero-copy h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 1rem + 7.5cqw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  margin-bottom: 0.55rem;
}
.hero-copy h1 .dot {
  color: var(--copper);
}

.epigraph {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  color: var(--muted);
  margin-bottom: 1rem;
  max-width: 36ch;
}

.lead {
  font-size: clamp(0.92rem, 2.1vw, 1rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 40ch;
}
.lead em {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink);
}

.glass-frame {
  min-width: 0;
  position: relative;
  padding: 1px;
  background: linear-gradient(145deg, rgba(201, 168, 124, 0.55), rgba(107, 77, 138, 0.35), rgba(184, 92, 56, 0.4));
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.glass-inner {
  background: rgba(10, 8, 9, 0.75);
  padding: 0.5rem;
  backdrop-filter: blur(8px);
}
.glass-inner img {
  display: block;
  width: 100%;
  height: auto;
}
.glass-caption {
  margin-top: 0.5rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.tag {
  min-width: 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}
.tag .key {
  display: block;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.15rem;
}
.tag .val {
  display: block;
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.tag .val.hot { color: var(--rouge); }

.transfer {
  padding: clamp(1.15rem, 3.5vw, 1.5rem);
  border-top: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(184, 92, 56, 0.12), transparent 42%),
    rgba(0, 0, 0, 0.22);
}
.transfer h2 {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  font-weight: 400;
  margin-bottom: 0.3rem;
}
.transfer .sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 1rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.65rem 1.35rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.actions a:first-child {
  color: var(--void);
  background: var(--copper);
  border-color: var(--copper);
}
.actions a:first-child:hover {
  background: #d4b88a;
  border-color: #d4b88a;
}
.actions a.secondary {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}
.actions a.secondary:hover {
  border-color: var(--copper);
  background: rgba(201, 168, 124, 0.08);
}
.mail-line {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.mail-line a {
  color: var(--copper);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.mail-line a:hover { color: var(--rouge); }

.disclaimer {
  font-size: 0.68rem;
  line-height: 1.6;
  color: var(--faint);
  max-width: 42rem;
}

.site-foot {
  padding: 0.85rem clamp(1rem, 3.5vw, 1.5rem) 1.1rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .glass-frame { order: -1; }
  .monogram {
    right: 50%;
    translate: 50% -50%;
    opacity: 0.5;
    font-size: clamp(10rem, 50vw, 16rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* 404 */
.error {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}
.error-card {
  width: min(22rem, 100%);
  text-align: center;
  padding: clamp(1.75rem, 5vw, 2.25rem);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(26, 15, 20, 0.95), rgba(10, 8, 9, 0.98));
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5);
}
.error-mark {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  margin: 0 auto 1rem;
}
.error-card h1 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 10vw, 3.25rem);
  color: var(--rouge);
  margin-bottom: 0.5rem;
}
.error-card p {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}
.error-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.65rem 1.35rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--void);
  background: var(--copper);
  border: 1px solid var(--copper);
}
.error-card a:hover {
  background: #d4b88a;
  border-color: #d4b88a;
}
