/* ============================================================
   Quillhollow Website — Global Styles
   Palette pulled from the app's CSS custom properties.
   ============================================================ */

/* --- Google Font import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* --- CSS Custom Properties (mirrors the app) --- */
:root {
  /* palette */
  --color-cream:       #fdf6e8;
  --color-parchment:   #f5e8c8;
  --color-parchment-dk:#e8d4a0;
  --color-ink:         #2a1c15;
  --color-ink-light:   #57341d;
  --color-ink-muted:   #8b6a4e;
  --color-accent:      #000000;
  --color-white:       #ffffff;
  --color-border:      #6b3f17;
  --color-sage:        #567f4a;
  --color-rust:        #8b3e28;
  --color-blue:        #3b82f6;  /* from the quill stroke */
  --color-gold:        #b5893a;

  /* surfaces */
  --surface-base:    var(--color-cream);
  --surface-card:    var(--color-parchment);
  --surface-raised:  #fefaf2;
  --surface-inset:   #f0e5cc;

  /* typography */
  --font-ui: 'Libre Baskerville', Georgia, serif;
  --font-mono: 'Courier New', Courier, monospace;

  /* spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  2rem;
  --space-xl:  3rem;
  --space-2xl: 5rem;

  /* layout */
  --max-width: 960px;
  --nav-height: 60px;

  /* borders */
  --radius-sm: 4px;
  --radius-md: 8px;
}

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

