@font-face {
  font-family: 'RealmUncial';
  src: url('/assets/RealmUncial-Regular.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bg-top: #faf1db;
  --bg-mid: #f2e3c1;
  --bg-bot: #e6ce9e;
  --card: #fbf5e6;
  --ink: #261a10;
  --muted: #5a422e;
  --crimson: #9e312b;
  --gold: #a47a36;
  --gold-soft: rgba(138, 98, 42, 0.28);
  --plum: #1b1426;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-mid);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(218, 164, 70, 0.24), transparent 68%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 56%, var(--bg-bot) 100%);
  padding: 20px 16px 56px;
}

.page-shell {
  max-width: 1040px;
  margin: 0 auto;
  border: 1.5px solid var(--gold-soft);
  border-radius: 26px;
  padding: 28px clamp(18px, 4vw, 48px) 44px;
  background: rgba(251, 245, 230, 0.55);
  box-shadow: 0 20px 60px rgba(38, 26, 16, 0.08);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(138, 98, 42, 0.2);
  margin-bottom: 36px;
}

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

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(27, 20, 38, 0.22);
}

.brand-name {
  font-family: 'RealmUncial', Georgia, serif;
  font-size: 24px;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--crimson);
}

.hero {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 34px;
}

.kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 12px;
}

.hero h1,
.doc-head h1 {
  font-family: 'RealmUncial', Georgia, serif;
  font-weight: 400;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.06;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
}

.quill-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 240px;
  margin: 16px auto 18px;
}

.quill-rule::before,
.quill-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(158, 108, 42, 0.68), transparent);
}

.quill-rule span {
  width: 7px;
  height: 7px;
  background: var(--crimson);
  transform: rotate(45deg);
}

.lead {
  font-size: clamp(17px, 2.2vw, 20.5px);
  color: var(--muted);
  max-width: 690px;
  margin: 0 auto 24px;
}

.store-pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.badge-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--plum);
  color: #fff7e4;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1.5px solid rgba(228, 179, 76, 0.55);
  font-weight: 600;
  font-size: 15.5px;
  box-shadow: 0 10px 26px rgba(27, 20, 38, 0.24);
}

.badge-note {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px;
}

.hero-art-frame {
  background: #120d1a;
  padding: 10px;
  border-radius: 24px;
  border: 2px solid rgba(104, 72, 32, 0.55);
  box-shadow: 0 24px 56px rgba(28, 16, 6, 0.26);
  margin-bottom: 44px;
}

.hero-art-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.pillar {
  background: var(--card);
  border: 1.5px solid rgba(164, 122, 54, 0.34);
  border-radius: 20px;
  padding: 24px 22px;
  box-shadow: 0 8px 24px rgba(38, 26, 16, 0.06);
}

.pillar h2 {
  font-family: 'RealmUncial', Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.18;
  margin-bottom: 10px;
  color: var(--ink);
}

.pillar p {
  font-size: 15.5px;
  color: var(--muted);
}

.gallery-title {
  text-align: center;
  font-family: 'RealmUncial', Georgia, serif;
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 34px);
  margin-bottom: 22px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 44px;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1.5px solid rgba(138, 98, 42, 0.34);
  box-shadow: 0 14px 34px rgba(28, 16, 6, 0.16);
}

.doc-card {
  max-width: 720px;
  margin: 0 auto 36px;
  background: var(--card);
  border: 1.5px solid rgba(164, 122, 54, 0.36);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 12px 32px rgba(38, 26, 16, 0.07);
}

.doc-head {
  text-align: center;
  margin-bottom: 26px;
}

.doc-card h2 {
  font-family: 'RealmUncial', Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  margin: 26px 0 8px;
  color: var(--ink);
}

.doc-card p,
.doc-card li {
  font-size: 16px;
  color: var(--muted);
}

.doc-card p + p {
  margin-top: 12px;
}

.doc-card ul {
  padding-left: 20px;
  margin-top: 8px;
}

.doc-card li + li {
  margin-top: 6px;
}

.doc-card a,
.site-footer a {
  color: var(--crimson);
  text-underline-offset: 3px;
}

.site-footer {
  border-top: 1px solid rgba(138, 98, 42, 0.22);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 18px;
}

@media (max-width: 800px) {
  .pillars,
  .gallery {
    grid-template-columns: 1fr;
  }
  .gallery {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
