/* Hank's Inferno — site styles. Colors: Hell at night, the logo's gold, the game's school palette. */
:root {
  --bg: #140b1a;
  --bg-2: #1c1024;
  --panel: #251631;
  --panel-2: #2f1c3d;
  --line: #3e2850;
  --ink: #f6ecdf;
  --ink-2: #e2d3c6;
  --muted: #b39fb0;
  --gold: #f2c14e;
  --gold-2: #d89a1e;
  --ember: #ff7a33;
  --blood: #c8243b;
  --royal: #1f4fa3;
  --kick: #05ce78;
  --discord: #5865f2;
  /* insult schools, from Assets/_Database/SchoolPalette.asset */
  --stupidity: #ff7a33;
  --peculiarity: #66d9ff;
  --depravity: #80e085;
  --worthlessness: #ffd633;

  --radius: 14px;
  --wrap: 1180px;
  --display: "Pirata One", "Georgia", serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
a:hover { color: #ffd77a; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.15rem; font-weight: 900; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow { color: var(--ember); text-transform: uppercase; letter-spacing: .14em; font-weight: 900; font-size: .78rem; margin-bottom: .6em; }
.eyebrow a { color: inherit; text-decoration: none; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.text-link { font-weight: 700; text-decoration: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- icons (Simple Icons SVGs used as masks, so they take currentColor) */
.ico {
  display: inline-block; width: 1.2em; height: 1.2em; flex: none;
  background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
}

/* ---------- buttons */
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .8em 1.3em; border-radius: 999px;
  font: 900 1rem/1 var(--body); text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }
.btn-sm { font-size: .88rem; padding: .62em 1em; }
.btn-lg { font-size: 1.1rem; padding: 1em 1.6em; }
.btn-steam { background: linear-gradient(180deg, #ffd56b, var(--gold-2)); color: #2a1300; box-shadow: 0 6px 24px -8px rgba(242,193,78,.7); }
.btn-steam:hover { color: #2a1300; }
.btn-kick { background: transparent; color: var(--kick); border-color: var(--kick); }
.btn-kick:hover { background: var(--kick); color: #04140c; }
.btn-discord { background: var(--discord); color: #fff; box-shadow: 0 6px 24px -8px rgba(88,101,242,.8); }
.btn-discord:hover { color: #fff; }

/* ---------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 10px max(16px, calc((100% - var(--wrap)) / 2));
  background: rgba(20, 11, 26, .82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(62, 40, 80, .6);
}
.brand img { width: 84px; height: auto; }
.mainnav { display: flex; gap: 22px; flex: 1; }
.mainnav a { color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .95rem; }
.mainnav a:hover { color: var(--gold); }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.navtoggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative; }
.navtoggle span, .navtoggle span::before, .navtoggle span::after {
  position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); content: ""; transition: transform .2s;
}
.navtoggle span { top: 21px; }
.navtoggle span::before { top: -7px; left: 0; }
.navtoggle span::after { top: 7px; left: 0; }
.nav-open .navtoggle span { background: transparent; }
.nav-open .navtoggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .navtoggle span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .navtoggle { display: block; }
  .mainnav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; transform: translateY(-120%); transition: transform .25s ease;
  }
  .mainnav a { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-open .mainnav { transform: none; }
}

/* ---------- hero */
.hero { position: relative; min-height: min(88vh, 820px); display: grid; align-items: end; isolation: isolate; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background-size: cover; background-position: 50% 30%;
  transform: scale(1.04);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(255,90,20,.35), transparent 60%),
    linear-gradient(180deg, rgba(20,11,26,.15) 0%, rgba(20,11,26,.55) 55%, var(--bg) 100%);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 120px 0 64px; }
.hero-logo { width: min(520px, 88vw); filter: drop-shadow(0 18px 40px rgba(0,0,0,.6)); animation: bob 6s ease-in-out infinite; }
.hero-tag { font-size: clamp(1.1rem, 2.4vw, 1.45rem); font-weight: 700; max-width: 40ch; margin: 8px 0 26px; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.hero .ctas { justify-content: center; }
.hero .btn-kick { background: rgba(10, 4, 14, .6); }
.hero .btn-kick:hover { background: var(--kick); }
.hero-sub { margin-top: 18px; color: var(--ink-2); font-size: .92rem; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-.6deg); } }

/* ---------- sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { margin-bottom: 36px; }
.section-head .text-link { display: inline-block; margin-top: 4px; }
.intro-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.intro-shot img { border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8), 0 0 0 1px var(--line); transform: rotate(1.2deg); }
.intro-shot { margin: 0; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; gap: 32px; } }

/* schools */
.schools-section { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.schools { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.school {
  --c: var(--ember);
  background: var(--panel); border-radius: var(--radius); padding: 24px 22px;
  border-top: 4px solid var(--c);
  box-shadow: 0 20px 40px -24px var(--c);
}
.school h3 { font-family: var(--display); font-weight: 400; font-size: 1.9rem; color: var(--c); margin: 4px 0 8px; }
.school p { color: var(--ink-2); margin: 0; font-size: .97rem; }
.school-el { font-size: .75rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.school-stupidity { --c: var(--stupidity); }
.school-peculiarity { --c: var(--peculiarity); }
.school-depravity { --c: var(--depravity); }
.school-worthlessness { --c: var(--worthlessness); }
@media (max-width: 960px) { .schools { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .schools { grid-template-columns: 1fr; } }

/* features */
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; }
.features li { padding-left: 18px; border-left: 3px solid var(--blood); }
.features h3 { font-size: 1.2rem; }
.features p { color: var(--ink-2); margin: 0; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* cast */
.cast-section { background: radial-gradient(ellipse at 50% 0%, #2a1236, var(--bg) 70%); }
.cast { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.cast-card {
  position: relative; background: var(--panel); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; outline: none;
  border: 1px solid var(--line); transition: border-color .2s, transform .2s;
}
.cast-card:hover, .cast-card:focus-visible { border-color: var(--gold); transform: translateY(-4px); }
.cast-main { grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 44px; }
.cast-subhead { font-family: var(--display); font-weight: 400; font-size: 1.9rem; margin-bottom: 18px; color: var(--ink-2); }
.cast-team { flex-direction: row; background: linear-gradient(135deg, var(--panel-2), var(--panel)); }
.cast-art {
  height: 230px; display: flex; align-items: flex-end; justify-content: center; padding: 14px 8px 0;
  background: radial-gradient(circle at 50% 75%, rgba(255,122,51,.28), transparent 65%);
}
.cast-team .cast-art { flex: 0 0 40%; height: 320px; }
.cast-art img { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)); }
.cast-text { padding: 14px 18px 18px; display: flex; flex-direction: column; }
.cast-team .cast-text { padding: 22px 22px 22px 6px; justify-content: center; }
.cast-text h3 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; margin: 0; }
.cast-team .cast-text h3 { font-size: 2.1rem; }
.cast-role { color: var(--ember); font-weight: 900; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin: 2px 0 8px; }
.cast-blurb { color: var(--ink-2); font-size: .93rem; margin-bottom: 10px; }
blockquote { margin: auto 0 0; padding: 10px 0 0 12px; border-left: 3px solid var(--gold); font-style: italic; color: var(--ink); font-size: .93rem; }
@media (max-width: 900px) { .cast-main { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .cast { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cast-main { grid-template-columns: 1fr; }
  .cast-art { height: 180px; }
  .cast-team .cast-art { height: 240px; flex-basis: 40%; }
  .cast-text { padding: 12px; }
  .cast-text h3 { font-size: 1.4rem; }
  .cast-blurb { display: none; }
  .cast-team .cast-blurb { display: block; }
}

/* media */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shot { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.shot img { transition: transform .3s ease; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.shot:hover img { transform: scale(1.06); }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.video { position: relative; aspect-ratio: 16 / 9; margin-bottom: 18px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(8,4,12,.92);
  display: grid; place-items: center; padding: 16px; cursor: zoom-out;
}
.lightbox img { max-height: 90vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.8); }
.lightbox button {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; cursor: pointer;
}
.lightbox .lb-prev { left: 16px; }
.lightbox .lb-next { right: 16px; }
.lightbox .lb-close { top: 28px; right: 16px; transform: none; font-size: 1.3rem; }

/* blog cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.post-card {
  display: flex; flex-direction: column; background: var(--panel); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink); border: 1px solid var(--line);
  transition: border-color .2s, transform .2s;
}
.post-card:hover { border-color: var(--gold); transform: translateY(-3px); color: var(--ink); }
.card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img-fallback { width: 100%; height: 100%; background: url(/img/logo.webp) center / 50% no-repeat, radial-gradient(circle, #3a1a2e, var(--panel-2)); }
.card-body { padding: 18px 20px 22px; }
.card-body time { color: var(--muted); font-size: .82rem; font-weight: 700; }
.card-body h3 { font-size: 1.25rem; margin: 6px 0 8px; }
.card-body p { color: var(--ink-2); margin: 0; font-size: .95rem; }

/* community */
.community { text-align: center; background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.community-inner { display: flex; flex-direction: column; align-items: center; }
.community .lede { margin-inline: auto; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2); background: var(--panel); transition: background .2s, color .2s, transform .2s; }
.socials a:hover { background: var(--gold); color: #2a1300; transform: translateY(-2px); }
.socials-lg a { width: 44px; height: 44px; }
.socials-xl { justify-content: center; margin-top: 28px; gap: 12px; }
.socials-xl a { width: 56px; height: 56px; font-size: 1.3rem; }

.steam-widget { padding-top: 0; }
.steam-widget iframe { display: block; width: 100%; max-width: 646px; height: 190px; margin: 0 auto; border: 0; }

/* cta band */
.cta-band { background: linear-gradient(100deg, #5a1020, #8a2a14 55%, #b0521a); padding: 48px 0; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: #ffe6d2; max-width: 52ch; }
.cta-band .btn-kick { color: #fff; border-color: #fff; }
.cta-band .btn-kick:hover { background: #fff; color: #5a1020; }

/* page hero (blog, 404) */
.page-hero { padding: 72px 0 40px; background: radial-gradient(ellipse at 20% 0%, #3a1630, var(--bg) 70%); }
.notfound { padding: 140px 0; text-align: center; }
.notfound .lede { margin-inline: auto; }

/* posts */
.post { padding: 56px 0 72px; }
.post .meta { color: var(--muted); font-weight: 700; }
.post-hero { border-radius: var(--radius); margin: 22px 0 30px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-weight: 700; }
.pager-next { margin-left: auto; text-align: right; }

/* prose (blog posts + GDD) */
.prose { font-size: 1.04rem; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.6em; font-size: 1.25rem; }
.prose h1 + p, .prose h2 + p { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose img { border-radius: 10px; margin: 1.4em 0; }
.prose code { background: var(--panel-2); padding: .12em .4em; border-radius: 5px; font-size: .88em; }
.prose pre { background: #0d0711; border: 1px solid var(--line); border-radius: 10px; padding: 16px; overflow-x: auto; font-size: .86rem; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left-color: var(--ember); margin: 1.2em 0; padding: 4px 0 4px 16px; color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: 10px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.prose th, .prose td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--panel-2); font-weight: 900; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 32px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 36px; }
.footer h3 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; }
.footer .ctas { margin-top: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { text-decoration: none; font-weight: 700; color: var(--ink-2); }
.footer-links a:hover { color: var(--gold); }
.footer-links a.muted { color: var(--muted); font-weight: 400; font-size: .9rem; margin-top: 8px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- dev area (GDD) */
.dev .topbar { background: rgba(14, 22, 34, .9); border-bottom-color: #22344a; }
.dev-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 48px; width: min(1320px, 100% - 32px); margin: 0 auto; padding: 36px 0 80px; }
.dev-side { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: .92rem; }
.dev-nav summary { list-style: none; cursor: default; font-weight: 900; font-size: 1rem; margin-bottom: 10px; }
.dev-nav summary::-webkit-details-marker { display: none; }
.dev-badge { display: inline-block; font-size: .65rem; letter-spacing: .12em; background: var(--blood); color: #fff; padding: 3px 7px; border-radius: 4px; margin-right: 6px; vertical-align: 2px; }
.dev-nav ol { list-style: none; padding: 0; margin: 0 0 22px; border-left: 2px solid var(--line); }
.dev-nav a, .onpage a { display: block; padding: 5px 12px; color: var(--ink-2); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.dev-nav a:hover, .onpage a:hover { color: var(--gold); }
.dev-nav a[aria-current] { color: var(--gold); border-left-color: var(--gold); font-weight: 700; }
.onpage h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 6px; }
.onpage ul { list-style: none; padding: 0; margin: 0; }
.onpage a { padding: 3px 0; border: 0; margin: 0; font-size: .86rem; color: var(--muted); }
.dev-main { max-width: 900px; }
.dev-main h1 { font-family: var(--body); font-weight: 900; font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.dev-main h2 { font-family: var(--body); font-weight: 900; font-size: 1.55rem; padding-top: .4em; border-top: 1px solid var(--line); }
.dev-foot { margin-top: 28px; }
@media (max-width: 960px) {
  .dev-shell { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 20px; }
  .dev-side { position: static; max-height: none; }
  .dev-nav summary { cursor: pointer; padding: 12px 14px; background: var(--panel); border-radius: 10px; }
  .dev-nav summary::after { content: " ▾"; color: var(--muted); }
  .dev-nav ol { margin-top: 10px; }
  .onpage { display: none; }
}

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