/* Echoes of Avarin — site
   Dark lacquer, gold, parchment: the game's own palette. Cinzel for display, the system's
   humanist sans for reading. No framework, no build step. */

:root {
  --ink: #0b0810;
  --lacquer: #14101b;
  --plate: #1b1524;
  --line: rgba(201, 162, 39, 0.28);
  --gold: #c9a227;
  --gold-bright: #e8c56a;
  --parchment: #ece3cf;
  --muted: #9a8f7a;
  --harm: #e02b54;
  --max: 1120px;
  --serif: "Cinzel", "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.04em; margin: 0; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); color: var(--gold-bright); }
h3 { font-size: 1.15rem; color: var(--gold-bright); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8em;
}
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

/* --- buttons: the game's setting, drawn in CSS */
.btn {
  display: inline-block;
  padding: 0.85em 1.8em;
  border-radius: 999px;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(201,162,39,0.14), rgba(201,162,39,0.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 0 1px rgba(0,0,0,0.6);
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 24px rgba(201,162,39,0.25); }
.btn:active { transform: scale(0.97); }
.btn.soon { opacity: 0.55; pointer-events: none; border-style: dashed; }
.btn.primary {
  color: #2c1806;
  background: linear-gradient(180deg, #f2d27a, #c9a227 55%, #a37f14);
  border-color: #f2d27a;
}
.btn.primary:hover { color: #1a0e02; box-shadow: 0 0 32px rgba(232,197,106,0.45); }
.btn + .btn { margin-left: 12px; }

/* --- nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11,8,16,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,162,39,0.14);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav .brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); letter-spacing: 0.18em; font-size: 0.8rem; color: var(--parchment); text-transform: uppercase; }
.nav .brand img { height: 30px; width: auto; }
.nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.nav li a { font-family: var(--serif); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.nav li a:hover { color: var(--gold-bright); }
.nav .alpha-tag { font-family: var(--serif); font-size: 0.7rem; letter-spacing: 0.2em; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--gold-bright); }
@media (max-width: 760px) { .nav ul { display: none; } }

/* --- hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(201,162,39,0.14);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: url("assets/valley.jpg") center 30% / cover no-repeat;
  opacity: 0.22;
  filter: blur(18px) saturate(0.8);
  transform: scale(1.1);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,8,16,0.2), rgba(11,8,16,0.95) 85%);
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.08; color: var(--parchment); }
.hero h1 em { font-style: normal; color: var(--gold-bright); }
.hero .lede { font-size: 1.2rem; color: #d9cfb9; max-width: 34em; margin: 1.2em 0 1.8em; }
.hero .art {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,162,39,0.25);
  max-width: 400px;
  justify-self: center;
}
.hero .art img { width: 100%; height: auto; }
.hero .facts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 1.6em; color: var(--muted); font-size: 0.9rem; }
.hero .facts span::before { content: "◆"; color: var(--gold); font-size: 0.6em; margin-right: 0.7em; vertical-align: middle; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; }
  .hero .art { max-width: 320px; order: -1; }
  .btn + .btn { margin-left: 0; margin-top: 12px; }
}

/* --- sections */
section { padding: 80px 0; border-bottom: 1px solid rgba(201,162,39,0.10); }
section .intro { max-width: 40em; color: #d9cfb9; margin-bottom: 2.4em; }

.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.pillar {
  background: linear-gradient(180deg, var(--plate), var(--lacquer));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 26px 20px;
  position: relative;
}
.pillar::before {
  content: attr(data-n);
  position: absolute; top: 18px; right: 22px;
  font-family: var(--serif); color: rgba(201,162,39,0.35); font-size: 0.85rem; letter-spacing: 0.2em;
}
.pillar h3 { margin-bottom: 0.5em; }
.pillar p { color: #cfc5ae; margin: 0; }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }

/* --- bosses */
.bosses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.boss { position: relative; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--lacquer); }
.boss img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; transition: transform 0.6s ease; }
.boss:hover img { transform: scale(1.04); }
/* The words under the picture, not over it: the art stays whole and the line stays legible. */
.boss .cap { padding: 12px 14px 14px; background: var(--lacquer); border-top: 1px solid var(--line); min-height: 6.2em; }
.boss .cap b { display: block; font-family: var(--serif); font-weight: 600; letter-spacing: 0.08em; color: var(--gold-bright); font-size: 0.95rem; }
.boss .cap span { display: block; color: #cfc5ae; font-size: 0.9rem; line-height: 1.4; margin-top: 4px; }
.boss .n { position: absolute; top: 10px; left: 12px; font-family: var(--serif); color: rgba(236,227,207,0.8); font-size: 0.8rem; letter-spacing: 0.2em; text-shadow: 0 1px 6px #000; }
@media (max-width: 900px) { .bosses { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) {
  /* A row to swipe through, one boss at a time, rather than five thumbnails. */
  .bosses { display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
  .boss { flex: 0 0 66vw; scroll-snap-align: center; }
}

/* --- the run, as a ladder */
.ladder { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.ladder ol { margin: 0; padding-left: 1.2em; color: #d9cfb9; }
.ladder li { margin-bottom: 0.7em; }
.ladder li b { color: var(--parchment); }
.principles { background: linear-gradient(180deg, var(--plate), var(--lacquer)); border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.principles ul { list-style: none; padding: 0; margin: 0; }
.principles li { padding: 0.55em 0; border-top: 1px solid rgba(201,162,39,0.12); color: #cfc5ae; }
.principles li:first-child { border-top: 0; }
.principles li::before { content: "✕"; color: var(--harm); font-weight: 700; margin-right: 0.8em; }
.principles li.yes::before { content: "◆"; color: var(--gold); }
@media (max-width: 760px) { .ladder { grid-template-columns: 1fr; } }

/* --- skills: the vine beside the words */
.tree { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.tree ol { margin: 0; padding-left: 1.2em; color: #d9cfb9; }
.tree li { margin-bottom: 0.7em; }
.tree li b { color: var(--parchment); }
.vine { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--lacquer); }
.vine img { width: 100%; height: auto; }
.vine figcaption { padding: 12px 16px 14px; color: #cfc5ae; font-size: 0.9rem; line-height: 1.4; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .tree { grid-template-columns: 1fr; } .vine { max-width: 420px; } }

/* --- alpha */
.alpha .card {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 36px;
  background: linear-gradient(180deg, var(--plate), var(--lacquer));
  border: 1px solid var(--gold); border-radius: 16px; padding: 34px;
  box-shadow: 0 0 60px rgba(201,162,39,0.08);
}
.alpha dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 1.4em; }
.alpha dt { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; font-family: var(--serif); padding-top: 3px; }
.alpha dd { margin: 0; color: #d9cfb9; }
.alpha .honest { border-left: 2px solid var(--gold); padding-left: 16px; color: #cfc5ae; }
.alpha .honest b { color: var(--parchment); }
.alpha .steps { color: #cfc5ae; padding-left: 1.2em; margin: 0.6em 0 0; }
@media (max-width: 760px) { .alpha .card { grid-template-columns: 1fr; padding: 24px; } }

/* --- support */
.support .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.support .way { border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: var(--lacquer); }
.support .way p { color: #cfc5ae; margin: 0.4em 0 1em; }
@media (max-width: 760px) { .support .grid { grid-template-columns: 1fr; } }

/* --- trailer */
.trailer-dialog { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.trailer-dialog::backdrop { background: rgba(0,0,0,0.85); }
.trailer-dialog .box { position: relative; }
.trailer-dialog video { height: min(88vh, 1280px); width: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 30px 80px #000; }
.trailer-dialog .close {
  position: absolute; top: -14px; right: -14px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--gold); background: var(--ink); color: var(--gold-bright);
  font-size: 20px; cursor: pointer;
}

/* --- a boss, full size */
.boss a.open { display: block; cursor: zoom-in; }
/* The dialog keeps room at its sides for the step buttons: hung outside the picture, they
   used to overflow the dialog and give it a scrollbar. */
.boss-dialog { overflow: visible; }
.boss-dialog .box { display: flex; flex-direction: column; align-items: center; padding: 0 30px; }
.boss-dialog img { height: auto; width: auto; max-width: calc(92vw - 60px); max-height: 78vh; max-height: 78dvh; object-fit: contain; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 30px 80px #000; }
.boss-dialog .cap { margin-top: 14px; text-align: center; max-width: 34em; }
.boss-dialog .cap b { display: block; font-family: var(--serif); font-weight: 600; letter-spacing: 0.08em; color: var(--gold-bright); font-size: 1rem; }
.boss-dialog .cap span { display: block; color: #cfc5ae; font-size: 0.95rem; line-height: 1.4; margin-top: 4px; }
.boss-dialog .step {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--gold); background: var(--ink); color: var(--gold-bright);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.boss-dialog .prev { left: 4px; }
.boss-dialog .next { right: 4px; }
.boss-dialog .close { top: -12px; right: 12px; }
@media (max-width: 640px) {
  .boss-dialog img { max-height: 70vh; max-height: 70dvh; }
  .boss-dialog .prev { left: 4px; }
  .boss-dialog .next { right: 4px; }
}

/* --- footer */
footer { padding: 56px 0 40px; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; }
footer img { height: 84px; width: auto; }
footer ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
footer a { color: var(--muted); }
footer a:hover { color: var(--gold-bright); }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr; text-align: center; justify-items: center; } }
