/* Stela Games – shared styles
   Layout idea: a night-sky board seen from above; hex tiles as the recurring motif, one gold "lightning" accent. */
:root {
  --night: #0f1a24;      /* page background */
  --slate: #182837;      /* raised surfaces */
  --line: #2a3e50;       /* hairlines, borders */
  --mist: #e8eee4;       /* main text */
  --muted: #a3b3b0;      /* secondary text */
  --bolt: #ffc83d;       /* accent: lightning gold */
  --leaf: #4cc29a;       /* friendly team / secondary accent */
  --ember: #e8684a;      /* enemy team, used sparingly */
  --font-display: "Alegreya SC", "Palatino Linotype", Georgia, serif;
  --font-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --step--1: 0.9rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.4rem, 6vw, 3.8rem);
  --radius: 10px;
  --wrap: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--night);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 66 0 50V18L28 2l28 16v32L28 66zm0 31L0 81' fill='none' stroke='%23ffffff' stroke-opacity='0.035' stroke-width='1'/%3E%3C/svg%3E");
  color: var(--mist);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}

a { color: var(--bolt); text-underline-offset: 3px; }
a:hover { color: #ffe08a; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--bolt); outline-offset: 3px; border-radius: 4px; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.prose { max-width: 68ch; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 26, 36, 0.92);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(6px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--mist); text-decoration: none; font-family: var(--font-display); font-size: var(--step-1); }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: var(--step--1); }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--mist); }

/* Hero */
.hero { padding-block: 56px 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--leaf); font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 46ch; }
.hero-art { width: 100%; height: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--bolt); color: #1a1405; font-weight: 700; text-decoration: none;
  border: 2px solid var(--bolt);
}
.btn:hover { background: #ffe08a; color: #1a1405; }
.btn.ghost { background: transparent; color: var(--mist); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--bolt); color: var(--mist); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Sections */
section { padding-block: 48px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }

.game-card {
  display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: center;
  background: var(--slate); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.game-card .status {
  display: inline-block; font-size: var(--step--1); padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--leaf); color: var(--leaf); margin-bottom: 10px;
}

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact { border-top: 2px solid var(--line); padding-top: 14px; }
.fact strong { display: block; font-family: var(--font-display); font-size: var(--step-2); color: var(--bolt); font-variant-numeric: tabular-nums; line-height: 1.1; }
.fact span { color: var(--muted); font-size: var(--step--1); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 32px; }
.feature h3 { color: var(--mist); }
.feature p { color: var(--muted); margin: 0; }

/* Weekly weather strip */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day {
  background: var(--slate); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 8px; text-align: center; min-width: 0;
}
.day svg { width: 34px; height: 34px; display: block; margin: 4px auto 6px; }
.day b { display: block; font-size: var(--step--1); color: var(--muted); font-weight: 500; }
.day span { display: block; font-size: var(--step--1); line-height: 1.3; overflow-wrap: anywhere; hyphens: manual; }
.day.today { border-color: var(--bolt); box-shadow: 0 0 0 1px var(--bolt) inset; }

.lore {
  border-left: 3px solid var(--bolt); padding: 4px 0 4px 20px; color: var(--mist);
  font-size: var(--step-1); font-style: italic; max-width: 60ch;
}

.note { background: var(--slate); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }

/* Legal pages */
.legal h2 { font-size: var(--step-2); margin-top: 1.6em; }
.legal h3 { margin-top: 1.2em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.4em; }
.legal table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.legal th { color: var(--muted); font-weight: 500; }
.table-scroll { overflow-x: auto; margin-bottom: 1em; }
.updated { color: var(--muted); font-size: var(--step--1); }

details { border-bottom: 1px solid var(--line); padding-block: 12px; }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 10px 0 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 32px; padding-block: 28px; color: var(--muted); font-size: var(--step--1); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--mist); }

@media (max-width: 760px) {
  .hero .wrap, .game-card { grid-template-columns: 1fr; }
  .hero { padding-block: 32px 16px; }
  .hero-art { max-width: 340px; margin-inline: auto; }
  .facts, .features { grid-template-columns: 1fr; }
  .week { grid-template-columns: repeat(4, 1fr); }
  section { padding-block: 32px; }
}

@media (prefers-reduced-motion: no-preference) {
  .bolt-flash { animation: flash 6s ease-in-out infinite; }
  @keyframes flash {
    0%, 86%, 100% { opacity: 1; }
    88% { opacity: 0.35; }
    90% { opacity: 1; }
    92% { opacity: 0.5; }
  }
}
