:root {
  --night: #0c1310;
  --night-2: #121c17;
  --night-3: #1a2820;
  --line: rgba(232, 214, 170, 0.16);
  --text: #ece6d6;
  --muted: #a8ad9c;
  --gold: #eebd59;
  --gold-hi: #ffd987;
  --gold-deep: #a87a22;
  --leaf: #9cc46a;
  --moss: #5e8a3a;
  --violet: #9a6ae0;
  --violet-hi: #c3a0ff;
  --parchment: #efe6cf;
  --parchment-2: #e5d9bb;
  --ink: #2b241a;
  --ink-muted: #6c5f4a;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --label: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Alegreya", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(17px, 1.05rem + 0.2vw, 20px);
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--gold-hi); }
::selection { background: var(--gold); color: var(--night); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

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

/* type */
.label {
  font-family: var(--label);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}
h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
}
h2 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.6rem); max-width: 14ch; }
h3 {
  font-family: var(--label);
  font-variation-settings: normal;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--gold);
}
.lede { font-size: 1.2em; max-width: 34ch; margin: 1.4rem 0 0; color: var(--text); }

/* buttons: cut-corner ward-stone plates */
.btn {
  --cut: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--label);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--night);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #d9a23f);
  border: 0;
  padding: 1.05em 1.8em;
  cursor: pointer;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn:hover { color: var(--night); filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost {
  color: var(--text);
  background: none;
  clip-path: none;
  padding-left: 0;
  padding-right: 0;
  border-bottom: 1px solid var(--line);
}
.btn.ghost:hover { color: var(--gold-hi); border-color: var(--gold); transform: none; }

/* header */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.top.solid { background: rgba(12, 19, 16, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 64px; }
.mark { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; font-weight: 600; font-size: 1.35rem; letter-spacing: 0.01em; }
.mark svg { width: 22px; height: 28px; flex: none; }
.mark:hover { color: var(--gold-hi); }
.top nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.top nav a:not(.btn) { font-family: var(--label); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text); text-decoration: none; opacity: 0.85; }
.top nav a:not(.btn):hover { color: var(--gold-hi); opacity: 1; }
.top .btn { padding: 0.8em 1.3em; font-size: 0.72rem; --cut: 7px; }
@media (max-width: 860px) { .top nav a:not(.btn) { display: none; } }

/* hero */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; align-items: end; isolation: isolate; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; z-index: -2; }
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(12, 19, 16, 0.55) 0%, rgba(12, 19, 16, 0) 22%),
    linear-gradient(0deg, var(--night) 0%, rgba(12, 19, 16, 0.86) 24%, rgba(12, 19, 16, 0.25) 52%, rgba(12, 19, 16, 0) 70%),
    linear-gradient(90deg, rgba(12, 19, 16, 0.7) 0%, rgba(12, 19, 16, 0) 55%);
}
.hero .wrap { padding-bottom: clamp(3rem, 8vh, 6rem); padding-top: 40vh; }
.hero h1 {
  font-size: clamp(4.2rem, 2rem + 11vw, 11rem);
  line-height: 0.86;
  letter-spacing: -0.03em;
  color: #fbf4e2;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}
.hero .pitch { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.55rem); line-height: 1.45; max-width: 30ch; margin: 1.4rem 0 2rem; color: #f2ecdc; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; }
.hero .status { margin-top: 2.6rem; display: flex; gap: 0.8rem; align-items: center; font-family: var(--label); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.hero .status::before { content: ""; width: 34px; height: 1px; background: var(--gold); }

/* sections */
section { position: relative; }
.band { padding: clamp(5rem, 11vw, 9.5rem) 0; }
.shot { margin: 0; position: relative; }
.shot img { width: 100%; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); }
.shot figcaption { font-family: var(--label); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 0.9rem; }

/* combat */
.combat { background: radial-gradient(120% 80% at 85% 10%, #1d1530 0%, rgba(29, 21, 48, 0) 60%), var(--night); }
.combat .grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: start; margin-top: clamp(2.5rem, 5vw, 4rem); }
.combat .shot { position: sticky; top: 96px; }
.moves { list-style: none; margin: 0; padding: 0; counter-reset: move; }
.moves li { counter-increment: move; padding: 1.4rem 0 1.5rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: 2.4rem 1fr; column-gap: 0.6rem; }
.moves li:last-child { border-bottom: 1px solid var(--line); }
.moves li::before { content: counter(move, upper-roman); grid-row: span 2; font-family: var(--label); font-size: 0.8rem; color: var(--violet-hi); padding-top: 0.15rem; }
.moves p { margin: 0.5rem 0 0; color: var(--muted); }
.combat .head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: end; }
.combat .head .lede { margin: 0; }

/* world */
.world {
  background:
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 30%, #15211a 70%, #1b1426 100%);
  overflow: hidden;
}
.world .grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.world h2 { color: #f4eedd; }
.tiers { margin: 2.4rem 0 0; padding: 0; list-style: none; position: relative; }
.tiers::before { content: ""; position: absolute; left: 5px; top: 0.6rem; bottom: 0.6rem; width: 1px; background: linear-gradient(var(--leaf), var(--gold), var(--violet)); }
.tiers li { position: relative; padding: 0 0 1.6rem 2rem; }
.tiers li::before { content: ""; position: absolute; left: 0; top: 0.45rem; width: 11px; height: 11px; transform: rotate(45deg); background: var(--night); border: 1px solid var(--leaf); }
.tiers li:nth-child(2)::before { border-color: var(--gold); }
.tiers li:nth-child(3)::before { border-color: var(--violet-hi); background: var(--violet); }
.tiers strong { display: block; font-family: var(--label); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text); font-weight: 600; }
.tiers span { color: var(--muted); }
.blight { margin-top: clamp(4rem, 8vw, 7rem); padding-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid rgba(195, 160, 255, 0.22); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.blight p.big { font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.6rem); line-height: 1.15; margin: 0; color: #ece2ff; }
.blight p.big em { color: var(--violet-hi); font-style: italic; }
.blight p { margin: 0 0 1rem; color: var(--muted); }

/* together */
.together { background: #1b1426; }
.together .wrap { position: relative; }
.together .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.together .cols > div { border-top: 2px solid var(--gold); padding-top: 1.4rem; }
.together .cols p { margin: 0.7rem 0 0; color: var(--muted); }
.together { background: linear-gradient(180deg, #1b1426 0%, var(--night) 100%); }

/* peoples */
.peoples { background: var(--parchment); color: var(--ink); }
.peoples::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background: radial-gradient(60% 50% at 20% 0%, rgba(255, 255, 255, 0.6), transparent 70%), radial-gradient(50% 60% at 100% 100%, rgba(170, 140, 90, 0.18), transparent 70%);
}
.peoples .wrap { position: relative; }
.peoples .label { color: var(--gold-deep); }
.peoples h2 { color: var(--ink); }
.peoples .lede { color: var(--ink-muted); }
.lineup { display: grid; grid-template-columns: 793fr 624fr 793fr 785fr; gap: clamp(0.5rem, 2.4vw, 2.5rem); align-items: end; margin-top: clamp(2.5rem, 5vw, 4.5rem); width: min(calc(100vw - 2 * var(--gutter)), 1400px); position: relative; left: 50%; transform: translateX(-50%); }
.lineup figure { margin: 0; }
.lineup img { width: 100%; }
.lineup figcaption { border-top: 1px solid rgba(43, 36, 26, 0.25); padding-top: 1rem; margin-top: 0.4rem; }
.lineup figcaption b { display: block; font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; font-weight: 600; font-size: 1.6rem; line-height: 1.1; }
.lineup figcaption span { display: block; font-size: 0.95rem; color: var(--ink-muted); margin-top: 0.35rem; max-width: 26ch; }
.peoples .note { font-family: var(--label); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); margin-top: 2.2rem; }
@media (max-width: 860px) {
  .lineup { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
}

/* lore */
.lore { background: var(--night); }
.lore .banner { position: relative; height: clamp(260px, 42vw, 560px); overflow: hidden; }
.lore .banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.lore .banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--night) 0%, rgba(12, 19, 16, 0.2) 35%, rgba(12, 19, 16, 0.35) 65%, var(--night) 100%); }
.chronicle { max-width: 40rem; margin: clamp(-7rem, -9vw, -3rem) auto 0; position: relative; padding: 0 var(--gutter) clamp(5rem, 10vw, 8rem); }
.chronicle h2 { max-width: none; text-align: center; font-style: italic; font-weight: 500; color: #fbf1d8; }
.chronicle .label { text-align: center; }
.chronicle .text { margin-top: 2.6rem; font-size: 1.12em; line-height: 1.75; color: #ded7c5; }
.chronicle .text p { margin: 0 0 1.4rem; }
.chronicle .text p:first-child::first-letter { font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 144; font-weight: 600; float: left; font-size: 4.4em; line-height: 0.82; padding: 0.08em 0.1em 0 0; color: var(--gold); }
.chronicle .word { font-style: italic; color: var(--gold-hi); }
.chronicle .vesh { font-style: italic; color: var(--violet-hi); }
.chronicle .hook { font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; font-style: italic; font-size: 1.45em; line-height: 1.3; text-align: center; color: #fbf1d8; margin: 3rem 0 0; padding-top: 2.4rem; border-top: 1px solid var(--line); }
.chronicle .age { display: block; margin-top: 1.4rem; font-family: var(--label); font-style: normal; font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }

/* devlog teaser */
.log { background: var(--night-2); border-top: 1px solid var(--line); }
.log .wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.entries { list-style: none; margin: 0; padding: 0; }
.entries a { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: 1.6rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.entries time { font-family: var(--label); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding-top: 0.5rem; }
.entries b { display: block; font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; font-weight: 600; font-size: 1.7rem; line-height: 1.15; }
.entries span { display: block; color: var(--muted); margin-top: 0.4rem; }
.entries a:hover b { color: var(--gold-hi); }
@media (max-width: 560px) { .entries a { grid-template-columns: 1fr; gap: 0.4rem; } .entries time { padding: 0; } }

/* join */
.join {
  background:
    radial-gradient(70% 90% at 50% 120%, rgba(238, 189, 89, 0.22), transparent 70%),
    linear-gradient(180deg, var(--night-2), var(--night));
  text-align: center;
  border-top: 1px solid var(--line);
}
.join h2 { margin: 0 auto; max-width: 16ch; color: #fbf1d8; }
.join .lede { margin: 1.4rem auto 0; color: var(--muted); }
.signup { margin: 2.8rem auto 0; max-width: 34rem; }
.signup .row { display: flex; gap: 0; border: 1px solid rgba(238, 189, 89, 0.5); background: rgba(12, 19, 16, 0.7); }
.signup input[type="email"] { flex: 1; min-width: 0; font: inherit; color: var(--text); background: transparent; border: 0; padding: 1rem 1.1rem; }
.signup input[type="email"]::placeholder { color: #7f8576; }
.signup input[type="email"]:focus { outline: none; }
.signup .row:focus-within { border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(238, 189, 89, 0.18); }
.signup .btn { --cut: 0px; clip-path: none; white-space: nowrap; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup .msg { min-height: 1.6em; margin: 1rem 0 0; color: var(--muted); }
.signup .msg.err { color: #ffb4a1; }
.signup[aria-busy="true"] .btn { opacity: 0.7; pointer-events: none; }
.joined { display: none; margin: 2.8rem auto 0; max-width: 30rem; }
.joined .sigil { width: 46px; height: 58px; margin: 0 auto 1.2rem; color: var(--gold); filter: drop-shadow(0 0 18px rgba(255, 217, 135, 0.6)); }
.joined p { margin: 0; font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; font-size: 1.8rem; line-height: 1.2; color: #fbf1d8; }
.joined small { display: block; margin-top: 0.7rem; color: var(--muted); font-size: 1rem; }
.join.done .signup { display: none; }
.join.done .joined { display: block; }
@media (max-width: 520px) {
  .signup .row { flex-direction: column; border: 0; background: none; gap: 0.75rem; }
  .signup input[type="email"] { border: 1px solid rgba(238, 189, 89, 0.5); background: rgba(12, 19, 16, 0.7); }
  .signup input[type="email"]:focus { border-color: var(--gold-hi); }
  .signup .row:focus-within { box-shadow: none; }
  .signup .btn { justify-content: center; }
}

/* footer */
.foot { background: var(--night); border-top: 1px solid var(--line); padding: 3rem 0; font-size: 0.95rem; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.2rem 2rem; }
.foot .links { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; align-items: center; }
.foot .links a { color: var(--muted); text-decoration: none; }
.foot .links a:hover { color: var(--gold-hi); }
.foot .email { color: var(--text); user-select: all; -webkit-user-select: all; }

/* devlog pages */
.page-head { padding: clamp(8rem, 16vw, 11rem) 0 clamp(2.5rem, 5vw, 4rem); background: radial-gradient(80% 100% at 50% 0%, #1c2a20 0%, var(--night) 70%); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.8rem, 1.6rem + 5vw, 5.6rem); max-width: 16ch; }
.page-head .meta { margin-top: 1.4rem; font-family: var(--label); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.article { max-width: 40rem; margin: 0 auto; padding: clamp(3rem, 6vw, 5rem) var(--gutter) clamp(5rem, 9vw, 8rem); font-size: 1.1em; line-height: 1.75; color: #ded7c5; }
.article p { margin: 0 0 1.4rem; }
.article h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); margin: 3rem 0 1rem; max-width: none; color: #f4eedd; }
.article ul { padding-left: 1.2rem; margin: 0 0 1.4rem; }
.article li { margin-bottom: 0.7rem; }
.article li::marker { color: var(--gold); }
.article strong { color: var(--text); }
.article .shot { margin: 2.4rem 0; }
.article .sign { font-family: var(--display); font-style: italic; font-size: 1.4em; color: var(--gold); margin-top: 2.6rem; }
.devlog-index { padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 9vw, 8rem); }
.devlog-index .entries { max-width: 52rem; }

@media (max-width: 860px) {
  .combat .grid, .combat .head, .world .grid, .blight, .log .wrap { grid-template-columns: 1fr; }
  .together .cols { grid-template-columns: 1fr; }
  .world .shot { order: -1; }
  .combat .shot { position: static; }
  .hero .wrap { padding-top: 34vh; }
}
@media (max-width: 520px) {
  .hero picture img { object-position: 50% 30%; }
  .hero .actions .btn:not(.ghost) { width: 100%; justify-content: center; }
}
.joined:focus { outline: none; }
.log .all { grid-column: 2; margin: 1.2rem 0 0; font-family: var(--label); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.log .all a { color: var(--muted); text-decoration: none; }
.log .all a:hover { color: var(--gold-hi); }
@media (max-width: 860px) { .log .all { grid-column: 1; } }
.entries li + li a { border-top: 0; }
.article img { width: 100%; margin: 2.4rem 0; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); }
.article blockquote { margin: 2rem 0; padding-left: 1.2rem; border-left: 2px solid var(--gold); font-style: italic; color: var(--text); }
.article code { font-size: 0.9em; background: var(--night-3); padding: 0.1em 0.35em; }
.article .cta { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
