/* ═══════════════════════════════════════════════════════════════
   Yak's Tools — Post-Apocalyptic Medieval Field Manual
   Design System v1.0 — 2026-03-23
   ═══════════════════════════════════════════════════════════════ */

:root {
  --parchment: #F5EDD6;
  --parchment-dark: #E8D9B5;
  --parchment-darker: #DDD0A8;
  --ink: #1C1410;
  --ink-light: #2A1F14;
  --ink-faint: #5C4E3C;
  --maroon: #6B1E2A;
  --maroon-light: #8B2635;
  --gold: #C9922A;
  --gold-light: #D4A843;
  --olive: #4A5C2E;
  --olive-dark: #3D4F24;
  --slate: #2E3D5C;
  --slate-light: #3A4F70;
  --burnt: #C45E1A;
}

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

body {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.75;
  position: relative;
  min-height: 100vh;
}

/* ── Paper Grain Texture ────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.06;
  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.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Vignette ────────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(28,20,16,0.15) 100%);
}

/* ── Typography ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Abril Fatface', Georgia, serif;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--maroon);
}

a {
  color: var(--maroon);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
a:hover { border-bottom-color: var(--gold); }

code {
  font-family: 'Source Code Pro', monospace;
  background: var(--parchment-darker);
  padding: 0.1em 0.4em;
  font-size: 0.85em;
  border: 1px solid rgba(107,30,42,0.15);
}

/* ── Navigation ──────────────────────────────────────────────── */
.nav {
  background: var(--maroon);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  position: relative;
  z-index: 10;
  border-bottom: 3px solid var(--gold);
}
.nav a {
  font-family: 'Abril Fatface', serif;
  color: var(--parchment);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: none;
}
.nav a:hover { color: var(--gold); }
.nav-logo {
  font-size: 1rem !important;
  color: var(--gold) !important;
  letter-spacing: 0.22em !important;
}

/* ── Ornamental Divider ──────────────────────────────────────── */
.divider {
  text-align: center;
  padding: 2rem 0;
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.4em;
  user-select: none;
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  position: relative;
}
.hero-logo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0 auto 2rem;
  display: block;
  border: 3px solid var(--maroon);
  box-shadow: 0 0 0 6px var(--parchment-dark), 0 0 0 8px var(--maroon);
  mix-blend-mode: multiply;
}
.hero-rule {
  display: block;
  margin: 1.5rem auto;
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 0.5em;
  user-select: none;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}
.hero .subtitle {
  font-family: 'Source Serif 4', serif;
  font-size: 1.15rem;
  color: var(--ink-light);
  font-style: italic;
  text-transform: none;
}
.hero-cta {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.9rem 2.5rem;
  background: var(--maroon);
  color: var(--gold);
  font-family: 'Abril Fatface', serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  cursor: pointer;
  transition: all 0.2s;
}
.hero-cta:hover {
  background: var(--ink);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* ── Feature Cards ───────────────────────────────────────────── */
.features {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--parchment-dark);
  border: 2px solid var(--maroon);
  border-top: 5px double var(--maroon);
  padding: 2rem 1.5rem;
  position: relative;
}
.feature-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}
.feature-card h3 {
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}
.feature-card p {
  font-size: 0.92rem;
  color: var(--ink-light);
  line-height: 1.65;
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  display: block;
}

/* ── Stats Section ───────────────────────────────────────────── */
.stats-section {
  background: var(--maroon);
  padding: 3rem 1.5rem;
  text-align: center;
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
}
.stats-section h2 {
  color: var(--gold);
  font-size: 1.4rem;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
}
.stats-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
}
.stat-card {
  padding: 1.5rem;
  border: 1px solid rgba(201,146,42,0.3);
}
.stat-number {
  font-family: 'Abril Fatface', serif;
  font-size: 3rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--parchment-dark);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* ── Steps Section ───────────────────────────────────────────── */
