/* King's Valley II — project landing page
   Palette follows the MSX2 pyramid artwork: torch light on dark stone, gold soulstones. */

:root {
  --bg: #0b0907;
  --bg-soft: #100d09;
  --panel: #17130e;
  --panel-2: #120f0b;
  --line: #2c241a;
  --line-soft: #211a13;
  --text: #ece3d4;
  --muted: #a99b87;
  --gold: #e2a93f;
  --gold-bright: #f4cd7c;
  --ink: #1a1206;
  --max: 1120px;
  --radius: 14px;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(226, 169, 63, 0.11), transparent 68%),
    radial-gradient(800px 500px at 88% 12%, rgba(226, 169, 63, 0.045), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: #221b13;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--gold-bright);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 10px 16px;
  z-index: 100;
  font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow { max-width: 820px; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 9, 7, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand em { color: var(--gold); font-style: normal; }

.brand-mark {
  width: 12px;
  height: 12px;
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
}

.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  color: var(--ink) !important;
  background: var(--gold);
  border-radius: 8px;
  padding: 7px 14px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--gold-bright); }

/* ------------------------------------------------------------------ hero */

.hero { padding: 76px 0 8px; }

.eyebrow,
.section-label {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.9rem, 7.4vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.h1-sub {
  display: block;
  margin-top: 14px;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.lede {
  max-width: 66ch;
  margin: 26px 0 0;
  font-size: 1.1rem;
  color: #d8cdbc;
}
.lede strong { color: var(--text); font-weight: 600; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.97rem;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--gold);
  color: var(--ink);
}
.btn-primary:hover { background: var(--gold-bright); }

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.015);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.chips li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
}

.hero-figure {
  margin: 54px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.hero-figure img {
  display: block;
  width: 100%;
  image-rendering: pixelated;
}
.hero-figure figcaption {
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  background: var(--panel-2);
  font-size: 0.86rem;
  color: var(--muted);
}

/* -------------------------------------------------------------- sections */

.section { padding: 88px 0; scroll-margin-top: 62px; }

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.014), transparent);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section-lede {
  max-width: 68ch;
  margin: 0 0 38px;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.card {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  transition: border-color 140ms ease, transform 140ms ease;
}
.card:hover { border-color: rgba(226, 169, 63, 0.4); transform: translateY(-2px); }

.card-kicker {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.005em;
}

.card p:last-child,
.feature p:last-child { margin-bottom: 0; color: var(--muted); font-size: 0.95rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px 34px;
}

.feature {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* -------------------------------------------------------------- gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
}
.gallery .wide { grid-column: 1 / -1; }

.gallery img {
  display: block;
  width: 100%;
  image-rendering: pixelated;
  background: #000;
}

.gallery figcaption {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

/* ---------------------------------------------------------------- steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.steps p { margin: 0; font-size: 0.95rem; color: var(--muted); }

.note {
  margin-top: 26px;
  padding: 18px 22px;
  border-left: 2px solid var(--gold);
  background: rgba(226, 169, 63, 0.05);
  border-radius: 0 10px 10px 0;
}
.note p { margin: 0; font-size: 0.94rem; color: #d8cdbc; }

/* ------------------------------------------------------------------ faq */

details {
  border-bottom: 1px solid var(--line-soft);
}

summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  cursor: pointer;
  font-weight: 550;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 1.1rem;
  line-height: 1;
}
details[open] summary::after { content: "\2212"; }
details[open] summary { color: var(--gold-bright); }

details p {
  margin: 0 0 20px;
  max-width: 72ch;
  color: var(--muted);
  font-size: 0.96rem;
}

/* --------------------------------------------------------------- footer */

.site-footer {
  padding: 52px 0 60px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
}

.footer-note {
  max-width: 58ch;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #8b7f6d;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--gold-bright); }

/* ----------------------------------------------------------- responsive */

@media (max-width: 760px) {
  .nav li:not(:last-child) { display: none; }
  .hero { padding-top: 52px; }
  .section { padding: 64px 0; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .wide { grid-column: auto; }
  body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
