/* Foundations of Tomorrow — private game-site preview.
   Self-contained so this folder can move to the game's own domain without
   depending on Toadstool's web-services/ assets. Game logo direction is
   deferred, so the title is plain text. */

:root {
  --night: #16130f;
  --stone-dark: #221d17;
  --stone: #2e271f;
  --sand: #e9dcc4;
  --sand-muted: #c9bba2;
  --clay: #c98a4b;
  --clay-light: #e0a465;
  --water: #6fa6c4;
  --border: rgba(233,220,196,0.16);
  --card-bg: rgba(233,220,196,0.045);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--sand);
  background: var(--night);
  line-height: 1.6;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--sand);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.2rem; margin-bottom: 8px; }
p { margin: 0 0 16px; color: var(--sand-muted); }
a { color: var(--clay-light); }
img { max-width: 100%; height: auto; display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--clay); color: var(--night); padding: 10px 18px;
  font-weight: 700; text-decoration: none; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--clay-light); outline-offset: 3px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--night);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; }
.game-title {
  font-family: 'Playfair Display', serif; font-weight: 800; font-size: 1.15rem;
  color: var(--sand); text-decoration: none; letter-spacing: 0.01em;
}
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--sand); text-decoration: none; font-weight: 500; font-size: 0.9rem; opacity: 0.85; }
.site-nav a:hover { opacity: 1; color: var(--clay-light); }
.site-nav a[aria-current="page"] { opacity: 1; color: var(--clay-light); text-decoration: underline; text-underline-offset: 6px; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 44px; height: 44px; background: none; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--sand); margin: 0 auto; }

/* Hero */
.hero { position: relative; padding: 80px 0 60px; overflow: hidden; }
.hero-art { position: absolute; inset: 0; z-index: 0; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; opacity: 0.32; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,19,15,0.35), var(--night)); }
.hero .wrap { position: relative; z-index: 1; }
.hero-credit { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--clay-light); margin-bottom: 10px; }
.hero-lede { font-size: 1.15rem; color: var(--sand); max-width: 640px; }
.hero p { max-width: 640px; }
.hero .art-label {
  display: inline-block; max-width: 100%;
  font-size: 0.95rem; font-weight: 600; line-height: 1.5;
  color: var(--sand); background: var(--night);
  border: 1px solid var(--clay); border-radius: 8px;
  padding: 8px 12px; margin: 0 0 20px;
}

/* Page header (inner pages) */
.page-head { padding: 56px 0 24px; }
.page-head p { max-width: 680px; }

section { padding: 36px 0; }

/* Actions that are not yet available */
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 10px; }
.action-unavailable {
  display: inline-flex; flex-direction: column; gap: 2px;
  border: 1px dashed var(--border); border-radius: 12px; padding: 12px 18px;
  background: var(--card-bg); min-width: 190px;
}
.action-unavailable strong { color: var(--sand); }
.action-unavailable span { font-size: 0.82rem; color: var(--sand-muted); }

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 600;
  text-decoration: none; border: 2px solid var(--clay); color: var(--sand); background: transparent;
}
.btn:hover { background: rgba(201,138,75,0.18); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { border: 1px solid var(--border); border-radius: 14px; padding: 24px; background: var(--card-bg); }
.card p:last-child { margin-bottom: 0; }

.status-pill {
  display: inline-block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  border-radius: 999px; padding: 2px 10px; border: 1px solid var(--clay); color: var(--clay-light);
  vertical-align: middle; margin-left: 6px;
}
.status-pill.is-planned { border-color: var(--water); color: var(--water); }

/* Concept art */
.concept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.concept-grid figure { margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--stone-dark); }
.concept-grid figcaption { padding: 10px 14px; font-size: 0.85rem; color: var(--sand-muted); }
.concept-grid figcaption strong { color: var(--clay-light); }

.empty-state {
  border: 1px dashed var(--border); border-radius: 14px; padding: 32px; text-align: center;
  background: var(--card-bg);
}
.empty-state p:last-child { margin-bottom: 0; }

.note { font-size: 0.88rem; border-left: 3px solid var(--clay); padding: 6px 0 6px 14px; }

/* Help page */
.template {
  background: var(--stone-dark); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 22px; font-size: 0.92rem;
}
.template ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.template strong { color: var(--sand); font-weight: 600; }
.template span { color: var(--sand-muted); font-size: 0.85rem; }
details { border: 1px solid var(--border); border-radius: 10px; padding: 12px 18px; margin-bottom: 12px; background: var(--card-bg); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; margin-top: 40px; font-size: 0.88rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.studio-credit { display: flex; align-items: center; gap: 12px; }
.studio-credit img { height: 38px; width: 38px; object-fit: contain; }
.site-footer p { margin: 0; }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--night); border-bottom: 1px solid var(--border);
  }
  .site-nav a { padding: 14px 24px; border-top: 1px solid var(--border); }
  .site-nav.is-open { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
