/* Beastform — beastform.app
   The app's dark palette (BeastformApp/Theme/Theme.swift), system fonts only.
   Nothing here loads from another site. */

:root {
  --bg-top: #20342A;
  --bg-bottom: #16241C;
  --panel: rgba(24, 41, 31, 0.88);
  --panel-solid: #18291F;
  --line: rgba(230, 237, 230, 0.10);
  --text: #E6EDE6;
  --muted: #A9BBAE;
  --heading: #C2D2C4;
  --moon: #ECD07F;
  --moon-soft: #F5E6B4;
  --teal: #67C3AF;
  --moss: #84AD6C;
  --blood: #800000;
  --blood-bright: #9A1414;
  --vitality: #3E8E45;
  --ink: #16241C;

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 16px;
  --measure: 40rem;
  color-scheme: dark;
}

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

html {
  background: var(--bg-bottom);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse 70rem 34rem at 50% -6rem, rgba(236, 208, 127, 0.16), transparent 70%),
    linear-gradient(var(--bg-top), var(--bg-bottom) 60rem) no-repeat,
    var(--bg-bottom);
}

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

a { color: var(--teal); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--moon-soft); }
:focus-visible { outline: 2px solid var(--moon); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--moon); color: var(--ink); padding: 0.5rem 0.9rem; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, var(--measure)); margin-inline: auto; }

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

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.1rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img.brand-mark { width: 34px; height: auto; }
.brand img.brand-word { width: 118px; height: auto; }
.site-nav { display: flex; gap: 1.4rem; font-size: 0.95rem; }
.site-nav a { color: var(--heading); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--moon-soft); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--moon); }

/* ---------- Hero ---------- */

.hero { text-align: center; padding: 2.5rem 0 3.5rem; }
.hero .mark { width: 132px; margin: 0 auto 1.4rem; }
.hero h1 { margin: 0; line-height: 1; }
.hero h1 img { width: min(360px, 78vw); margin-inline: auto; }
.tagline {
  font-family: var(--serif); font-style: italic; font-size: 1.45rem;
  color: var(--moon-soft); margin: 0.9rem 0 1.1rem;
}
.lede { max-width: 34rem; margin: 0 auto; color: var(--heading); font-size: 1.1rem; }

.cta { margin-top: 2rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.button {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--moon); color: var(--ink);
  font-weight: 650; font-size: 1.02rem; text-decoration: none;
  padding: 0.72rem 1.4rem; border-radius: 999px;
  box-shadow: 0 6px 22px rgba(236, 208, 127, 0.18);
}
.button:hover { color: var(--ink); background: var(--moon-soft); }
.button svg { width: 1.05rem; height: 1.05rem; }
.fine { font-size: 0.9rem; color: var(--muted); margin: 0; }

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

section { padding-block: 3.5rem; }
.section-head { text-align: center; margin-bottom: 2rem; }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--moon); margin: 0 0 0.5rem;
}
h2 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.15rem);
  line-height: 1.2; color: var(--moon-soft); margin: 0;
  text-wrap: balance;
}
.lede, .sub, .fine, .promise p { text-wrap: pretty; }
.section-head p.sub { color: var(--muted); margin: 0.6rem auto 0; max-width: 34rem; }

.rule {
  border: 0; height: 1px; margin: 0 auto; width: min(100% - 2.5rem, 68rem);
  background: linear-gradient(90deg, transparent, rgba(236, 208, 127, 0.35), transparent);
}

/* ---------- Edition toggle (mirrors the roster toggle) ---------- */

.edition-toggle {
  display: flex; width: max-content; max-width: 100%; margin: 0 auto 1.5rem;
  padding: 4px; gap: 4px; border-radius: 999px;
  background: rgba(132, 173, 108, 0.14); border: 1px solid rgba(132, 173, 108, 0.35);
}
.edition-toggle button {
  appearance: none; border: 0; cursor: pointer; font: inherit;
  display: inline-flex; align-items: baseline; gap: 0.4rem;
  padding: 0.45rem 1.1rem; border-radius: 999px; background: transparent; color: var(--muted);
}
.edition-toggle button .year { font-weight: 700; color: var(--heading); }
.edition-toggle button .table { font-size: 0.9rem; }
.edition-toggle button[aria-pressed="true"] { background: rgba(132, 173, 108, 0.32); }
.edition-toggle button[aria-pressed="true"] .year { color: var(--moon); }
.edition-toggle button[aria-pressed="true"] .table { color: var(--heading); }
.no-js .edition-toggle { display: none; }

