/* LazySaiyan site — one scale, one component set.
   Colors mirror the Underlooter64 palette (scripts/palette.gd) so the site and the
   game speak the same language: night backdrop, brass hairlines, gold accent. */

:root {
  --night: #050e1a;
  --navy: #0d2140;
  --plate: #16313b;
  --slate: #495169;

  --brass: #cc8029;
  --brass-dim: #7a5e37;
  --gold: #ffb938;
  --gold-lit: #fad937;

  --cream: #f2f2da;
  --cream-dim: #c6cbc0;
  --ink-on-gold: #16150c;

  --rule: rgba(204, 128, 41, 0.34);
  --rule-soft: rgba(204, 128, 41, 0.16);

  --radius: 4px;
  --measure: 62ch;

  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2.5rem;
  --s5: 4rem;
  --s6: 6rem;
}

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

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

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
}

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

a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-lit); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold-lit); outline-offset: 3px; }

h1, h2, h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--cream);
  margin: 0;
}

h1 { font-size: clamp(2rem, 4.6vw, 2.9rem); margin-bottom: var(--s3); }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.1rem); margin-bottom: var(--s2); }
h3 { font-size: 1.15rem; letter-spacing: 0; }

p { margin: 0 0 var(--s2); }

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

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

.site-head {
  border-bottom: 1px solid var(--rule-soft);
  padding: var(--s3) 0;
}

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s2) var(--s4);
}

.brand {
  font-family: Fraunces, Georgia, serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--gold-lit); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-left: auto;
  font-size: 0.95rem;
}

.site-nav a { color: var(--cream-dim); text-decoration: none; }
.site-nav a:hover { color: var(--gold-lit); }
.site-nav a[aria-current="page"] { color: var(--gold); }

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

section { padding: var(--s5) 0; }
section + section { border-top: 1px solid var(--rule-soft); }

.lede { font-size: 1.2rem; color: var(--cream); }
.muted { color: var(--cream-dim); }
.small { font-size: 0.92rem; }

.section-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 var(--s2);
  font-weight: 600;
}

/* ---- Buttons: defined once, identical everywhere ---- */

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink-on-gold);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover { background: var(--gold-lit); border-color: var(--gold-lit); color: var(--ink-on-gold); }
.btn:active { background: var(--brass); border-color: var(--brass); }

.btn--ghost { background: transparent; border-color: var(--rule); color: var(--cream); }
.btn--ghost:hover { background: rgba(204, 128, 41, 0.12); border-color: var(--gold); color: var(--cream); }
.btn--ghost:active { background: rgba(204, 128, 41, 0.2); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }

/* ---- Hero: asymmetric, copy left, real screenshot right ---- */

.hero { padding: var(--s6) 0 var(--s5); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
}

.hero-shot { align-self: center; width: 100%; max-width: 340px; margin-left: auto; }

/* width:100% keeps the wordmark inside the column at 375px; without it the fixed
   max-width wins over the global img rule and the page scrolls sideways. */
.wordmark { width: 100%; max-width: 460px; margin-bottom: var(--s3); }

/* ---- Index list: numbered editorial rows, not an icon-card grid ---- */

.index-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: var(--s3);
  padding: var(--s3) 0;
  border-top: 1px solid var(--rule-soft);
}
.index-row:last-child { border-bottom: 1px solid var(--rule-soft); }

.index-num {
  font-family: Fraunces, Georgia, serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--brass);
}

.index-row h3 { margin-bottom: 0.35rem; }
.index-row p { margin-bottom: 0.35rem; max-width: var(--measure); }

/* ---- Feature: dominant screenshot beside prose ---- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--s5);
  align-items: center;
}
.split--flip .split-media { order: 2; }

/* Portrait phone shots are 760x1500. Left unconstrained they tower over the prose,
   so every shot in a split is capped and centred in its column. */
.split-media > img { width: 100%; max-width: 320px; margin: 0 auto; }

.shot-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
  max-width: 440px;
  margin: 0 auto;
}
.split-media.shot-pair > img { max-width: 100%; }

/* ---- Definition list for feature detail ---- */

.deflist { margin: 0; max-width: var(--measure); }
.deflist dt {
  font-family: Fraunces, Georgia, serif;
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: var(--s3);
}
.deflist dt:first-child { margin-top: 0; }
.deflist dd { margin: 0.25rem 0 0; color: var(--cream-dim); }

/* ---- Panel: used for the disclosure block and prose pages ---- */

.panel {
  background: var(--navy);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--s3);
}

.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--s4); }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { word-break: break-word; }

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

.site-foot {
  border-top: 1px solid var(--rule-soft);
  padding: var(--s4) 0 var(--s5);
  color: var(--cream-dim);
  font-size: 0.92rem;
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.site-foot a { color: var(--cream-dim); }
.site-foot a:hover { color: var(--gold-lit); }
.site-foot .foot-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---- Mobile ---- */

@media (max-width: 760px) {
  body { font-size: 16px; }
  section { padding: var(--s4) 0; }
  .hero { padding: var(--s4) 0; }
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .split--flip .split-media { order: 0; }
  .hero-shot { max-width: 340px; margin-left: 0; }
  .site-nav { margin-left: 0; width: 100%; gap: var(--s2) var(--s3); }
  .site-foot .foot-links { margin-left: 0; width: 100%; }
  .btn { padding: 0.75rem 1.25rem; }
  .index-row { grid-template-columns: 2.4rem minmax(0, 1fr); gap: var(--s2); }
}

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