:root {
  --parchment: #f5ead6;
  --parchment-dark: #e8d5b0;
  --ink: #2a1f0e;
  --ink-faded: #5c4a2a;
  --gold: #c8973a;
  --gold-bright: #e8b84b;
  --red: #8b1a1a;
  --glow: rgba(200, 151, 58, 0.3);
}

@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;900&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap");

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: #1a1208;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(200, 151, 58, 0.08) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: "Crimson Text", Georgia, serif;
  font-size: 19px;
  line-height: 1.75;
  min-height: 100vh;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: "Cinzel", serif;
}

.site-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 4;
  backdrop-filter: blur(10px);
  background: rgba(26, 18, 8, 0.74);
  border-bottom: 1px solid rgba(200, 151, 58, 0.18);
}

.site-nav {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand,
.site-link {
  text-decoration: none;
}

.site-brand {
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}

.site-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.8rem;
}

.site-link {
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--parchment-dark);
  padding: 0.28rem 0.4rem;
  border-bottom: 1px solid transparent;
}

.site-link:hover,
.site-link.active,
.site-brand.active {
  color: var(--gold-bright);
  border-color: rgba(232, 184, 75, 0.6);
}

#sparkles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.page {
  max-width: 860px;
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  position: relative;
  z-index: 1;
}

.docs-page {
  padding-top: 2.4rem;
}

.cover {
  text-align: center;
  padding: 4rem 2rem 3rem;
  border-bottom: 2px solid var(--gold);
  position: relative;
  width: 100%;
  max-width: 760px;
}

.cover::before,
.cover::after {
  display: block;
  color: var(--gold);
  letter-spacing: 0.5em;
  font-size: 0.85rem;
}

.cover::before {
  content: "✦ ✦ ✦";
  margin-bottom: 1.5rem;
}

.cover::after {
  content: "✦ ✦ ✦";
  margin-top: 1.5rem;
}

.sigil {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 18px var(--gold-bright));
}

.cover h1 {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 0 40px rgba(232, 184, 75, 0.4), 2px 2px 0 rgba(0, 0, 0, 0.5);
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.subtitle {
  font-family: "Cinzel", serif;
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  color: var(--gold);
  letter-spacing: 0.2em;
  margin-top: 0.75rem;
}

.tagline {
  font-style: italic;
  color: var(--parchment-dark);
  font-size: 1.2rem;
  margin-top: 1.25rem;
  opacity: 0.85;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.simple-hero {
  text-align: center;
}

.simple-hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 3.7rem);
  color: var(--gold-bright);
  text-shadow: 0 0 30px rgba(232, 184, 75, 0.22);
}

.eyebrow {
  margin: 0 0 0.6rem;
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.parchment {
  background: var(--parchment);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
  border: 1px solid var(--gold);
  border-radius: 2px;
  padding: 2.5rem 3rem;
  margin: 2.5rem 0;
  box-shadow: 0 0 0 4px rgba(200, 151, 58, 0.15), 0 8px 40px rgba(0, 0, 0, 0.6), inset 0 0 60px rgba(200, 151, 58, 0.06);
  position: relative;
  width: 100%;
}

.parchment::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(200, 151, 58, 0.25);
  pointer-events: none;
}

.parchment h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.12em;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.parchment h3 {
  font-size: 1rem;
  color: var(--ink-faded);
  letter-spacing: 0.1em;
  margin: 1.7rem 0 0.45rem;
}

.parchment p {
  color: var(--ink);
  margin-bottom: 0.9rem;
}

.rune {
  color: var(--gold);
  font-size: 1.1em;
}

.scroll-diagram {
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(200, 151, 58, 0.35);
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
  font-size: 0.95rem;
  color: var(--ink-faded);
  white-space: pre-wrap;
  overflow-x: auto;
  line-height: 1.6;
}

.incantation {
  background: #0f0a03;
  border: 1px solid var(--gold);
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
  font-family: "Courier New", monospace;
  font-size: 0.92rem;
  color: var(--gold-bright);
  box-shadow: 0 0 20px rgba(200, 151, 58, 0.15), inset 0 0 30px rgba(0, 0, 0, 0.4);
  overflow-x: auto;
  white-space: pre-wrap;
}

.badge-row,
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: center;
}

.ver-badge {
  font-family: "Cinzel", serif;
  font-size: 0.75rem;
  color: var(--gold);
  border: 1px solid rgba(200, 151, 58, 0.4);
  padding: 0.2rem 0.7rem;
  letter-spacing: 0.1em;
}

.target-list,
.command-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1rem;
  margin-top: 1rem;
}

.target-item,
.command-item {
  border: 1px solid rgba(200, 151, 58, 0.3);
  background: rgba(0, 0, 0, 0.04);
  padding: 0.9rem 1rem;
  min-height: 100%;
}

