/* ─── Tokens (matches dashboard/src/styles/globals.css exactly) ─────────── */
:root {
  --bg-base:        #080d1a;
  --bg-surface:     #0e1526;
  --bg-raised:      #141d35;
  --bg-hover:       #1a2540;

  --border:         #1e2d4a;
  --border-bright:  #2a3d6a;

  --gold:           #f1c40f;
  --gold-dim:       #a8882a;
  --gold-faint:     #2a220a;

  --purple:         #8e44ad;
  --purple-dim:     #5b2c6f;

  --green:          #27ae60;
  --green-dim:      #1a6b3a;

  --text-primary:   #d4e0f0;
  --text-secondary: #6a85a8;
  --text-muted:     #354560;

  --font-display:   'Cinzel Decorative', serif;
  --font-heading:   'Cinzel', serif;
  --font-body:      'Lato', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;

  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      16px;

  --shadow-card:    0 4px 24px rgba(0,0,0,0.5);

  /* landing/game-only accent — parchment card faces */
  --parchment:      #ece3cc;
  --parchment-dim:  #b8ae94;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  max-width: 620px;
}

/* ─── Buttons (shared with dashboard) ────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--green-dim);
  border: 1.5px solid var(--green);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--green); }

.btn-secondary {
  display: inline-block;
  background: var(--bg-raised);
  border: 1.5px solid var(--border-bright);
  color: var(--text-secondary);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  transition: all 0.15s;
}
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-gold {
  display: inline-block;
  background: var(--gold-faint);
  border: 1.5px solid var(--gold-dim);
  color: var(--gold);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.15s;
}
.btn-gold:hover { background: var(--gold-dim); color: #fff; }

.btn-ghost {
  display: inline-block;
  background: none;
  border: 1.5px solid transparent;
  color: var(--text-secondary);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--text-primary); }

/* ─── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 13, 26, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wordmark-quill { font-size: 20px; }
.wordmark-text {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 1px;
}

.site-nav {
  display: flex;
  gap: 26px;
  margin-left: 8px;
  flex: 1;
}
.site-nav a {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--text-primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 780px) {
  .site-nav { display: none; }
  .header-login { display: none; }
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 88px 0 96px;
  background:
    radial-gradient(ellipse 900px 500px at 78% -10%, rgba(142,68,173,0.16), transparent 60%),
    var(--bg-base);
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 44px;
  line-height: 1.18;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 560px;
}

.hero-flourish-wrap {
  position: relative;
  display: inline-block;
  color: var(--gold);
}

.hero-flourish {
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -10px;
  height: 20px;
  width: calc(100% + 8px);
  overflow: visible;
}
.hero-flourish path {
  fill: none;
  stroke: var(--gold-dim);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 560;
  stroke-dashoffset: 560;
  animation: draw-flourish 1.1s 0.3s ease-out forwards;
}
@keyframes draw-flourish { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-flourish path { animation: none; stroke-dashoffset: 0; }
}

.hero-sub {
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 480px;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-btn { padding: 13px 24px; font-size: 15px; }

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Hero art: fanned card hand ─────────────────────────────────────────── */
.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}

.card-fan {
  position: relative;
  width: 220px;
  height: 300px;
}

.fan-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 150px;
  height: 210px;
  background: var(--parchment);
  border: 1.5px solid var(--gold-dim);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  font-family: var(--font-heading);
  color: #2a220a;
}

.fan-card-1 { transform: rotate(-11deg) translate(4px, 18px); z-index: 1; }
.fan-card-2 { transform: rotate(1deg)   translate(38px, 0);   z-index: 2; }
.fan-card-3 { transform: rotate(13deg)  translate(72px, 18px); z-index: 3; }

