/* ══════════════════════════════════════════════════════════════════════════
   aureum.css — shared design system · aureumcity.com
   Link this file in every page. Page-specific CSS stays in each <style> block.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── FONTS ─────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500&family=Oswald:wght@400;500;600;700&display=swap');

/* ── TOKENS ────────────────────────────────────────────────────────────── */
:root {
  /* Palette */
  --deep:       #0e0b06;
  --deep2:      #181410;
  --ink:        #1e1a12;
  --parchment:  #f0ebe0;
  --gold:       #c5a05a;
  --gold-lt:    #d4ba85;
  --gold-deep:  #8a7040;
  --verdigris:  #4a6b60;

  /* Type families */
  --t-mark:    'Oswald', sans-serif;
  --t-tag:     'Jost', sans-serif;
  --t-display: 'Oswald', sans-serif;
  --t-body:    'Jost', sans-serif;
}

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

/* ── BASE ──────────────────────────────────────────────────────────────── */
html, body { height: 100%; }
body {
  font-family: var(--t-tag);
  background: var(--deep);
  color: var(--parchment);
  cursor: none;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }

/* ── CURSOR ────────────────────────────────────────────────────────────── */
.cursor {
  position: fixed; width: 8px; height: 8px;
  background: var(--gold); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  position: fixed; width: 28px; height: 28px;
  border: 1px solid var(--gold); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  opacity: 0.5; transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring { width: 44px; height: 44px; opacity: 0.3; }

/* ── CANVAS + FRAME ────────────────────────────────────────────────────── */
.canvas {
  position: fixed; inset: 20px;
  border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--deep);
}
.frame {
  position: fixed; inset: 20px;
  border: 1px solid rgba(197,160,90,0.35);
  border-radius: 12px; pointer-events: none; z-index: 6;
}
.frame-mark { position: absolute; background: rgba(197,160,90,0.55); }
.frame-mark.top, .frame-mark.bottom { left: 50%; width: 24px; height: 1px; transform: translateX(-50%); }
.frame-mark.top    { top: -1px; }
.frame-mark.bottom { bottom: -1px; }
.frame-mark.left, .frame-mark.right { display: none; }

/* ── DEVICE GATE — desktop-only pages show this on small screens ─────── */
.device-gate {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px;
  background: var(--deep); cursor: auto;
}
.device-gate-mark {
  font-family: var(--t-mark);
  font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold-lt); margin-bottom: 28px;
}
.device-gate-title {
  font-family: var(--t-mark);
  font-size: clamp(22px, 6vw, 30px); font-weight: 700; line-height: 1.2;
  text-transform: uppercase; margin-bottom: 16px; max-width: 360px;
}
.device-gate-sub {
  font-family: var(--t-body);
  font-size: 14px; line-height: 1.6;
  color: rgba(240,235,224,0.7); max-width: 320px;
}

/* ── TOP NAV ───────────────────────────────────────────────────────────── */
.top-nav {
  display: flex; align-items: center;
  padding: 22px clamp(28px, 4vw, 56px) 20px;
  border-bottom: 1px solid rgba(197,160,90,0.18);
  background: rgba(14,11,6,0.92);
  position: relative; z-index: 5; flex: none;
}
.nav-brand {
  font-family: var(--t-tag); font-weight: 500;
  font-size: clamp(15px, 1.4vw, 18px); letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold-lt); text-decoration: none;
  padding-right: clamp(20px, 3vw, 40px); margin-right: clamp(20px, 3vw, 40px);
  border-right: 1px solid rgba(197,160,90,0.25);
  cursor: none; transition: color 0.3s ease;
}
.nav-brand:hover { color: var(--parchment); }
.tab {
  position: relative;
  padding: 8px clamp(18px, 3.5vw, 36px) 10px;
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--t-tag); font-weight: 500;
  font-size: clamp(13px, 1.2vw, 15px); letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(240,235,224,0.55); text-decoration: none;
  cursor: none; transition: color 0.3s ease;
}
.tab + .tab::before {
  content: ''; position: absolute; left: 0; top: 18%; bottom: 18%;
  width: 1px; background: rgba(197,160,90,0.16);
}
.tab-num {
  font-family: var(--t-tag);
  font-size: 9px; font-weight: 500; letter-spacing: 0.28em;
  color: rgba(212,186,133,0.5); transition: color 0.3s;
}
.tab:hover             { color: var(--parchment); }
.tab:hover .tab-num    { color: var(--gold-lt); }
.tab.is-active         { color: var(--parchment); }
.tab.is-active .tab-num { color: var(--gold-lt); }
.tab.is-active::after {
  content: ''; position: absolute; left: 50%; bottom: -1px;
  transform: translateX(-50%);
  width: 24px; height: 1px;
  background: var(--gold);
  box-shadow: 0 0 8px 1px rgba(197,160,90,0.55);
}