.target-item strong,
.command-item strong {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  color: var(--red);
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.target-item a,
.link-rune {
  color: var(--red);
  text-decoration: none;
}

.target-item a:hover {
  text-decoration: underline;
}

.link-rune {
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  border: 1px solid rgba(139, 26, 26, 0.4);
  padding: 0.4rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.link-rune:hover,
.target-item a:hover {
  color: var(--red);
  text-decoration: underline;
}

.ritual-steps {
  counter-reset: ritual;
  list-style: none;
  margin-top: 1rem;
  padding-left: 0;
}

.ritual-steps li {
  counter-increment: ritual;
  padding: 0.8rem 0 0.8rem 3rem;
  position: relative;
  border-bottom: 1px dashed rgba(200, 151, 58, 0.28);
}

.ritual-steps li:last-child {
  border-bottom: none;
}

.ritual-steps li::before {
  content: counter(ritual);
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid rgba(139, 26, 26, 0.35);
  color: var(--red);
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  background: rgba(139, 26, 26, 0.06);
}

.note {
  background: rgba(200, 151, 58, 0.08);
  border-left: 3px solid var(--gold);
  padding: 0.9rem 1rem;
  margin: 1rem 0;
  color: var(--ink-faded);
}

.command-item code,
.target-item code,
.parchment p code,
.parchment li code {
  background: rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(200, 151, 58, 0.25);
  padding: 0.08rem 0.35rem;
  border-radius: 2px;
  font-size: 0.95em;
}

.divider {
  text-align: center;
  color: var(--gold);
  margin: 0.9rem 0 0.35rem;
  letter-spacing: 0.6em;
  font-size: 0.8rem;
  opacity: 0.7;
}

footer {
  text-align: center;
  color: rgba(200, 151, 58, 0.4);
  font-family: "Cinzel", serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(200, 151, 58, 0.2);
  width: 100%;
}

/* ── spell list ── */

.spells {
  list-style: none;
  padding: 0;
  margin: 0;
}

.spells li {
  padding: 0.5rem 0 0.5rem 1.8rem;
  border-bottom: 1px dashed rgba(200, 151, 58, 0.3);
  position: relative;
  color: var(--ink);
}

.spells li:last-child {
  border-bottom: none;
}

.spells li::before {
  content: "⚜";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.85em;
  top: 0.65rem;
}

.spells li strong {
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  color: var(--red);
  letter-spacing: 0.06em;
}

/* ── feature grid ── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.feature-card {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(200, 151, 58, 0.28);
  padding: 1rem 1.1rem;
  position: relative;
}

.feature-card h3 {
  margin-top: 0;
}

.feature-card p:last-child {
  margin-bottom: 0;
}

/* ── quote block ── */

.quote-block {
  margin: 1.2rem 0;
  padding: 1.1rem 1.2rem;
  border-top: 1px solid rgba(200, 151, 58, 0.4);
  border-bottom: 1px solid rgba(200, 151, 58, 0.4);
  color: var(--ink-faded);
  font-style: italic;
  text-align: center;
}

/* ── incantation syntax colours ── */

.incantation .comment { color: #5c7a3a; }
.incantation .cmd     { color: #e8b84b; }
.incantation .arg     { color: #c8d89a; }

@media (max-width: 900px) {
  .parchment {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 18px;
  }

  .site-nav {
    padding: 0.8rem 0.9rem;
    flex-direction: column;
  }

  .page {
    padding: 2rem 0.85rem 4rem;
  }

  .cover {
    padding: 3rem 1rem 2rem;
  }

  .tagline {
    font-size: 1.05rem;
  }

  .target-list,
  .command-columns,
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ── one-pager ── */

.hero {
  text-align: center;
  padding: 4.5rem 2rem 1.5rem;
  width: 100%;
  max-width: 660px;
}

.hero h1 {
  margin: 0.4rem 0 0;
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 0 40px rgba(232, 184, 75, 0.4), 2px 2px 0 rgba(0, 0, 0, 0.5);
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.hero .tagline {
  font-style: italic;
  color: var(--parchment-dark);
  font-size: 1.18rem;
  margin: 1.1rem auto 0;
  opacity: 0.85;
  max-width: 34rem;
  line-height: 1.6;
}

.install-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem auto 0;
  max-width: 360px;
  width: 100%;
  gap: 0;
}

.incantation.one-liner {
  width: 100%;
  text-align: center;
  padding: 0.85rem 1.5rem;
  margin: 0;
}

.install-then {
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.55;
  padding: 0.3rem 0;
}

.lead {
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 1.5rem;
  line-height: 1.72;
}

.site-footer {
  text-align: center;
  color: rgba(200, 151, 58, 0.45);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  margin-top: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(200, 151, 58, 0.2);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
}

.site-footer a {
  color: rgba(200, 151, 58, 0.6);
  text-decoration: none;
}

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