/* Abyssreign website – the game's iron style: worn dark iron, rivets, steel-grey text, gold titles. */
@font-face {
  font-family: "Cinzel";
  src: url("/assets/Cinzel.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #0c0b0d;
  --iron-hi: #2a272d;
  --iron: #1b191e;
  --iron-lo: #121014;
  --edge: #3d3842;
  --edge-hi: #5a5360;
  --rivet: #6e6672;
  --text: #c9cdd3;
  --muted: #8f949c;
  --gold: #d6ad5c;
  --gold-hi: #f2d08a;
  --ember: #b8322a;
  --ember-hi: #e0553c;
  --radius: 6px;
  --wide: 1120px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(150, 34, 22, 0.42), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 110%, rgba(120, 30, 20, 0.18), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  font: 17px/1.65 system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; width: 100%; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); text-decoration: underline; }

h1, h2, h3, .button, .top nav, .kicker {
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.04em;
}
h1, h2, h3 { color: var(--gold); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 0.6em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 1.6em 0 0.6em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 0.4em; }

code { font-size: 0.9em; color: var(--text); background: var(--iron-lo); padding: 0 0.3em; border-radius: 3px; }

/* ---------- header ---------- */
.top {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand img { display: block; width: 150px; height: auto; }
.home .brand { visibility: hidden; }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; }
.top nav a { color: var(--text); }
.top nav a:hover, .top nav a.active { color: var(--gold-hi); text-decoration: none; }

/* ---------- buttons ---------- */
.button {
  display: inline-block;
  padding: 0.7em 1.6em;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  border: 1px solid var(--edge-hi);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--iron-hi), var(--iron-lo));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.button:hover {
  color: var(--gold-hi);
  border-color: var(--gold);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 18px rgba(214, 173, 92, 0.25);
}
.button.primary {
  color: #fff3dc;
  border-color: var(--gold);
  background: linear-gradient(180deg, #9a2a20, #5e150f);
}
.button.primary:hover { color: #fff; background: linear-gradient(180deg, #b23326, #6e1a12); }
.button.small { padding: 0.45em 1.1em; font-size: 0.85rem; }

/* ---------- iron panels with rivets ---------- */
.panel {
  position: relative;
  padding: 26px 28px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12px 12px, var(--rivet) 0 2px, transparent 3px),
    radial-gradient(circle at calc(100% - 12px) 12px, var(--rivet) 0 2px, transparent 3px),
    radial-gradient(circle at 12px calc(100% - 12px), var(--rivet) 0 2px, transparent 3px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), var(--rivet) 0 2px, transparent 3px),
    linear-gradient(180deg, var(--iron) 0%, var(--iron-lo) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 6px 24px rgba(0, 0, 0, 0.45);
}
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }

/* ---------- home ---------- */
.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 8px 16px 40px;
  text-align: center;
}
.hero .logo { display: block; width: min(640px, 92%); height: auto; margin: 0 auto; }
.tagline {
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  color: var(--text);
  max-width: 760px;
  margin: 0.4em auto 1.2em;
  line-height: 1.45;
}
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.fine { color: var(--muted); font-size: 0.9rem; margin-top: 1em; }
.fine.note { font-size: 0.8rem; max-width: 36em; margin: 0.4em auto 0; }

