/* Dragon Voyage website: the cave palette from the game, no web fonts, no third-party requests. */

:root {
  --cave: #1d120c;
  --cave-2: #2a1a11;
  --board: #4c3324;
  --board-edge: #6b4a33;
  --cream: #fdf3dc;
  --cream-2: #f3dfb1;
  --gold: #f0c674;
  --amber: #c8893c;
  --leaf: #6fbf5d;
  --leaf-dark: #3f8a3a;
  --blush: #f29b80;
  --ink: #fdf3dc;
  --ink-soft: #d9c7a6;
  --ink-faint: #a8916e;
  --link: #f0c674;
  --radius: 18px;
  --pixel: 4px;
  --max: 1080px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cave);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* A faint pixel grid, like the cave wall. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(253, 243, 220, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(253, 243, 220, 0.025) 1px, transparent 1px);
  background-size: 16px 16px;
  z-index: 0;
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

img.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

.wrap { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { position: relative; z-index: 2; padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: 0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }

/* Hero */
.hero { padding: 40px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--leaf); margin-bottom: 14px; }
h1 { font-size: clamp(40px, 7vw, 68px); line-height: 1.02; margin: 0 0 18px; font-weight: 900; letter-spacing: -0.02em; }
h1 .gold { color: var(--gold); }
.lede { font-size: 20px; color: var(--ink-soft); max-width: 34ch; margin: 0 0 28px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--cream); color: var(--cave);
  padding: 12px 20px; border-radius: 14px; font-weight: 800; text-decoration: none;
  box-shadow: 0 var(--pixel) 0 var(--amber);
}
a.badge:hover, .badge strong, .doc .badge strong { color: var(--cave); }
a.badge:hover { background: var(--gold); }
.badge small { display: block; font-size: 11px; font-weight: 700; opacity: 0.7; line-height: 1.1; }
.badge strong { display: block; font-size: 18px; line-height: 1.1; }
.badge svg { width: 26px; height: 26px; flex: none; }
.note { font-size: 14px; color: var(--ink-faint); }