/* language picker */
.lang-select { position: relative; margin-left: auto; }
.lang-trigger {
  display: flex; align-items: center; gap: 7px;
  background: none; border: none;
  font-family: var(--t-tag);
  font-size: 10px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(240,235,224,0.4); white-space: nowrap;
  cursor: none; padding: 4px 2px; transition: color 0.25s ease;
}
.lang-trigger:hover { color: var(--gold-lt); }
.lang-select.is-open .lang-trigger { color: var(--gold-lt); }
.lang-trigger-icon { width: 14px; height: 14px; flex: none; }
.lang-trigger-arrow { font-size: 8px; transition: transform 0.25s ease; }
.lang-select.is-open .lang-trigger-arrow { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 140px;
  background: rgba(14,11,6,0.97);
  border: 1px solid rgba(197,160,90,0.3); border-radius: 8px;
  padding: 6px; margin: 0; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 20;
}
.lang-select.is-open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  font-family: var(--t-tag);
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: none;
  color: rgba(240,235,224,0.65); padding: 8px 10px; border-radius: 5px;
  cursor: none; transition: background 0.2s ease, color 0.2s ease;
}
.lang-option:hover    { background: rgba(197,160,90,0.12); color: var(--parchment); }
.lang-option.is-selected { color: var(--gold-lt); }

