/*
  Seedfire Studios site stylesheet.
  Colours and display font come from Brand/brand-colors.css.
*/

@font-face {
  font-family: "Marcellus SC";
  src: url("../fonts/MarcellusSC-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --sf-forest-deep: #0B1612;
  --sf-forest: #173A2D;
  --sf-brass: #C9A45C;
  --sf-brass-dark: #8A6A2E;
  --sf-gold-light: #E8C77E;
  --sf-emerald: #3FB68B;
  --sf-emerald-dark: #1F7A55;
  --sf-cream: #F4EFE6;
  --sf-parchment: #F6F1E7;
  --sf-ink-green: #0E2A20;
  --sf-ember: #F0602A;
  --sf-flame-red: #C42A1E;
  --sf-flame-gold: #FFE29A;
  --sf-seed-bronze: #6B4220;

  --font-display: "Marcellus SC", "Cinzel", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: var(--sf-forest-deep);
  --surface: #10201A;
  --surface-raised: #142a21;
  --text: #E6E1D6;
  --text-muted: #A8B3AC;
  --line: rgba(201, 164, 92, 0.28);
  --radius: 14px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(23, 58, 45, 0.9), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

main { flex: 1; }

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

a { color: var(--sf-gold-light); text-underline-offset: 3px; }
a:hover { color: var(--sf-flame-gold); }

:focus-visible { outline: 2px solid var(--sf-emerald); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--sf-gold-light);
  line-height: 1.2;
  letter-spacing: 0.06em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--sf-gold-light); color: var(--sf-ink-green);
  padding: 8px 14px; border-radius: 6px; z-index: 10;
}
.skip-link:focus { left: 8px; }

/* Header and navigation */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 22, 18, 0.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 5;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 24px; flex-wrap: wrap;
  padding-top: 10px; padding-bottom: 10px;
}
.brand { display: block; flex-shrink: 0; }
.brand-mark { height: 52px; width: auto; }

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 22px;
}
.site-nav a {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--sf-gold-light);
  border-bottom-color: var(--sf-brass);
}

/* Buttons and small UI */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--sf-brass);
  color: var(--sf-gold-light);
  background: transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: rgba(201, 164, 92, 0.12); color: var(--sf-flame-gold); }
.btn-primary {
  background: linear-gradient(180deg, #F27A3E, var(--sf-ember));
  border-color: var(--sf-ember);
  color: #1a0b05;
}
.btn-primary:hover { background: linear-gradient(180deg, #F58B52, #F26B34); color: #1a0b05; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.eyebrow {
  font-family: var(--font-display);
  color: var(--sf-emerald);
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 0.8em;
}

.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.badge-released { color: var(--sf-emerald); }
.badge-soon { color: var(--sf-ember); }

/* Ornamental divider echoing the alchemy triangle in the mark */

.divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--sf-brass);
  margin: 0 auto 2.2rem;
  max-width: 280px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider span {
  width: 0; height: 0;
  border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-bottom: 12px solid var(--sf-brass);
}

/* Sections */

.section { padding: clamp(48px, 8vw, 88px) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head p { color: var(--text-muted); }

/* Hero */

.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 6vw, 70px); text-align: center; }
.hero-mark {
  width: clamp(150px, 26vw, 230px);
  margin: 0 auto 1.6rem;
  filter: drop-shadow(0 0 40px rgba(240, 96, 42, 0.25));
}
.hero h1 { letter-spacing: 0.22em; margin-bottom: 0.3em; }
.hero .tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}
.hero .btn-row { justify-content: center; }

/* Game cards */

.game-group + .game-group { margin-top: 3.5rem; }
.game-group > h3 {
  color: var(--text-muted);
  letter-spacing: 0.3em;
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 22px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--sf-brass);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  color: inherit;
}
.game-card .cover { aspect-ratio: 16 / 9; }
.game-card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-card h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--sf-gold-light);
  letter-spacing: 0.08em;
  font-size: 1.2rem;
  margin: 0;
}
.game-card p { color: var(--text-muted); font-size: 0.97rem; margin: 0; }
.game-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.game-card .platforms { font-size: 0.85rem; color: var(--text-muted); }

/* Placeholder cover used until real key art exists */

.cover-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 60%, rgba(240, 96, 42, 0.22), transparent 55%),
    linear-gradient(160deg, var(--sf-forest), var(--sf-forest-deep));
}
.cover-placeholder img { width: 30%; max-width: 140px; opacity: 0.85; }

/* Game detail page */

.game-hero { padding: clamp(36px, 6vw, 64px) 0 0; }
.game-hero .cover {
  aspect-ratio: 21 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 2rem;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}
.game-facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.game-facts dl { margin: 0; display: grid; gap: 12px; }
.game-facts dt { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.game-facts dd { margin: 0; }
.game-facts .btn-row { margin-top: 20px; flex-direction: column; }

.trailer {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 2rem 0;
  background: var(--surface);
}
.trailer iframe { width: 100%; height: 100%; border: 0; }

/* Prose pages: about, legal */

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 2.2em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.6em; color: var(--sf-cream); font-size: 1.12rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose .updated { color: var(--text-muted); font-size: 0.95rem; }

.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--sf-gold-light); font-weight: 600; }
.table-wrap { overflow-x: auto; }

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 1.5rem 0 2rem;
}
.toc ol { margin: 0; columns: 2 220px; }

.callout {
  border-left: 3px solid var(--sf-emerald);
  background: rgba(63, 182, 139, 0.08);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 1.2em 0;
}

/* Contact cards */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.contact-card h3 { font-size: 1.1rem; margin-bottom: 0.4em; }
.contact-card p { color: var(--text-muted); font-size: 0.96rem; }
.contact-card a { word-break: break-word; }

/* Founder block */

.founder {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin: 2rem 0;
}
.founder .avatar {
  width: 140px; aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--sf-brass);
  overflow: hidden;
}
.founder h3 { margin-bottom: 0.2em; }
.founder .role { color: var(--sf-emerald); font-family: var(--font-display); letter-spacing: 0.2em; font-size: 0.85rem; margin-bottom: 0.8em; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 28px;
  color: var(--text-muted);
  font-size: 0.93rem;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 28px;
}
.footer-brand img { width: 64px; margin-bottom: 10px; }
.site-footer h2 { font-size: 0.85rem; letter-spacing: 0.24em; color: var(--sf-brass); margin-bottom: 0.8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--sf-gold-light); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 28px; padding-top: 18px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* 404 */

.not-found { text-align: center; padding: 90px 0; }
.not-found img { width: 120px; margin: 0 auto 1.5rem; opacity: 0.9; }

/* Responsive */

@media (max-width: 860px) {
  .game-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .brand-mark { height: 42px; }
  .site-nav ul { gap: 2px 16px; }
  .founder { grid-template-columns: 1fr; text-align: center; }
  .founder .avatar { margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