/* --- Base --- */
html {
  overflow-y: scroll; /* always show scrollbar to prevent layout shift */
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  color: var(--color-ink);
  background-color: var(--surface-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.loaded {
  opacity: 1;
}

a {
  color: var(--color-ink-light);
  text-decoration: underline;
  text-decoration-color: var(--color-ink-muted);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem;  }
h3 { font-size: 1.25rem; }

/* --- Layout helpers --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-2xl) 0;
}

.text-center { text-align: center; }
.text-muted  { color: var(--color-ink-muted); }
.text-small  { font-size: 0.875rem; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-base);
  border-bottom: 1px solid rgba(107, 63, 23, 0.15);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-ink);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--color-ink-muted);
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-ink);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-ink);
  margin: 5px 0;
  transition: transform 0.2s;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 0.65em 1.5em;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-ink-light);
  border-color: var(--color-ink-light);
  color: var(--color-white);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-large {
  font-size: 1.15rem;
  padding: 0.8em 2.5em;
}

.btn-sage {
  background: linear-gradient(160deg, #6fa862 0%, #567f4a 50%, #3d5e35 100%);
  border-color: #4a6e3f;
  color: var(--color-white);
  box-shadow: 0 0 12px rgba(86, 127, 74, 0.45), 0 2px 6px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.2s, background 0.2s;
}

.btn-sage:hover {
  background: linear-gradient(160deg, #7dbb6f 0%, #6fa862 50%, #4a6e3f 100%);
  border-color: #567f4a;
  color: var(--color-white);
  box-shadow: 0 0 20px rgba(86, 127, 74, 0.65), 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Coming soon overlay: blocks clicks, dims content, shows label */
.coming-soon-wrap {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.coming-soon-wrap > .pricing-buy-row {
  margin: 0;
}

.coming-soon-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(253, 246, 232, 0.5);
  cursor: default;
}

.coming-soon-overlay::after {
  content: 'Coming Soon';
  position: absolute;
  bottom: 1.2em;
  left: 0;
  right: 0;
  background: var(--color-ink-muted);
  color: var(--color-white);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.5em 0;
  box-shadow: 0 2px 4px rgba(42, 28, 21, 0.15);
}

.btn-disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.btn-small {
  font-size: 0.8rem;
  padding: 0.4em 1em;
}

/* --- Cards --- */
.card {
  background: var(--surface-card);
  border: 1px solid rgba(107, 63, 23, 0.12);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

/* --- Hero section --- */
.hero {
  text-align: center;
  padding: 4.25rem 0 var(--space-2xl);
}

.hero-logo {
  max-width: 400px;
  margin: 0 auto var(--space-lg);
}

.hero-logo-split {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin: 0 auto var(--space-lg);
  line-height: 0;
}

.hero-logo-icon {
  height: 128px;
  width: auto;
}

.hero-logo-text {
  height: 75px;
  width: auto;
}

@media (max-width: 768px) {
  .hero-logo-split {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .hero-logo-icon {
    height: 80px;
  }

  .hero-logo-text {
    height: 45px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 0.5rem;
    padding-bottom: var(--space-md);
  }

  .hero-logo-split {
    margin: var(--space-md) auto 1.5rem;
    gap: var(--space-xs);
  }

  .hero-logo-icon {
    height: 50px;
  }

  .hero-logo-text {
    height: 28px;
  }

  .card-fan {
    margin-top: 0;
    margin-bottom: var(--space-sm);
  }

  .card-fan-stage {
    position: relative;
    height: auto !important;
    margin: 0;
  }

  .fan-card {
    position: relative !important;
  }

  .fan-card-screenshot {
    position: relative !important;
    width: 100%;
    height: auto;
    left: auto;
    bottom: auto;
    margin-left: 0;
    display: none;
    transform: none !important;
    box-shadow: 0 4px 16px rgba(42, 28, 21, 0.2);
    border: 1px solid rgba(107, 63, 23, 0.2);
    filter: none !important;
  }

  .fan-card-screenshot.fan-active {
    display: block;
  }

  .fan-card-screenshot img {
    width: 100%;
    height: auto;
  }

  /* Hide the overlay on mobile since we just show/hide */
  .fan-card-screenshot::after {
    display: none;
  }

  .fan-dots {
    margin-top: var(--space-sm);
  }
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--color-ink-muted);
  max-width: 550px;
  margin: 0 auto var(--space-xl);
  font-style: italic;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

/* --- Card Fan --- */
.card-fan {
  position: relative;
  max-width: 720px;
  margin: 0 auto var(--space-xl);
}

.card-fan-stage {
  position: relative;
  height: 460px;
  /* Extra horizontal room for the fanned-out cards */
  margin: 0 var(--space-xl);
}

/* Shared card base */
.fan-card {
  position: absolute;
  border-radius: var(--radius-md);
  transition: transform 0.5s ease, box-shadow 0.5s ease, filter 0.5s ease;
  transform-origin: center bottom;
}

/* Screenshot cards — sized like app windows */
.fan-card-screenshot {
  width: 680px;
  height: 420px;
  left: 50%;
  bottom: 0;
  margin-left: -340px; /* center horizontally */
  box-shadow: 0 6px 24px rgba(42, 28, 21, 0.25);
  border: 1px solid rgba(107, 63, 23, 0.2);
  overflow: hidden;
}

.fan-card-screenshot .screenshot-placeholder {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: var(--radius-md);
  min-height: unset;
}

.fan-card-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* Fan positions for the 3 screenshot cards (behind the icon).
   Card at data-index matching the active dot comes to top (z-index 3),
   the others fan left/right behind it. */
.fan-card-screenshot[data-index="0"] { z-index: 3; transform: translate(0, 0); }
.fan-card-screenshot[data-index="1"] { z-index: 2; transform: translate(60px, 0); }
.fan-card-screenshot[data-index="2"] { z-index: 1; transform: translate(-60px, 0); }

/* When a card is "active" it sits front-center */
.fan-card-screenshot.fan-active   { z-index: 3; transform: translate(0, 0); box-shadow: 0 8px 32px rgba(42, 28, 21, 0.25); border: 2px solid var(--color-border); }
/* Neighbours fan left and right */
.fan-card-screenshot.fan-left     { z-index: 2; transform: translate(-80px, 0); }
.fan-card-screenshot.fan-right    { z-index: 2; transform: translate(80px, 0); }
/* Far neighbours (same side, further out) */
.fan-card-screenshot.fan-far-left { z-index: 1; transform: translate(-140px, 0); }
.fan-card-screenshot.fan-far-right{ z-index: 1; transform: translate(140px, 0); }

/* Icon card — floats above everything */
.fan-card-icon {
  z-index: 10;
  width: 180px;
  height: 180px;
  left: 50%;
  top: 0;
  margin-left: -90px;
  background: var(--surface-base);
  border-radius: 50%;
  padding: 12px;
  box-shadow: 0 6px 24px rgba(42, 28, 21, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fan-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

/* Dot indicators */
.fan-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.fan-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--color-ink-muted);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}

.fan-dot.active,
.fan-dot:hover {
  background: var(--color-ink);
  border-color: var(--color-ink);
}

/* Dim non-active cards with a tinted overlay */
.fan-card-screenshot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: var(--color-cream);
  opacity: 0.8;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.fan-card-screenshot.fan-active::after {
  opacity: 0;
}

.fan-card-screenshot.fan-left,
.fan-card-screenshot.fan-right {
  border-color: rgba(107, 63, 23, 0.6);
  box-shadow: 0 3px 12px rgba(42, 28, 21, 0.12);
}

.fan-card-screenshot.fan-left::after,
.fan-card-screenshot.fan-right::after {
  opacity: 0.6;
}

.fan-card-screenshot.fan-left,
.fan-card-screenshot.fan-right {
  filter: blur(1.5px);
}

.fan-card-screenshot.fan-far-left,
.fan-card-screenshot.fan-far-right {
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(42, 28, 21, 0.06);
}

.fan-card-screenshot.fan-far-left::after,
.fan-card-screenshot.fan-far-right::after {
  opacity: 0.8;
}

.fan-card-screenshot.fan-far-left,
.fan-card-screenshot.fan-far-right {
  filter: blur(3px);
}

/* Clickable screenshot cards */
.fan-card-screenshot { cursor: pointer; }
.fan-card-screenshot.fan-active { cursor: default; }

/* --- Learn More: feature sections --- */
.feature-section {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid rgba(107, 63, 23, 0.08);
}

.feature-section:last-of-type {
  border-bottom: none;
}

.feature-section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.feature-section-header p {
  color: var(--color-ink-muted);
  max-width: 600px;
  margin: var(--space-sm) auto 0;
}

.feature-section-label {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.feature-bullets {
  list-style: none;
  max-width: 640px;
  margin: 0 auto;
}

.feature-bullets li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(107, 63, 23, 0.06);
  color: var(--color-ink);
  font-size: 0.95rem;
}

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

.feature-bullets strong {
  color: var(--color-ink);
}

/* App-level feature pills (horizontal) */
.app-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
}

.app-feature-item {
  padding: var(--space-md);
  background: var(--color-white);
  border: 1px solid rgba(107, 63, 23, 0.1);
  border-radius: var(--radius-md);
}

.app-feature-item h3 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.app-feature-item p {
  font-size: 0.875rem;
  color: var(--color-ink-muted);
  line-height: 1.5;
}

/* Screenshot placeholder within feature sections */
.feature-screenshot {
  max-width: 640px;
  margin: var(--space-lg) auto 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(42, 28, 21, 0.25);
  border: 2px solid var(--color-border);
}

.feature-screenshot img {
  width: 100%;
  display: block;
}

.feature-screenshot .screenshot-placeholder {
  margin: 0;
  min-height: 200px;
}

/* --- Mini card fan (for learn-more sections) --- */
.mini-fan {
  position: relative;
  max-width: 540px;
  margin: var(--space-lg) auto 0;
}

.mini-fan-stage {
  position: relative;
  height: 320px;
  margin: 0 var(--space-lg);
}

.mini-fan .fan-card-screenshot {
  width: 480px;
  height: 300px;
  margin-left: -240px;
}

.fan-caption {
  text-align: center;
  margin-top: var(--space-sm);
  font-style: italic;
  min-height: 1.5em;
  transition: opacity 0.3s ease;
}

.mini-fan .fan-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

@media (max-width: 768px) {
  .mini-fan-stage {
    height: 220px;
    margin: 0;
  }

  .mini-fan .fan-card-screenshot {
    width: 280px;
    height: 180px;
    margin-left: -140px;
  }
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(42, 28, 21, 0.85);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: var(--space-lg);
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 95%;
  max-height: 95vh;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(253, 246, 232, 0.85);
  border: 1px solid rgba(107, 63, 23, 0.15);
  color: var(--color-ink);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1001;
}

.lightbox-btn:hover {
  background: var(--color-parchment);
}

.lightbox-prev { left: var(--space-lg); }
.lightbox-next { right: var(--space-lg); }

/* Make fan screenshots clickable */
.mini-fan .fan-card-screenshot.fan-active img {
  cursor: zoom-in;
}

/* --- Screenshot placeholder --- */
.screenshot-placeholder {
  background: var(--surface-inset);
  border: 2px dashed var(--color-parchment-dk);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-muted);
  font-style: italic;
  min-height: 300px;
  margin: var(--space-lg) 0;
}

/* --- Features grid (canvas-style cards with edges) --- */
.features-section {
  position: relative;
  padding-bottom: var(--space-lg);
}

/* SVG edge layer — sits behind the cards */
.features-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.features-edges line {
  stroke-width: 2;
  stroke-linecap: round;
}

.features-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

/* Card styling — mimics the app's planning cards */
.feature-card {
  text-align: left;
  padding: 0;
  background: var(--color-white);
  border: 1px solid rgba(107, 63, 23, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(42, 28, 21, 0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
  box-shadow: 0 4px 16px rgba(42, 28, 21, 0.15);
  transform: translateY(-2px);
}

/* Colored top bar — like the app's card accent */
.feature-card-header {
  padding: var(--space-sm) var(--space-md);
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.feature-card-body {
  padding: var(--space-md) var(--space-md) var(--space-lg);
}

.feature-card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.1rem;
}

.feature-card p {
  color: var(--color-ink-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Per-card accent colors (from the app's card type palette) */
.feature-card[data-color="gold"]   .feature-card-header { background: #b5893a; }
.feature-card[data-color="blue"]   .feature-card-header { background: #6b7fa8; }
.feature-card[data-color="green"]  .feature-card-header { background: #7a8c5e; }
.feature-card[data-color="copper"] .feature-card-header { background: #a07050; }
.feature-card[data-color="purple"] .feature-card-header { background: #7a6b8a; }
.feature-card[data-color="rose"]   .feature-card-header { background: #a05878; }

/* Edge colors match the card they connect from */
.edge-gold   { stroke: #b5893a; }
.edge-blue   { stroke: #6b7fa8; }
.edge-green  { stroke: #7a8c5e; }
.edge-copper { stroke: #a07050; }
.edge-purple { stroke: #7a6b8a; }
.edge-rose   { stroke: #a05878; }

/* Edge dot at connection point */
.edge-dot {
  r: 4;
  stroke-width: 0;
}

/* --- Pricing --- */
.pricing-hero {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.pricing-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-md);
}

.pricing-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.pricing-card {
  position: relative;
  overflow: hidden;
}

.pricing-banner {
  position: absolute;
  top: 20px;
  left: -35px;
  background: var(--color-sage);
  color: var(--color-white);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4em 3em;
  transform: rotate(-45deg);
  box-shadow: 0 2px 4px rgba(42, 28, 21, 0.15);
}

.pricing-price {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  justify-content: center;
}

/* Shared row: steam widget + buy button stretch to the same height */
.pricing-buy-row {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}

/* Button fills the row width and centers text when stretched */
.pricing-buy-row .btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Steam-style discount widget: green badge + stacked prices */
.pricing-steam {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}

.pricing-discount {
  background: var(--color-sage);
  color: var(--color-white);
  font-size: 1.4rem;
  font-weight: 700;
  padding: 0.8em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-prices {
  flex: 1; /* fill remaining width after the discount badge */
  background: var(--color-ink);
  padding: 0.8em 0.9em;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.25em;
}

.pricing-original {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-ink-muted);
  text-decoration: line-through;
}

.pricing-final {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-white);
}

.pricing-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  max-width: 800px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 768px) {
  .pricing-details {
    grid-template-columns: 1fr;
  }
}

/* --- Page header (for subpages) --- */
.page-header {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid rgba(107, 63, 23, 0.1);
  margin-bottom: var(--space-xl);
}

.page-header p {
  color: var(--color-ink-muted);
  margin-top: var(--space-sm);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Version status banner --- */
.version-status {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  text-align: center;
  margin-bottom: var(--space-xl);
}

.version-status.up-to-date {
  background: rgba(86, 127, 74, 0.12);
  border: 1px solid var(--color-sage);
  color: var(--color-sage);
}

.version-status.update-available {
  background: rgba(181, 137, 58, 0.12);
  border: 1px solid var(--color-gold);
  color: var(--color-ink-light);
}

.version-status.unknown {
  background: var(--surface-inset);
  border: 1px solid var(--color-parchment-dk);
  color: var(--color-ink-muted);
}

/* --- Download cards --- */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.download-card {
  text-align: center;
}

.download-card h3 {
  margin-bottom: var(--space-sm);
}

.download-card .btn {
  margin-top: var(--space-md);
}

/* --- Form styles --- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 0.6em 0.8em;
  border: 1px solid rgba(107, 63, 23, 0.25);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-ink);
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-border);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-card {
  max-width: 600px;
  margin: 0 auto;
}

/* --- Docs --- */
.docs-content {
  max-width: 700px;
  margin: 0 auto;
}

.docs-content h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid rgba(107, 63, 23, 0.1);
}

.docs-content h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.docs-content p,
.docs-content ul,
.docs-content ol {
  margin-bottom: var(--space-md);
}

.docs-content ul,
.docs-content ol {
  padding-left: var(--space-lg);
}

.docs-content li {
  margin-bottom: var(--space-xs);
}

.docs-content code {
  font-family: var(--font-mono);
  background: var(--surface-inset);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(107, 63, 23, 0.1);
  padding: var(--space-xl) 0;
  text-align: center;
  color: var(--color-ink-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  list-style: none;
  margin-bottom: var(--space-md);
}

.footer-links a {
  color: var(--color-ink-muted);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}

.footer-links a:hover {
  color: var(--color-ink);
}

.footer-wta {
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.footer-wta img {
  height: 32px;
  width: auto;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.footer-wta:hover img {
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface-base);
    flex-direction: column;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(107, 63, 23, 0.15);
    gap: var(--space-md);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .card-fan-stage {
    height: 280px;
    margin: 0;
  }

  .fan-card-screenshot {
    width: 300px;
    height: 200px;
    margin-left: -150px;
  }

  .fan-card-icon {
    width: 120px;
    height: 120px;
    margin-left: -60px;
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }
}