.steps-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.steps-section > h2 {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 2.5rem;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.step { text-align: center; }
.step-number {
  display: inline-block;
  width: 48px;
  height: 48px;
  line-height: 48px;
  background: var(--maroon);
  color: var(--gold);
  font-family: 'Abril Fatface', serif;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.step h4 {
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.step p {
  font-size: 0.88rem;
  color: var(--ink-light);
}

/* ── Seal / Stamp ────────────────────────────────────────────── */
.seal-section {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
}
.seal-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  transform: rotate(-8deg);
  opacity: 0.85;
  mix-blend-mode: multiply;
}
.seal-text {
  margin-top: 1rem;
  font-family: 'Abril Fatface', serif;
  font-size: 0.85rem;
  color: var(--maroon);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: var(--parchment-dark);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  border-top: 3px solid var(--gold);
}
.footer a {
  color: var(--gold);
  border-bottom: none;
}
.footer a:hover { color: var(--gold-light); }
.footer-links {
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-rule {
  color: var(--gold);
  letter-spacing: 0.5em;
  margin-bottom: 0.8rem;
  font-size: 0.7rem;
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════
   DOCUMENT PAGES (Privacy Policy, Terms of Service)
   ═══════════════════════════════════════════════════════════════ */

.doc-page {
  position: relative;
}

/* "OFFICIAL DOCUMENT" watermark */
.doc-page .doc-content::before {
  content: 'OFFICIAL DOCUMENT';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-family: 'Abril Fatface', serif;
  font-size: 6rem;
  color: var(--maroon);
  opacity: 0.03;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
  letter-spacing: 0.15em;
}

.doc-header {
  background: var(--maroon);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  border-bottom: 3px solid var(--gold);
}
.doc-header .back-link {
  font-family: 'Source Serif 4', serif;
  font-size: 0.85rem;
  color: var(--parchment-dark);
  border-bottom: none;
  display: inline-block;
  margin-bottom: 1rem;
}
.doc-header .back-link:hover { color: var(--gold); }
.doc-header h1 {
  color: var(--gold);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.doc-header .doc-subtitle {
  color: var(--parchment-dark);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0.2rem;
}
.doc-header .doc-date {
  color: rgba(245,237,214,0.5);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.doc-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  position: relative;
}

.doc-content h2 {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  margin-top: 2.8rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px double var(--maroon);
  font-variant: small-caps;
  text-transform: none;
}
.doc-content h2:first-of-type {
  margin-top: 0;
}

.doc-content h3 {
  font-family: 'Source Serif 4', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-light);
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
  text-transform: none;
  letter-spacing: 0.02em;
}

.doc-content p {
  font-size: 0.93rem;
  margin-bottom: 0.8rem;
  text-align: justify;
  hyphens: auto;
}

.doc-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.doc-content li {
  font-size: 0.93rem;
  margin-bottom: 0.4rem;
}
.doc-content li::marker {
  color: var(--gold);
}

.doc-content strong {
  color: var(--ink);
  font-weight: 700;
}

/* Tables in documents */
.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.88rem;
}
.doc-content th {
  background: var(--maroon);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Abril Fatface', serif;
  font-weight: normal;
  font-size: 0.75rem;
  text-align: left;
  padding: 0.6rem 0.8rem;
}
.doc-content td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--parchment-darker);
  vertical-align: top;
}
.doc-content tr:nth-child(even) td {
  background: var(--parchment-dark);
}

/* Contact box */
.contact-box {
  background: var(--parchment-dark);
  border: 2px solid var(--maroon);
  border-left: 5px solid var(--gold);
  padding: 1.2rem 1.5rem;
  margin-top: 1.5rem;
}
.contact-box p {
  text-align: left;
  margin-bottom: 0.4rem;
}
.contact-box p:last-child {
  margin-bottom: 0;
}

/* Disclaimer block */
.disclaimer {
  font-size: 0.85rem !important;
  color: var(--ink-faint);
  border: 2px solid var(--burnt);
  background: rgba(196,94,26,0.06);
  padding: 1rem 1.2rem;
  text-align: left !important;
  line-height: 1.8;
}

/* Document section divider */
.doc-divider {
  text-align: center;
  margin: 2rem 0;
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.5em;
  user-select: none;
}
