/* Brightmoat Studios — Kingdom Defense
   Dark fantasy: deep navy, royal blue, gold, stone.
   No frameworks. No tracking. */

@font-face {
  font-family: Cinzel;
  src: url("assets/fonts/cinzel.woff") format("woff");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3.woff") format("woff");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy-950: #070b16;
  --navy-900: #0b1220;
  --navy-800: #101a2e;
  --navy-700: #16233c;
  --royal: #1c3d7a;
  --royal-deep: #152a54;
  --gold: #d4b45a;
  --gold-bright: #f0d78c;
  --gold-dim: #8f7433;
  --cream: #f3ead8;
  --stone: #b7b0a3;
  --stone-dim: #8a8478;
  --ink: #e8e0d0;
  --danger: #6b3a8c;
  --max: 1120px;
  --header-h: 4.25rem;
  --radius-icon: 22.5%;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100%;
}

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

a { color: var(--gold-bright); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #fff4cc; }
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--navy-800);
  color: var(--cream);
  padding: 0.5rem 0.85rem;
  z-index: 100;
}
.skip:focus { top: 0.75rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--navy-950) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
}

.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--cream);
  line-height: 1;
  gap: 0.22rem;
}
.wordmark:hover { color: var(--gold-bright); }
.wordmark .name {
  font-family: Cinzel, "Palatino Linotype", Palatino, serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
}
.wordmark .role {
  font-family: Cinzel, serif;
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.38em;
  color: var(--gold);
}

.nav {
  display: flex;
  gap: 1.35rem;
}
.nav a {
  color: var(--stone);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}
.nav a:hover { color: var(--cream); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    url("assets/hero-keep.webp") center / cover no-repeat;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg,
      rgba(7, 11, 22, 0.90) 0%,
      rgba(7, 11, 22, 0.72) 36%,
      rgba(7, 11, 22, 0.35) 62%,
      rgba(7, 11, 22, 0.48) 100%),
    linear-gradient(180deg,
      rgba(7, 11, 22, 0.28) 0%,
      rgba(7, 11, 22, 0.08) 45%,
      rgba(7, 11, 22, 0.42) 100%);
}

.hero-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0 4.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.7fr);
  gap: 3rem;
  align-items: center;
}

.hero-copy { max-width: 36rem; }

.kicker {
  margin: 0 0 1rem;
  font-family: Cinzel, serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.game-lockup {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0 0 1.1rem;
}

.game-icon {
  width: 92px;
  height: 92px;
  border-radius: var(--radius-icon);
  box-shadow:
    0 0 0 2px var(--gold),
    0 0 0 5px color-mix(in srgb, var(--navy-950) 70%, transparent),
    0 12px 28px rgba(0, 0, 0, 0.45);
  background: var(--navy-800);
  flex-shrink: 0;
}

h1 {
  margin: 0;
  font-family: Cinzel, "Palatino Linotype", Palatino, serif;
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-wrap: balance;
}

.gold-rule {
  width: 4.5rem;
  height: 2px;
  margin: 1.15rem 0 1.2rem;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold-dim));
  border: 0;
}

.tagline {
  margin: 0 0 1.6rem;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.45;
  color: var(--cream);
  text-wrap: pretty;
  max-width: 30rem;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* Google badge already includes ~16% padding; keep a little extra clear space */
  gap: 0.15rem 0.35rem;
  margin: 0 0 0.55rem;
}

.store-row a {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
  /* clear space around badges (~1/4 of the tighter Apple badge height) */
  padding: 0.35rem;
}

/* Official badge artwork is unmodified. Heights are chosen so the
   black lozenges visually match: the Google PNG includes 41px padding
   on a 250px-tall asset; the Apple SVG is tight to its artwork. */
.badge-google { height: 80px; width: auto; }
.badge-apple  { height: 54px; width: auto; }

.coming-soon {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--stone);
  letter-spacing: 0.04em;
}