.sample-caption { text-align: center; color: var(--muted); font-size: 0.95rem; margin: 0 0 1.25rem; }

/* ---------- Stat block card ---------- */

.samples { display: grid; gap: 1.5rem; justify-items: center; }
.js .samples > [hidden] { display: none; }
.no-js .samples > [hidden] { display: block; }

.statblock {
  position: relative; overflow: hidden; isolation: isolate;
  width: min(100%, 34rem);
  background: var(--panel); border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 18px 50px rgba(0,0,0,0.35);
  padding: 1.35rem 1.35rem 1.5rem;
  font-size: 0.98rem;
}
.statblock .art {
  position: absolute; z-index: -1; inset: 0 0 auto auto; width: 72%;
  aspect-ratio: 3 / 2; object-fit: cover; opacity: 0.30;
  -webkit-mask-image: linear-gradient(to left, #000 25%, transparent), linear-gradient(#000 40%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to left, #000 25%, transparent), linear-gradient(#000 40%, transparent);
  mask-composite: intersect;
}
.sb-edition {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--moon); margin-bottom: 0.35rem;
}
.sb-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; }
.sb-title h3 {
  font-family: var(--serif); font-weight: 700; font-size: 1.85rem; line-height: 1.15;
  color: var(--moon-soft); margin: 0;
}
.sb-type { font-family: var(--serif); font-style: italic; color: var(--muted); margin: 0.1rem 0 0.7rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0.9rem; padding: 0; list-style: none; }
.chip {
  font-size: 0.74rem; font-weight: 500; line-height: 1; padding: 0.38rem 0.6rem; border-radius: 999px;
  color: var(--teal); background: rgba(103, 195, 175, 0.16); border: 1px solid rgba(103, 195, 175, 0.45);
}
.chip.gold { color: var(--moon); background: rgba(236, 208, 127, 0.16); border-color: rgba(236, 208, 127, 0.45); }

.sb-line { margin: 0.35rem 0; }
.sb-line .k { color: var(--teal); font-weight: 600; margin-right: 0.45rem; }
.sb-note { display: block; font-size: 0.84rem; color: var(--muted); line-height: 1.45; margin-top: 0.1rem; }

.abilities {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 1rem 0;
  padding: 0; list-style: none; text-align: center;
}
.ab {
  border-radius: 8px; padding: 0.45rem 0.1rem 0.4rem;
  background: rgba(230, 237, 230, 0.05); border: 1px solid rgba(230, 237, 230, 0.10);
}
.ab.you { background: rgba(103, 195, 175, 0.14); border-color: rgba(103, 195, 175, 0.40); }
.ab .n { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; color: var(--moon); }
.ab.you .n, .ab.you .src { color: var(--teal); }
.ab .s { display: block; font-weight: 600; font-size: 1.1rem; line-height: 1.3; }
.ab .m { display: block; font-size: 0.8rem; color: var(--muted); }
.ab .src {
  display: inline-block; margin-top: 0.2rem; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--moon); padding: 0.05rem 0.3rem; border-radius: 999px; background: rgba(236, 208, 127, 0.18);
}
.ab.you .src { background: rgba(103, 195, 175, 0.18); }

.sb-section {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--heading); margin: 1.1rem 0 0.5rem; padding-top: 0.8rem; border-top: 1px solid var(--line);
}
.sb-desc { margin: 0.35rem 0; }
.sb-desc b { font-weight: 650; }
.attack { margin: 0.6rem 0; }
.attack h4 { margin: 0; font-size: 1rem; font-weight: 650; color: var(--moon-soft); }
.attack p { margin: 0.05rem 0; }
.attack .rider { font-size: 0.84rem; color: var(--muted); }

/* ---------- Features ---------- */

