/* Y-Bridge Games — site styles. Colors and type follow brand/BRANDING.md. */

@font-face {
  font-family: "Oswald";
  src: url("../brand/fonts/Oswald-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("../brand/fonts/Oswald-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../brand/fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../brand/fonts/Inter-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  /* Brass & Charcoal (studio look) */
  --ground: #1A1D24;
  --surface: #2A2F3A;
  --hairline: #3A404C;
  --brass: #C8A15A;
  --brass-pale: #E2CFA0;
  --text: #F2EDE2;
  --text-muted: #B9BEC8;
  /* Ink & Ivory (light version) */
  --ivory: #F7F3EA;
  --ink: #1F2A36;
  --teal: #2F7F8A;
  /* Gold & Oxblood (Shardfall colorway) */
  --gold: #D9B45A;
  --oxblood: #5A1E1E;

  --display: "Oswald", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --track: 0.14em;
  --max: 1080px;
  --gutter: 16px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

a { color: var(--brass-pale); text-underline-offset: 0.2em; }
a:hover { color: var(--brass); }
a:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track);
  color: var(--brass);
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 600; }
h2 { font-size: clamp(1.4rem, 3.6vw, 1.8rem); }
h3 { font-size: 1.15rem; color: var(--brass-pale); }

p { margin: 0 0 1em; }

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

.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 {
  position: absolute; left: var(--gutter); top: -40px;
  background: var(--brass); color: var(--ground); padding: 6px 12px; z-index: 10;
}
.skip:focus { top: 8px; }

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

.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .icon { width: 36px; height: 36px; }
.brand .wordmark { height: 18px; width: auto; }

.nav { display: flex; gap: 4px 22px; flex-wrap: wrap; }
.nav a {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: var(--track);
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--brass-pale); }
.nav a[aria-current="page"] { color: var(--brass); border-bottom-color: var(--brass); }

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

.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--hairline); }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 62ch; }
.prose { max-width: 68ch; }
.eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: var(--track);
  font-size: 0.85rem;
  color: var(--brass-pale);
  margin-bottom: 0.4em;
}

/* Home hero: crest needs clear space of 15% of its height on every side. */
.hero { text-align: center; padding: 72px 0 80px; }
.hero .crest { width: auto; height: clamp(200px, 38vw, 300px); margin: 0 auto 0.15em; padding: 0; }
.hero .crest-box { display: inline-block; padding: clamp(30px, 5.7vw, 45px); }
.hero .wordmark { height: clamp(22px, 4.4vw, 34px); width: auto; margin: 0 auto 22px; }
.hero .tagline {
  font-size: clamp(1.1rem, 2.8vw, 1.35rem);
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Game card (Shardfall, Gold & Oxblood) ---------- */

.game-card {
  display: grid;
  grid-template-columns: 1fr;
  background: linear-gradient(160deg, var(--oxblood) 0%, #3a1616 100%);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 28px var(--gutter);
  margin-top: 28px;
}
@media (min-width: 640px) { .game-card { padding: 36px 40px; } }
.game-card h3 {
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.3em;
}
.game-card p { color: var(--text); max-width: 60ch; }
.game-card .meta { color: var(--brass-pale); font-size: 0.95rem; margin: 0; }

.badge {
  display: inline-block;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: var(--track);
  font-size: 0.78rem;
  color: var(--ground);
  background: var(--gold);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 14px;
}

/* ---------- Press kit ---------- */

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--hairline);
}
.facts > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 560px) { .facts > div { grid-template-columns: 180px 1fr; } }
.facts dt {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: var(--track);
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 2px;
}
.facts dd { margin: 0; }

.assets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 18px;
  margin-top: 24px;
}
.asset {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.asset .preview {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: var(--ground);
}
.asset .preview.light { background: var(--ivory); }
.asset .preview img { max-height: 100%; width: auto; object-fit: contain; }
.asset .info { padding: 14px 16px 16px; }
.asset .info strong { display: block; font-weight: 500; }
.asset .info span { display: block; color: var(--text-muted); font-size: 0.9rem; }
.asset .info a { font-size: 0.95rem; }

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 14px;
  margin-top: 20px;
}
.swatch { border: 1px solid var(--hairline); border-radius: 8px; overflow: hidden; background: var(--surface); }
.swatch .chip { height: 64px; }
.swatch .label { padding: 8px 12px; font-size: 0.9rem; }
.swatch .label code { color: var(--text-muted); font-size: 0.85rem; }

.rules { padding-left: 1.2em; max-width: 68ch; }
.rules li { margin-bottom: 0.4em; }

.boiler {
  background: var(--surface);
  border-left: 3px solid var(--brass);
  padding: 18px 20px;
  border-radius: 0 8px 8px 0;
  max-width: 72ch;
}
.boiler p:last-child { margin-bottom: 0; }

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

.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--ground);
  padding: 36px 0 44px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.site-footer .wrap { display: grid; gap: 18px; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--brass); }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.social a { text-decoration: none; }
.social a:hover { text-decoration: underline; }
.copyright { margin: 0; }
@media (min-width: 760px) {
  .site-footer .wrap { grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; }
  .social { justify-content: center; }
}