/* Phone frame for splash key art */
.device-wrap {
  display: flex;
  justify-content: flex-end;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.55));
}

.device {
  width: min(100%, 280px);
  aspect-ratio: 720 / 1155;
  padding: 10px;
  border-radius: 1.7rem;
  background:
    linear-gradient(160deg, #3a3a42, #16161c 40%, #0a0a0e);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--gold) 45%, #222),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.device img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.2rem;
}

/* ---------- About ---------- */
.about {
  padding: 4.25rem 0 4.5rem;
  background:
    radial-gradient(ellipse at top, rgba(28, 61, 122, 0.22), transparent 55%),
    var(--navy-900);
}

.about-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.about h2 {
  margin: 0 0 0.75rem;
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: 0.08em;
  color: var(--cream);
}

.lede {
  margin: 0 0 2.4rem;
  max-width: 40rem;
  color: var(--stone);
  font-size: 1.08rem;
}

.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--navy-800);
  border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
  border-radius: 0.7rem;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center center;
  background: var(--navy-950);
}

.shot figcaption {
  padding: 0.85rem 1rem 1rem;
  font-family: Cinzel, serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  border-top: 1px solid color-mix(in srgb, var(--gold) 16%, transparent);
}

.shot p {
  margin: 0.3rem 0 0;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0;
  color: var(--stone);
  font-weight: 400;
}

.roster {
  margin-top: 2.5rem;
}

.roster h3 {
  margin: 0 0 0.35rem;
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--cream);
}

.roster > p {
  margin: 0 0 1.25rem;
  color: var(--stone);
}

.roster-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
}

.roster-grid li {
  margin: 0;
  background: var(--navy-800);
  border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
  border-radius: 0.7rem;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .roster-grid li:hover {
    border-color: color-mix(in srgb, var(--gold) 60%, transparent);
    transform: translateY(-3px);
  }
}

.roster-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  background: #12161c;
}

.hero-name,
.hero-role {
  display: block;
  padding: 0 0.65rem;
  text-align: center;
}

.hero-name {
  padding-top: 0.65rem;
  font-family: Cinzel, serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--cream);
}

.hero-role {
  padding-bottom: 0.7rem;
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
  background: var(--navy-950);
  padding: 2rem 0 2.4rem;
}

.footer-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.85rem 2rem;
  color: var(--stone-dim);
  font-size: 0.9rem;
}

.footer-inner a { color: var(--stone); text-decoration: none; }
.footer-inner a:hover { color: var(--gold-bright); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

/* ---------- Privacy page ---------- */
.legal {
  width: min(42rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4.5rem;
}

.legal h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 0.6rem;
}

.draft-banner {
  display: inline-block;
  margin: 0 0 1.4rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--gold-dim);
  color: var(--gold-bright);
  font-family: Cinzel, serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.legal h2 {
  font-family: Cinzel, serif;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--cream);
  margin: 1.8rem 0 0.5rem;
}

.legal p, .legal li {
  color: var(--stone);
}

.legal ul { padding-left: 1.2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 2.4rem 0 3rem;
    gap: 2.2rem;
  }
  .device-wrap { justify-content: flex-start; }
  .device { width: min(100%, 230px); }
  .shots { grid-template-columns: 1fr; }
  .roster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .game-icon { width: 72px; height: 72px; }
  .badge-google { height: 70px; }
  .badge-apple { height: 47px; }
  .wordmark .name { font-size: 0.92rem; letter-spacing: 0.12em; }
  .hero-shade {
    background:
      linear-gradient(180deg,
        rgba(7, 11, 22, 0.55) 0%,
        rgba(7, 11, 22, 0.78) 38%,
        rgba(7, 11, 22, 0.9) 100%),
      linear-gradient(90deg,
        rgba(7, 11, 22, 0.7) 0%,
        rgba(7, 11, 22, 0.4) 100%);
  }
  .device-wrap { justify-content: center; }
}

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