/* Dirt Road Games — site styles
   Brand: "sundown switchback" — navy evening, cream type, amber sun.
   To change brand colours, edit only the tokens in this first section. */

:root {
  color-scheme: dark;
  --bg: #1f2a44;          /* navy night */
  --surface: #27334f;
  --ink: #f5ebda;         /* cream */
  --muted: #c9c0ae;
  --line: #3a4664;
  --accent: #f0b24a;      /* sundown amber: buttons, links, eyebrows */
  --on-accent: #1f2a44;   /* text on amber buttons */
  --accent-soft: #3c3d45;
  --accent-2: #dcc59a;    /* dirt-road tan: badges, divider accents */
  --accent-2-soft: #343b4f;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 7.5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 4.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--surface); color: var(--ink); padding: 8px 12px; z-index: 10;
}
.skip-link:focus { left: 8px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header / nav ---------- */

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 64px; flex-wrap: wrap;
}

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; line-height: 1;
}
/* The logo tile's navy sky matches the page, so a hairline ring keeps its edge. */
.wordmark img { width: 40px; height: 40px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line); }
.wm-text { display: flex; flex-direction: column; gap: 4px; }
.wm-name { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.wm-sub {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--accent);
}

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

.site-nav { width: 100%; display: none; padding-bottom: 12px; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-nav a {
  display: block; padding: 10px 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.site-nav a:hover { background: var(--accent-soft); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }

@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; padding: 0; }
  .site-nav ul { display: flex; gap: 4px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  border: 2px solid var(--accent); background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--accent); }

/* ---------- Sections ---------- */

main { display: block; }
.section { padding: 48px 0; }
.section + .section { padding-top: 0; }
@media (min-width: 720px) { .section { padding: 72px 0; } }

.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}

.lede { font-size: 1.2rem; color: var(--muted); max-width: 38em; }

/* Divider: a dashed "road line" rule with the small logo, used sparingly. */
.divider {
  position: relative; height: 24px; margin: 8px 0;
  background: linear-gradient(90deg, var(--line) 50%, transparent 50%) 0 50% / 14px 2px repeat-x;
}
.divider img {
  position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 5px var(--bg);
}

/* ---------- Hero ---------- */

.hero { padding: 56px 0 40px; }
.hero h1 span { color: var(--accent); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (min-width: 720px) { .hero { padding: 96px 0 64px; } }

/* ---------- Cards / grid ---------- */

.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.two { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 24px;
}
.card p:last-child { margin-bottom: 0; }

.pillars .card h3 { display: flex; align-items: center; gap: 10px; }
.pillars .card h3 .dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent-2); flex: none;
}

/* ---------- Game cards ---------- */

.game-card { display: flex; flex-direction: column; gap: 16px; }
.game-head { display: flex; gap: 16px; align-items: center; }
.game-icon {
  width: 72px; height: 72px; border-radius: 18px; flex: none; object-fit: cover;
  background: var(--accent-soft);
}
.game-head h3 { margin: 0 0 4px; }
.game-pitch { color: var(--muted); margin: 0; }

.status {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700;
  background: var(--accent-2-soft); color: var(--accent-2);
}
.status.released { background: var(--accent-soft); color: var(--accent); }

.shots {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; margin: 0 -4px;
}
.shots img {
  height: 220px; width: auto; border-radius: 12px; scroll-snap-align: start;
  border: 1px solid var(--line); margin: 0 4px;
}

.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 6px 14px; border-radius: 10px; text-decoration: none;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 0.95rem;
}
.store-badge svg { width: 20px; height: 20px; }
.store-badge.soon { background: transparent; color: var(--muted); border: 1px dashed var(--line); }

.featured {
  display: grid; gap: 24px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 24px;
}
@media (min-width: 820px) {
  .featured { grid-template-columns: 1.1fr 1fr; padding: 40px; }
}
.featured .game-icon { width: 96px; height: 96px; border-radius: 24px; }

.empty {
  text-align: center; color: var(--muted);
  border: 2px dashed var(--line); border-radius: 20px; padding: 40px 20px;
}

/* ---------- Forms ---------- */

.signup {
  background: var(--accent-soft); border-radius: 28px; padding: 28px 20px;
}
@media (min-width: 720px) { .signup { padding: 40px; } }

form .row { display: flex; flex-wrap: wrap; gap: 10px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 2px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit;
}
input:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 140px; resize: vertical; }
form .row input { flex: 1 1 220px; width: auto; }
.field { margin-bottom: 16px; }
.form-note { font-size: 0.9rem; color: var(--muted); margin-top: 10px; }
.form-status { font-weight: 600; margin-top: 10px; min-height: 1.6em; }

/* ---------- Founders ---------- */

.founder { display: flex; flex-direction: column; gap: 14px; }
.avatar {
  width: 88px; height: 88px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-2-soft); color: var(--accent-2);
  font-weight: 800; font-size: 1.6rem;
}
.founder .role { color: var(--muted); font-weight: 600; margin-top: -8px; }

/* ---------- Long-form (legal) ---------- */

.prose { max-width: 44em; }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.notice {
  border-left: 4px solid var(--accent-2); background: var(--accent-2-soft);
  padding: 12px 16px; border-radius: 0 12px 12px 0; margin-bottom: 24px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line); margin-top: 48px; padding: 32px 0 40px;
  color: var(--muted); font-size: 0.95rem;
}
.site-footer .wrap { display: grid; gap: 20px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
@media (min-width: 720px) {
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .site-nav a { transition: background-color 0.15s, filter 0.15s; }
}