/* The board illustration */
.stage { position: relative; display: grid; place-items: center; padding-top: 120px; }
.perch { position: relative; width: min(380px, 100%); }
.perch .dragon { position: absolute; left: 50%; top: -124px; width: 132px; border-radius: 30%; transform: translateX(-50%); filter: drop-shadow(0 8px 0 rgba(0,0,0,0.25)); animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
.board {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding: 12px; background: var(--board); border-radius: 20px;
  border: var(--pixel) solid var(--amber);
  box-shadow: 0 10px 0 rgba(0,0,0,0.35);
}
.cell { aspect-ratio: 1; border-radius: 10px; background: var(--cave); display: grid; place-items: center; font-weight: 900; font-size: clamp(18px, 4.6vw, 30px); color: var(--cave); }
.t2 { background: var(--cream); }
.t4 { background: var(--cream-2); }
.t8 { background: var(--gold); }
.t16 { background: #eaa456; }
.t32 { background: #e08a4c; color: var(--cream); }
.t64 { background: #d06a3d; color: var(--cream); }
.t128 { background: var(--leaf); color: var(--cave); font-size: clamp(14px, 3.6vw, 24px); }
.t256 { background: var(--leaf-dark); color: var(--cream); font-size: clamp(14px, 3.6vw, 24px); }
.cell.pop { animation: pop 2.8s ease-in-out infinite; }
@keyframes pop { 0%, 70%, 100% { transform: scale(1); } 78% { transform: scale(1.12); } 86% { transform: scale(0.98); } }
.food { position: absolute; width: 12px; height: 12px; background: var(--gold); box-shadow: 0 0 0 var(--pixel) var(--amber); border-radius: 2px; left: 62%; top: 52%; opacity: 0; animation: fly 2.8s ease-in infinite; }
@keyframes fly {
  0%, 74% { opacity: 0; transform: translate(0, 0) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-40px, -240px) scale(0.6); }
}
@media (prefers-reduced-motion: reduce) {
  .perch .dragon, .cell.pop, .food { animation: none; }
  .food { display: none; }
}

/* Sections */
section { position: relative; z-index: 1; }
.band { padding: 72px 0; }
.band.alt { background: var(--cave-2); border-top: var(--pixel) solid var(--board); border-bottom: var(--pixel) solid var(--board); }
h2 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.1; margin: 0 0 12px; font-weight: 900; letter-spacing: -0.01em; }
.section-lede { color: var(--ink-soft); max-width: 60ch; margin: 0 0 36px; font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--board); border-radius: var(--radius); padding: 24px; border: 2px solid var(--board-edge); position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: var(--gold); color: var(--cave); font-weight: 900; margin-bottom: 14px;
  box-shadow: 0 var(--pixel) 0 var(--amber);
}
.step h3 { margin: 0 0 6px; font-size: 20px; }
.step p { margin: 0; color: var(--ink-soft); }

/* Screenshots */
.shots { display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 24px; scroll-snap-type: x mandatory; }
.shot { flex: 0 0 auto; width: 230px; scroll-snap-align: start; margin: 0; }
.shot img { width: 100%; height: auto; display: block; border-radius: 28px; border: 6px solid #0e0906; box-shadow: 0 12px 0 rgba(0,0,0,0.35); background: var(--cave); }
.shot figcaption { margin-top: 12px; font-size: 15px; color: var(--ink-soft); text-align: center; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; list-style: none; padding: 0; margin: 0; }
.features li { background: rgba(76, 51, 36, 0.45); border: 2px solid var(--board); border-radius: var(--radius); padding: 20px; }
.features .ico { font-size: 26px; line-height: 1; display: block; margin-bottom: 10px; }
.features strong { display: block; font-size: 18px; margin-bottom: 4px; }
.features span.txt { color: var(--ink-soft); font-size: 16px; }

.honest { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--board); border-radius: 24px; padding: 28px; border: var(--pixel) solid var(--amber); }
.honest img { width: 96px; height: 96px; border-radius: 22px; }
.honest h2 { font-size: 28px; }
.honest p { margin: 0; color: var(--ink-soft); }

/* Document pages (privacy, support) */
.doc { padding: 24px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(34px, 6vw, 48px); }
.doc h2 { font-size: 24px; margin-top: 40px; }
.doc h3 { font-size: 19px; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--ink-soft); }
.doc strong { color: var(--ink); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.updated { color: var(--ink-faint); font-size: 15px; margin-top: -6px; }
.summary { background: var(--board); border: 2px solid var(--board-edge); border-radius: var(--radius); padding: 20px 24px; margin: 28px 0; }
.summary h2 { margin-top: 0; font-size: 20px; }
.summary ul { margin: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--board-edge); vertical-align: top; color: var(--ink-soft); }
th { color: var(--ink); background: rgba(76, 51, 36, 0.6); }

.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--board); border: var(--pixel) solid var(--amber); border-radius: 22px; padding: 24px; margin: 24px 0 8px; }
.contact-card p { margin: 0; }
.mail { font-size: 20px; font-weight: 800; }

details { background: rgba(76, 51, 36, 0.45); border: 2px solid var(--board); border-radius: 14px; padding: 14px 18px; margin: 10px 0; }
details[open] { border-color: var(--board-edge); }
summary { cursor: pointer; font-weight: 800; color: var(--ink); list-style-position: outside; }
details p, details ol, details ul { margin: 10px 0 0; }

/* Footer */
.site-footer { position: relative; z-index: 1; padding: 36px 0 48px; border-top: var(--pixel) solid var(--board); color: var(--ink-faint); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* Small screens */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding-top: 24px; }
  .steps, .features { grid-template-columns: 1fr; }
  .honest { grid-template-columns: 1fr; text-align: left; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { gap: 12px; }
  .nav a { font-size: 14px; }
  .brand span { display: none; }
  .lede { font-size: 18px; }
  .shot { width: 200px; }
  .band { padding: 56px 0; }
}