.fan-card-cost {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  background: rgba(142,68,173,0.14);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fan-card-name {
  margin-top: auto;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.fan-card-glyph {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 13px;
  color: var(--gold-dim);
}

/* ─── About ───────────────────────────────────────────────────────────────── */
.about { padding: 84px 0; border-top: 1px solid var(--border); }

.about-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: start;
}

.about-lead {
  margin-top: 20px;
  font-size: 17px;
  color: var(--text-secondary);
}

.about-copy p { margin-top: 16px; font-size: 15px; color: var(--text-secondary); }
.about-copy p:first-of-type { margin-top: 0; }

.drop-cap {
  float: left;
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 0.8;
  color: var(--gold);
  padding: 6px 6px 0 0;
}

.about-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.log-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.log-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.log-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--border);
  color: var(--text-secondary);
}
.log-line-correct .log-tag { background: var(--green-dim); color: #7dcea0; }
.log-tag-dim { background: var(--bg-raised); color: var(--text-muted); }
.log-tag-gold { background: var(--gold-faint); color: var(--gold); }

/* ─── How it works (map-node motif) ─────────────────────────────────────── */
.how { padding: 84px 0; border-top: 1px solid var(--border); background: var(--bg-surface); }

.how-title { margin: 0 auto 56px; text-align: left; }

.route { position: relative; }

.route-path {
  position: absolute;
  top: 24px;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 0;
}
.route-path path {
  fill: none;
  stroke: var(--border-bright);
  stroke-width: 2;
  stroke-dasharray: 6 8;
}

.route-nodes {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.route-node { text-align: left; }

.node-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 2px solid var(--gold-dim);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}

.route-node h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.route-node p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 230px;
}

@media (max-width: 900px) {
  .route-path { display: none; }
  .route-nodes { grid-template-columns: 1fr; gap: 32px; }
}

/* ─── Features (card-hand motif) ────────────────────────────────────────── */
.features { padding: 84px 0; border-top: 1px solid var(--border); }

.features .section-title { margin-bottom: 52px; }

.feature-hand {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--parchment);
  color: #1e1808;
  border: 1.5px solid var(--gold-dim);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.feature-card-2, .feature-card-4 { transform: translateY(14px); }

.feature-stat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-dim);
  background: rgba(142,68,173,0.12);
  padding: 3px 9px;
  border-radius: 99px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13.5px;
  color: #4a4020;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .feature-card-2, .feature-card-4 { transform: none; }
}

/* ─── FAQ ─────────────────────────────────────────────────────────────────── */
.faq { padding: 84px 0; border-top: 1px solid var(--border); background: var(--bg-surface); }

.faq-inner { max-width: 760px; }

.faq-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 20px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--gold-dim);
  margin-left: 12px;
}
.faq-item[open] summary::after { content: '–'; }

.faq-item p {
  padding: 0 0 18px;
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 620px;
}

/* ─── Contact ─────────────────────────────────────────────────────────────── */
.contact { padding: 84px 0; border-top: 1px solid var(--border); text-align: center; }

.contact-inner { display: flex; flex-direction: column; align-items: center; }

.contact .section-title { max-width: none; }

.contact p { margin-top: 12px; color: var(--text-secondary); font-size: 15px; }

.contact-email {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 2px;
}
.contact-email:hover { color: #fff; }

.contact-note { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* ─── Join CTA ────────────────────────────────────────────────────────────── */
.join-cta {
  padding: 90px 0;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(ellipse 700px 400px at 50% 0%, rgba(241,196,15,0.08), transparent 65%),
    var(--bg-surface);
  text-align: center;
}

.join-inner { display: flex; flex-direction: column; align-items: center; }

.join-title {
  font-family: var(--font-heading);
  font-size: 30px;
  color: var(--text-primary);
}

.join-cta p { margin-top: 12px; color: var(--text-secondary); font-size: 15px; }

.join-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { padding: 56px 0 28px; border-top: 1px solid var(--border); }

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-brand .wordmark-text { font-size: 16px; }

.footer-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 9px;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text-primary); }

.footer-legal {
  max-width: 1120px;
  margin: 40px auto 0;
  padding: 20px 32px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; min-height: 240px; }
  .hero-title { font-size: 34px; }
  .about-inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .section-inner { padding: 0 20px; }
  .hero-inner { padding: 0 20px; }
  .hero-actions, .join-actions { flex-direction: column; align-items: stretch; }
  .card-fan { transform: scale(0.85); }
}