/* ============================================================
   Goddard Withings — site shell (non-game pages)
   ============================================================ */

:root {
  /* Palette pulled directly from the canonical Terra Goldtrix portrait —
     a clean painted noir illustration: deep blue-black, cool steel mid-tones,
     pale-warm skin highlights, wine-red lips, single warm-gold accent. */
  --bg:           #0b0d12;            /* deep noir black */
  --bg-elevated:  #14171f;            /* card / panel */
  --bg-card:      #1c2029;            /* raised surface */
  --border:       #2a303c;            /* steel border */
  --text:         #d4ccc0;            /* warm-pale painted offwhite */
  --text-muted:   #8a8f9c;            /* cool steel grey */
  --text-faint:   #5d6371;
  --accent:       #e6b66e;            /* Goddard's space-fedora gold (muted, warm) */
  --accent-warm:  #d49658;
  --accent-rose:  #b22340;            /* Terra's wine-red lips */
  --accent-cyan:  #5fb3c8;            /* cool steel-cyan */
  --accent-amber: #c08858;            /* Wyoming amber, slightly desaturated */
  --link:         var(--accent);
  --link-hover:   #f5dba0;
  --shadow-card:  0 20px 40px -20px rgba(0,0,0,0.7);
  --max-content:  1100px;
  --max-text:     720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(230,182,110,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 110%, rgba(178,35,64,0.04) 0%, transparent 60%);
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; border-radius: 18px; }
a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }

/* -------- Typography -------- */
h1, h2, h3, h4 {
  font-family: "Georgia", serif;
  color: var(--text);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-top: 2.5em; }
h3 { font-size: 1.25rem; margin-top: 1.8em; color: var(--accent); }
p  { margin: 0 0 1.1em; }
em, i { color: #ffead0; }
strong, b { color: #fff; }
small { color: var(--text-muted); }

ul, ol { padding-left: 1.4em; margin: 0 0 1.2em; }
li { margin-bottom: 0.4em; }

blockquote {
  margin: 1.5em 0;
  padding: 0.6em 1.2em;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  font-style: italic;
}

code, pre {
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-elevated);
  color: var(--accent);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
pre {
  padding: 1em 1.2em;
  overflow-x: auto;
  line-height: 1.5;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3em 0;
}

/* -------- Layout shell -------- */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Site header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 8, 21, 0.78);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0.9em 1.25em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--border);
}
.brand__name { color: var(--accent); }

.nav { display: flex; gap: 1.4em; align-items: center; }
.nav a {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a.cta {
  background: var(--accent);
  color: #1a1108;
  padding: 0.45em 1em;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav a.cta:hover {
  color: #1a1108;
  background: #f5dba0;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -8px rgba(230,182,110,0.55);
  text-decoration: none;
}

@media (max-width: 640px) {
  .nav { gap: 0.9em; }
  .nav a:not(.cta) { display: none; }
  .nav a.mobile-show { display: inline; }
}

/* Main */
main { flex: 1; }
.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1.25em;
}
.container--text {
  max-width: var(--max-text);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 3em 1.25em 4em;
  text-align: center;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
}
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,13,18,0.5) 0%, rgba(11,13,18,0.85) 70%, var(--bg) 100%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 5em 0 3em;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1em;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin-bottom: 0.4em;
  text-shadow: 0 4px 20px rgba(0,0,0,0.6);
}
.hero__tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 2em;
  font-style: italic;
}
.hero__ctas {
  display: flex;
  gap: 0.8em;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-weight: 700;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--accent);
  color: #1a1108;
  box-shadow: 0 10px 24px -10px rgba(230,182,110,0.55);
}
.btn--primary:hover {
  background: #f5dba0;
  color: #1a1108;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(230,182,110,0.7);
  text-decoration: none;
}
.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-2px);
}

/* Sections */
section { padding: 3em 0; }
section.container { padding: 3em 1.25em; }
.section-title {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1.5em;
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5em;
  margin-top: 2em;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.6em 1.4em;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.feature__icon {
  font-size: 2rem;
  margin-bottom: 0.4em;
  display: block;
}
.feature h3 { color: var(--accent); margin: 0 0 0.4em; font-size: 1.1rem; }
.feature p { color: var(--text-muted); font-size: 0.96rem; margin: 0; line-height: 1.55; }

/* Character roster */
.roster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5em;
  margin-top: 2em;
}
.char {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.char:hover { transform: translateY(-3px); border-color: var(--accent); }
.char__img {
  aspect-ratio: 3 / 2;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-elevated);
}
.char__body { padding: 1em 1em 1.2em; }
.char__name { font-weight: 700; margin: 0 0 0.2em; font-size: 1.05rem; }
.char__voice { font-size: 0.85rem; color: var(--text-muted); font-style: italic; }

/* Screenshot grid */
.screens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1em;
  margin-top: 2em;
}
.screens img {
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease;
}
.screens img:hover { transform: scale(1.02); }

/* Section split */
.split {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Changelog entries */
.entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5em;
  padding: 1.5em 0;
  border-bottom: 1px solid var(--border);
}
.entry:last-child { border-bottom: 0; }
.entry__date {
  color: var(--text-faint);
  font-size: 0.9rem;
  font-style: italic;
  padding-top: 0.5em;
}
.entry__title {
  font-size: 1.15rem;
  color: var(--accent);
  margin: 0 0 0.4em;
}
.entry__body { margin: 0; color: var(--text-muted); }
.entry__body ul { margin-top: 0.5em; }
.entry__body li { margin-bottom: 0.2em; color: var(--text-muted); }

@media (max-width: 600px) {
  .entry { grid-template-columns: 1fr; gap: 0.4em; }
  .entry__date { padding-top: 0; }
}

/* Tags */
.tag {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin-right: 0.4em;
  vertical-align: middle;
}

/* Definition list (how-to) */
dl.steps { margin: 2em 0; }
dl.steps dt {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
  margin-top: 1.4em;
}
dl.steps dd {
  margin: 0.4em 0 0;
  color: var(--text-muted);
}

/* Callout box */
.callout {
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 1em 1.4em;
  margin: 2em 0;
  color: var(--text-muted);
}
.callout--warn { border-left-color: var(--accent-rose); }
.callout strong { color: var(--accent); }

/* Footer */
.site-footer {
  margin-top: 4em;
  border-top: 1px solid var(--border);
  padding: 2.5em 1.25em;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.site-footer__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1em;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer__links { display: flex; gap: 1.4em; flex-wrap: wrap; }

/* Visited / disabled link state for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Small utilities */
.center { text-align: center; }
.muted  { color: var(--text-muted); }
.accent { color: var(--accent); }
.spacer-lg { height: 3em; }
.spacer-md { height: 1.5em; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