/* ── ENTRANCE ANIMATION ────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.on-load   { opacity: 0; animation: fadeUp 0.7s cubic-bezier(0.16,1,0.3,1) forwards; }
.on-load-1 { animation-delay: 0.10s; }
.on-load-2 { animation-delay: 0.25s; }
.on-load-3 { animation-delay: 0.40s; }
.on-load-4 { animation-delay: 0.55s; }

/* ── CHAPTER READING LAYOUT ────────────────────────────────────────────── */
.chapter-stage { flex: 1; overflow-y: auto; }
.chapter-hero-banner {
  position: relative; width: 100%;
  height: clamp(200px, 30vw, 360px);
  background-size: cover; background-position: center;
  filter: brightness(0.7) saturate(1.05);
}
.chapter-hero-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,11,6,0) 35%, rgba(14,11,6,0.95) 100%);
}
.chapter-content {
  width: 100%; max-width: 700px; margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 40px) clamp(72px, 10vw, 120px);
}
.chapter-content.has-banner { padding-top: clamp(32px, 5vw, 56px); }
.chapter-kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--t-tag);
  font-size: 10px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase;
  color: rgba(212,186,133,0.65); margin-bottom: 22px;
}
.chapter-kicker .rule { width: 1px; height: 11px; background: rgba(197,160,90,0.4); }
.chapter-title {
  font-family: var(--t-display);
  font-size: clamp(28px, 4.6vw, 46px); font-weight: 700;
  line-height: 1.16; letter-spacing: -0.005em; text-transform: uppercase;
  color: var(--parchment); margin-bottom: 14px;
}
.chapter-dates {
  font-family: var(--t-body);
  font-size: 15px; color: rgba(240,235,224,0.55); margin-bottom: 22px;
}
.chapter-hero-rule {
  display: block; width: 40px; height: 2px;
  background: var(--gold); margin-bottom: clamp(40px, 6vw, 64px);
}
.chapter-section { margin-top: clamp(40px, 6vw, 64px); }
.chapter-section:first-of-type { margin-top: 0; }
.chapter-section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.chapter-section-num {
  font-family: var(--t-display);
  font-size: 22px; font-weight: 600;
  color: rgba(197,160,90,0.45); flex: none;
}
.chapter-section-title {
  font-family: var(--t-mark);
  font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-lt);
}
.chapter-body p {
  font-family: var(--t-body);
  font-size: 16px; line-height: 1.85;
  color: rgba(240,235,224,0.8); margin-bottom: 18px;
}
.chapter-body p:last-child { margin-bottom: 0; }
.chapter-body em { color: rgba(240,235,224,0.95); }
.chapter-dropcap::first-letter {
  font-family: var(--t-display);
  font-size: 3.6em; font-weight: 700;
  float: left; line-height: 0.82;
  padding-right: 10px; padding-top: 5px;
  color: var(--gold-lt);
}
.note-ref { color: var(--gold-lt); text-decoration: none; font-weight: 600; }
.note-ref:hover { color: var(--parchment); }
.chapter-notes {
  margin-top: clamp(56px, 8vw, 88px);
  padding-top: 28px; border-top: 1px solid rgba(197,160,90,0.2);
}
.chapter-notes-label {
  font-family: var(--t-mark);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(212,186,133,0.6); margin-bottom: 16px;
}
.chapter-notes ol {
  font-family: var(--t-tag);
  font-size: 11.5px; line-height: 1.85;
  color: rgba(240,235,224,0.45); padding-left: 20px;
}
.chapter-notes li { margin-bottom: 10px; }
.chapter-notes li::marker { color: rgba(197,160,90,0.5); }
.note-back { color: var(--gold-lt); text-decoration: none; margin-left: 5px; }
.chapter-pagenav {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; flex-wrap: wrap;
  margin-top: clamp(56px, 8vw, 88px);
  padding-top: 24px; border-top: 1px solid rgba(197,160,90,0.15);
}
.chapter-pagenav a {
  font-family: var(--t-mark);
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(240,235,224,0.6); text-decoration: none; transition: color 0.25s ease;
}
.chapter-pagenav a:hover { color: var(--gold-lt); }
.chapter-pagenav .next { text-align: right; }
.chapter-pagenav .pagenav-label {
  display: block;
  font-family: var(--t-tag);
  font-size: 9px; letter-spacing: 0.2em;
  color: rgba(212,186,133,0.5); margin-bottom: 6px;
}
.chapter-pagenav .middle { font-size: 11px; color: rgba(240,235,224,0.4); align-self: center; }

/* ── ENTRY LIST (used in chapter + history index pages) ────────────────── */
.entry-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.entry-list li {
  font-family: var(--t-body);
  font-size: 15px; line-height: 1.75;
  color: rgba(240,235,224,0.78); padding-left: 22px; position: relative;
}
.entry-list li::before { content: '—'; position: absolute; left: 0; color: rgba(212,186,133,0.5); font-size: 13px; }
.entry-list li strong { color: rgba(240,235,224,0.95); font-weight: 600; }
.entry-list li em     { color: rgba(240,235,224,0.9); }

/* ── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .nav-brand { padding-right: 16px; margin-right: 16px; font-size: 13px; }
  .lang-select { display: none; }
}
@media (max-width: 768px) {
  .device-gate { display: flex; }
  .frame, .canvas, .cursor, .cursor-ring { display: none; }
}
@media (max-width: 600px) {
  .canvas { inset: 12px; border-radius: 10px; }
  .frame  { inset: 12px; border-radius: 10px; }
  .top-nav { padding: 16px 12px 14px; }
  .tab { padding: 6px 10px 8px; font-size: 11px; letter-spacing: 0.18em; }
  .tab-num { display: none; }
}
