/* MagmaBear Games — the Eternal Rift Defense forged-metal look, retuned from rift purple to magma. */
@font-face {
  font-family: 'Cinzel';
  src: url('/fonts/cinzel-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #0a0605;
  --panel: #1a110e;
  --panel-2: #231612;
  --line: #3f2a22;
  --text: #f1e7e1;
  --muted: #b8a59b;
  --faint: #7f6d64;
  --gold: #f0b54f;
  --gold-hi: #ffe0a0;
  --magma: #ff6a1f;
  --magma-hi: #ffa25a;
  --magma-lo: #b3300c;
  --metal: linear-gradient(180deg, #f4f5f8 0%, #b9c0cc 38%, #6c7382 52%, #cfd4dd 78%, #8a92a1 100%);
  --lava: linear-gradient(180deg, #fff3c4 0%, #ffcf57 30%, #ff8a1f 55%, #e24a0e 78%, #ffb347 100%);
  --radius: 10px;
  --max: 1180px;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(1100px 600px at 85% -10%, rgba(255, 106, 31, .14), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(179, 48, 12, .10), transparent 60%);
  color: var(--text);
  font: 17px/1.65 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--magma-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: 80px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 12px; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 32px); }

/* ── Type ── */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.15; letter-spacing: .02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.6rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.magma-text, .gilt-text {
  background: var(--lava);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .7)) drop-shadow(0 0 18px rgba(255, 106, 31, .3));
}
.eyebrow {
  font-family: var(--display); font-size: .8rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 .9em; display: flex; align-items: center; gap: .8em;
}
.eyebrow::before, .eyebrow.center::after { content: ''; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow.center { justify-content: center; }
.eyebrow.center::after { background: linear-gradient(90deg, var(--gold), transparent); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.small { font-size: .95rem; color: var(--faint); }

/* ── Forged frame: bevelled iron with ember trim ── */
.forged {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid #4a3128;
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    inset 0 0 0 1px rgba(0, 0, 0, .5),
    0 0 0 1px rgba(255, 138, 31, .14),
    0 18px 40px -18px rgba(0, 0, 0, .9);
}
.forged::before {
  content: ''; position: absolute; inset: 7px; pointer-events: none; border-radius: 6px; z-index: 1;
  background:
    radial-gradient(circle at 0 0, #cfd4dd 0 2px, #4b5160 2.5px 3.2px, transparent 3.6px) top left / 10px 10px no-repeat,
    radial-gradient(circle at 100% 0, #cfd4dd 0 2px, #4b5160 2.5px 3.2px, transparent 3.6px) top right / 10px 10px no-repeat,
    radial-gradient(circle at 0 100%, #cfd4dd 0 2px, #4b5160 2.5px 3.2px, transparent 3.6px) bottom left / 10px 10px no-repeat,
    radial-gradient(circle at 100% 100%, #cfd4dd 0 2px, #4b5160 2.5px 3.2px, transparent 3.6px) bottom right / 10px 10px no-repeat;
  opacity: .7;
}

/* ── Buttons ── */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: var(--h); padding: 0 1.5em;
  font-family: var(--display); font-weight: 700; font-size: .92rem; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; border-radius: 8px; cursor: pointer; border: 0;
  transition: transform .15s ease, filter .15s ease, box-shadow .2s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-magma {
  color: #2a0d02;
  background: linear-gradient(180deg, #ffe39a 0%, #ffae3d 40%, #f2661a 70%, #ff9a3a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 0 0 1px #7a2a08, 0 8px 28px -8px rgba(255, 106, 31, .8);
  text-shadow: 0 1px 0 rgba(255, 230, 190, .55);
}
.btn-magma:hover { color: #2a0d02; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 0 0 1px #7a2a08, 0 10px 36px -6px rgba(255, 106, 31, 1); }
.btn-steel {
  color: var(--text);
  background: linear-gradient(180deg, #33261f, #1a120e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px #5a4034, 0 0 0 2px rgba(0, 0, 0, .6);
}
.btn-steel:hover { color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px var(--magma), 0 0 24px -4px rgba(255, 106, 31, .8); }
.btn-ghost { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px #4a3128; }
.btn-ghost:hover { color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 520px) { .btn-row .btn { flex: 1 1 100%; } }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(28, 18, 14, .96), rgba(12, 8, 6, .94));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #33231c;
  box-shadow: 0 1px 0 rgba(255, 138, 31, .2), 0 10px 30px -20px #000;
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px #7a2a08, 0 0 14px -2px rgba(255, 106, 31, .8); }
.brand span { font-family: var(--display); font-weight: 900; font-size: 1.12rem; letter-spacing: .08em; line-height: 1.05; white-space: nowrap; }
.brand small { display: block; font-size: .62rem; letter-spacing: .5em; color: var(--gold); font-weight: 700; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  font-family: var(--display); font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; padding: 10px 12px; border-radius: 6px;
}
.nav a:not(.btn):hover { color: var(--gold-hi); }
.nav .btn { --h: 42px; font-size: .78rem; padding: 0 1.1em; margin-left: 10px; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
    background: #22160f; border: 1px solid #4a3128; border-radius: 8px; color: var(--text); cursor: pointer;
  }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #130c09; border-bottom: 1px solid #33231c; padding: 8px 16px 18px; display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid #261914; }
  .nav .btn { margin: 14px 0 0; }
}

/* ── Hero ── */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(48px, 8vw, 110px) 0 clamp(56px, 8vw, 120px); }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(55% 75% at 75% 50%, rgba(255, 106, 31, .30), transparent 70%),
    radial-gradient(80% 40% at 50% 115%, rgba(226, 74, 14, .35), transparent 70%);
}
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .3em; }
.hero h1 .l2 { display: block; font-size: .45em; letter-spacing: .55em; margin-top: .2em; }
.hero .tagline { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: #e6d6cc; max-width: 40ch; margin-bottom: 1.6em; }
.logo-art { padding: 10px; transform: rotate(-1deg); }
.logo-art img { border-radius: 6px; }
.logo-art::after {
  content: ''; position: absolute; inset: -30px; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 106, 31, .55), rgba(179, 48, 12, .2) 60%, transparent);
  filter: blur(20px); animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .55; transform: scale(.96); } }
.embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.embers i {
  position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%;
  background: #ffb06b; box-shadow: 0 0 8px 2px rgba(255, 106, 31, .8);
  animation: rise linear infinite; opacity: 0;
}
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: .9; }
  100% { transform: translate(var(--dx, 30px), -110vh); opacity: 0; }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .logo-art { order: -1; max-width: 520px; margin-inline: auto; transform: none; }
}

/* ── Sections ── */
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section.alt { background: linear-gradient(180deg, transparent, rgba(34, 20, 15, .7) 20%, rgba(34, 20, 15, .7) 80%, transparent); }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

/* ── Game card ── */
.game { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 44px); padding: clamp(14px, 2vw, 22px); margin-top: 36px; align-items: center; }
.game-art { display: block; border-radius: 6px; overflow: hidden; }
.game-art img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .5s ease; }
.game-art:hover img { transform: scale(1.03); }
.game-body { padding: 8px clamp(4px, 1.5vw, 16px) 8px 0; }
.game h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: .4em; }
.game p { color: var(--muted); }
.release {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 8px 16px 8px 10px;
  border-radius: 999px; background: rgba(26, 16, 12, .85); border: 1px solid #4a3128;
  font-size: .92rem; color: var(--muted);
}
.release b { color: var(--gold-hi); font-weight: 600; }
.release .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--magma); box-shadow: 0 0 0 4px rgba(255, 106, 31, .25), 0 0 16px var(--magma); }
.points { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.points li { padding-left: 26px; position: relative; color: var(--text); }
.points li::before { content: ''; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; transform: rotate(45deg); background: var(--lava); box-shadow: 0 0 8px rgba(255, 106, 31, .7); }
@media (max-width: 860px) {
  .game { grid-template-columns: 1fr; }
  .game-art img { aspect-ratio: 4 / 3; object-position: 50% 80%; }
  .game-body { padding: 4px 6px 10px; }
}

/* ── Contact cards ── */
.card { padding: 28px 26px 22px; }
.card .ico {
  width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: radial-gradient(circle at 30% 25%, #5a2c17, #1a0f0b 70%);
  box-shadow: inset 0 0 0 1px #7a3a1c, 0 0 20px -6px var(--magma);
  color: var(--magma-hi);
}
.card .ico svg { width: 28px; height: 28px; }
.card h3 { color: var(--gold-hi); }
.card p { color: var(--muted); font-size: .98rem; margin-bottom: .6em; }
.card a { overflow-wrap: anywhere; }

/* ── Social buttons ── */
.socials { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.socials a {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--text);
  background: radial-gradient(circle at 35% 30%, #4a3024, #1a110e 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px #5a4034, 0 0 0 3px #120b08, 0 0 0 4px rgba(255, 138, 31, .35);
  transition: transform .15s ease, box-shadow .2s ease, color .15s ease;
}
.socials a:hover { color: var(--gold-hi); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px var(--gold), 0 0 0 3px #120b08, 0 0 18px -2px var(--magma); }
.socials svg { width: 20px; height: 20px; }

/* ── Prose (legal) ── */
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose ul { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose strong { color: #fff; }

/* ── Footer ── */
.site-footer { border-top: 1px solid #2c1d17; background: #0c0706; padding: 44px 0 30px; margin-top: 40px; color: var(--faint); font-size: .92rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; }
.site-footer .brand { margin: 0; }
.site-footer h4 { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul.socials { display: flex; gap: 10px; margin-top: 16px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold-hi); }
.site-footer .legal { border-top: 1px solid #22160f; margin-top: 30px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .cols > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .embers { display: none; }
}