.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); }
.feature {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.4rem;
}
.feature h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--moon-soft); margin: 0 0 0.4rem; }
.feature p { margin: 0; color: var(--heading); font-size: 0.98rem; }
.feature .icon { width: 28px; height: 28px; color: var(--moon); margin-bottom: 0.7rem; }

.form-strip { display: flex; margin: 1rem 0 0; padding: 0; list-style: none; }
.form-strip li { margin-right: -10px; }
.form-strip img {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--panel-solid); box-shadow: 0 0 0 1px rgba(236, 208, 127, 0.35);
}

.also {
  display: grid; gap: 0.9rem 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 2rem 0 0; padding: 0; list-style: none;
}
.also li { color: var(--heading); font-size: 0.96rem; }
.also b { display: block; color: var(--text); font-weight: 600; }

/* ---------- Editions ---------- */

.editions { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.edition {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem;
}
.edition h3 { margin: 0 0 0.25rem; display: flex; align-items: baseline; gap: 0.5rem; }
.edition h3 .year { font-family: var(--serif); font-size: 1.6rem; color: var(--moon); }
.edition h3 .table { font-size: 1rem; color: var(--heading); font-weight: 500; }
.edition .src { margin: 0 0 0.9rem; color: var(--muted); font-size: 0.9rem; }
.edition ul { margin: 0; padding-left: 1.15rem; }
.edition li { margin: 0.35rem 0; color: var(--heading); }
.edition li::marker { color: var(--moss); }

/* ---------- Privacy band ---------- */

.promise { text-align: center; }
.promise .narrow {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.5rem;
}
.promise p { margin: 0.7rem auto 0; color: var(--heading); max-width: 30rem; }

/* ---------- Prose pages ---------- */

.page { padding: 1.5rem 0 4rem; }
.page h1 {
  font-family: var(--serif); font-weight: 600; color: var(--moon-soft);
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem); line-height: 1.15; margin: 1rem 0 0.3rem;
}
.page .updated { color: var(--muted); font-size: 0.92rem; margin: 0 0 2rem; }
.page h2 { font-size: 1.35rem; margin: 2.4rem 0 0.6rem; }
.page p, .page li { color: var(--heading); }
.page strong { color: var(--text); }
.page ul { padding-left: 1.2rem; }
.page li { margin: 0.4rem 0; }
.page li::marker { color: var(--moss); }
.summary {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--moon);
  border-radius: 12px; padding: 1rem 1.2rem; font-size: 1.05rem;
}
.summary p { margin: 0; color: var(--text); }

.contact-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; margin: 1.5rem 0 0;
}
.contact-card .email { font-size: 1.2rem; font-weight: 600; }

.faq details {
  border-bottom: 1px solid var(--line); padding: 0.2rem 0;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 0.85rem 2rem 0.85rem 0; position: relative;
  font-weight: 600; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.2rem; top: 0.7rem; font-size: 1.3rem; line-height: 1;
  color: var(--moon); font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq details > *:not(summary) { margin-top: 0; }
.faq details p { margin: 0 0 0.9rem; }

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

.site-footer { padding: 3rem 0 3.5rem; border-top: 1px solid var(--line); margin-top: 2rem; }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.site-footer nav a { color: var(--heading); text-decoration: none; }
.site-footer nav a:hover { color: var(--moon-soft); }
.site-footer .credit { color: var(--muted); font-size: 0.92rem; margin: 0; }
.legal { margin-top: 1.6rem; display: grid; gap: 0.7rem; }
.legal p { margin: 0; font-size: 0.8rem; line-height: 1.55; color: var(--muted); }
.legal a { color: var(--muted); }

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .site-nav { gap: 1rem; }
  .brand img.brand-word { width: 104px; }
  .hero { padding-top: 1.5rem; }
  .hero .mark { width: 108px; }
  .statblock { padding: 1.1rem 1rem 1.2rem; }
  .abilities { grid-template-columns: repeat(3, 1fr); }
  .edition-toggle button { padding: 0.45rem 0.85rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .site-nav a, .edition-toggle button { transition: background-color 0.2s, color 0.2s; }
}

.promise .eyebrow { color: var(--moon); margin: 0 0 0.5rem; }