.section { max-width: var(--wide); margin: 0 auto; padding: 0 16px 48px; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.trailer {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 640px;
  display: block;
  border: 1px solid var(--edge-hi);
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.6), 0 0 40px rgba(150, 34, 22, 0.25);
}
.intro .text p:first-child { margin-top: 0; }
.kicker { color: var(--ember-hi); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 0.4em; }
.kicker + h2 { margin-top: 0; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.features .panel p { margin: 0; color: var(--text); }
.features h3 { margin: 0 0 0.4em; }

.news .version { color: var(--muted); font-size: 0.95rem; margin: -0.3em 0 0.8em; }
.news ul { margin: 0 0 1em; padding-left: 1.2em; }
.news li { margin: 0.35em 0; }

/* ---------- screenshots: a grid, each opens large (CSS :target, no scripts) ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--iron) 0%, var(--iron-lo) 100%);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-bottom: 1px solid var(--edge); }
.shot .caption { display: block; padding: 12px 16px 14px; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.shot .caption strong {
  display: block;
  margin-bottom: 2px;
  color: var(--gold);
  font: 700 1.02rem/1.4 "Cinzel", Georgia, serif;
  letter-spacing: 0.04em;
}
.shot:hover {
  text-decoration: none;
  border-color: var(--gold);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45), 0 0 18px rgba(214, 173, 92, 0.22);
}
.shot:hover .caption strong { color: var(--gold-hi); }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  padding: 24px 72px;
  align-items: center;
  justify-content: center;
}
.lightbox:target { display: flex; }
.lightbox .backdrop { position: absolute; inset: 0; background: rgba(6, 5, 7, 0.93); }
.lightbox figure { position: relative; margin: 0; min-width: 0; max-width: 100%; text-align: center; }
.lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 110px);
  margin: 0 auto;
  border: 1px solid var(--edge-hi);
  border-radius: var(--radius);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
}
.lightbox figcaption { margin-top: 12px; color: var(--muted); font-size: 0.95rem; }
.lightbox figcaption strong { color: var(--gold); font-family: "Cinzel", Georgia, serif; letter-spacing: 0.04em; margin-right: 0.4em; }
.lightbox .nav, .lightbox .close {
  position: absolute;
  color: var(--text);
  font-size: 3rem;
  line-height: 1;
  padding: 8px 14px;
  user-select: none;
}
.lightbox .nav { top: 50%; transform: translateY(-50%); }
.lightbox .prev { left: 6px; }
.lightbox .next { right: 6px; }
.lightbox .close { top: 6px; right: 10px; font-size: 2.4rem; }
.lightbox .nav:hover, .lightbox .close:hover { color: var(--gold-hi); text-decoration: none; }

/* ---------- download ---------- */
.download { max-width: 960px; margin: 0 auto; padding: 8px 16px 56px; display: grid; gap: 20px; }
.download .get { text-align: center; padding: 34px 28px 30px; }
.download .get h1 { margin-bottom: 0.3em; }
.download .lead { max-width: 34em; margin: 0 auto 1.4em; }
.download .ctas { margin: 0; }
.button.big { padding: 0.85em 2.2em; font-size: 1.2rem; }
.download .get .fine { margin: 1em 0 0; }
.download .get .fine.note { margin: 0.4em auto 0; }
.download h2 { margin: 0 0 0.6em; }
.download p:last-child, .download ul:last-child, .download ol:last-child { margin-bottom: 0; }
.download ul, .download ol { padding-left: 1.3em; }
.download li { margin: 0.4em 0; }
.steps li::marker { color: var(--gold); font-family: "Cinzel", Georgia, serif; font-weight: 700; }
.steps strong { color: var(--gold-hi); font-weight: 600; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.download > *, .columns > * { min-width: 0; }
.top nav .button.active { color: #fff; border-color: var(--gold-hi); }

/* ---------- text pages ---------- */
.prose { max-width: 860px; margin: 0 auto; padding: 8px 16px 56px; }
.prose .panel { padding: 30px 34px; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose hr { border: 0; border-top: 1px solid var(--edge); margin: 2.2em 0; }
.langs { color: var(--muted); margin-top: -0.6em; }

.notes article { margin-bottom: 26px; }
.notes h2 { margin: 0 0 0.2em; }
.notes .date { color: var(--muted); margin: 0 0 0.8em; }
.notes h3 { color: var(--gold); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--edge);
  background: rgba(0, 0, 0, 0.35);
  padding: 24px 16px 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 10px; }
footer .social a { color: var(--text); }
footer .legal a { color: var(--muted); }
footer a:hover { color: var(--gold-hi); }
footer p { margin: 6px 0 0; }

@media (max-width: 860px) {
  .intro { grid-template-columns: 1fr; }
  .trailer { max-width: 360px; margin: 0 auto; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top nav { gap: 14px; }
  .top nav a:not(.button) { display: none; }
  .brand img { width: 120px; }
  .panel, .prose .panel { padding: 22px 20px; }
  .columns { grid-template-columns: 1fr; }
  .button.big { padding: 0.8em 1.4em; font-size: 1.05rem; }
  .gallery { grid-template-columns: 1fr; }
  .lightbox { padding: 56px 8px 64px; }
  .lightbox .nav { top: auto; bottom: 4px; transform: none; }
}
