/* The lanparty.wtf homepage (spec §4). Ported from the brainstorm mockup. */
:root {
  --ink: #f3e9d2; --dim: rgba(243, 233, 210, .62); --line: rgba(243, 233, 210, .12); --bg: #0b0908; --accent: #ffb347; --crt: #7dff9a;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --pixel: "VT323", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); overflow-x: hidden; }
.mono { font-family: var(--mono); }
a { color: inherit; }

/* nav */
.nav { position: fixed; z-index: 20; top: 14px; left: 50%; transform: translateX(-50%); width: min(980px, calc(100% - 32px));
  display: flex; align-items: center; gap: 4px; padding: 7px 8px 7px 16px; border-radius: 10px;
  background: linear-gradient(rgba(34, 25, 19, .82), rgba(18, 13, 10, .82)); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.nav .logo { font-weight: 800; letter-spacing: -.03em; font-size: 19px; margin-right: auto; text-decoration: none; white-space: nowrap; }
.nav .logo i { color: var(--accent); font-style: normal; }
.nav > a:not(.logo) { color: var(--dim); text-decoration: none; font-size: 13px; padding: 7px 11px; border-radius: 6px; }
.nav > a:not(.logo):hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.nav > a.on { color: var(--ink); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); }
.nav > a.joinlink { color: var(--ink); white-space: nowrap; }
@media (max-width: 380px) { .nav .steam { padding: 8px 9px; font-size: 12px; } .nav > a.joinlink { padding: 7px 8px; } }
.term { font-size: 11.5px; color: #9a9a8f; background: #070605; border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px; padding: 7px 10px; min-width: 240px; white-space: nowrap; margin-left: 4px; }
.term b { color: #e8e4d8; font-weight: 600; }
.term .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #5ee08a; margin-right: 6px; box-shadow: 0 0 6px #5ee08a; }
.term .cur { display: inline-block; width: 6px; height: 11px; background: #e8e4d8; vertical-align: -1px; margin-left: 3px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.steam { font-size: 13px; font-weight: 700; color: #1a120c; background: var(--ink); padding: 8px 13px; border-radius: 6px; text-decoration: none; margin-left: 4px; white-space: nowrap; }
span.steam { background: rgba(243, 233, 210, .14); color: var(--ink); }

/* hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.poster { position: absolute; inset: 0; background: url(/home/poster.webp) center / cover no-repeat, #0b0807; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s; }
#scene.ready { opacity: 1; }
.copy { position: absolute; z-index: 5; left: max(32px, 5vw); bottom: max(40px, 8vh); max-width: 620px; pointer-events: none; }
.eyebrow { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.copy h1 { margin: 0; max-width: 7.4em; font-size: clamp(40px, 6.4vw, 84px); line-height: .95; letter-spacing: -.045em; font-weight: 800; text-shadow: 0 4px 40px rgba(0, 0, 0, .7); }
.now { position: absolute; z-index: 5; right: max(32px, 5vw); bottom: max(40px, 8vh); text-align: right; font-size: 11px; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; }
.now b { display: block; color: var(--ink); font-family: var(--pixel); font-size: 30px; letter-spacing: .04em; text-transform: none; margin-top: 4px; font-weight: 400; }
.scrollhint { position: absolute; z-index: 5; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: 10px; letter-spacing: .3em; color: var(--dim); text-transform: uppercase; }

/* sections */
main { position: relative; z-index: 2; background: var(--bg); border-top: 1px solid var(--line);
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(100% / 6) 100%; }
section { max-width: 1180px; margin: 0 auto; padding: 96px 32px; scroll-margin-top: 60px; }
.label { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); display: flex; gap: 14px; align-items: center; margin-bottom: 28px; }
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
h2 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.035em; margin: 0 0 36px; font-weight: 800; line-height: 1; }

/* game cards */
.games { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.game { position: relative; aspect-ratio: 3 / 4; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #000; transition: transform .25s, border-color .25s, box-shadow .25s; cursor: pointer; outline: none; }
.game:hover, .game.active { transform: translateY(-4px); border-color: rgba(255, 179, 71, .6); }
.game.active { border-color: var(--accent); box-shadow: 0 10px 30px rgba(255, 179, 71, .18); }
.game:focus-visible { border-color: var(--accent); }
.game.pinned::before { content: "PINNED"; position: absolute; z-index: 2; top: 8px; right: 8px; font: 600 9px var(--mono); letter-spacing: .14em; color: #1a120c; background: var(--accent); padding: 2px 5px; border-radius: 3px; }
.game .pic { position: absolute; inset: 0; background-size: cover; background-position: center; filter: saturate(1.1); }
.game .pic::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .18) 2px 3px), linear-gradient(transparent 45%, rgba(0, 0, 0, .85)); }
.game .meta { position: absolute; left: 12px; right: 12px; bottom: 12px; }
.game .ch { font-family: var(--pixel); color: var(--crt); font-size: 18px; }
.game h3 { margin: 2px 0 4px; font-size: 17px; letter-spacing: -.02em; }
.game p { margin: 0; font-size: 12px; color: var(--dim); }

/* stand-in art for games without stills */
.art-spy { background: #2a2414 radial-gradient(circle at 50% 40%, #6b5a2c, #1b1609 70%); display: grid; place-items: center; }
.art-spy span { border: 3px solid #c0392b; color: #c0392b; padding: 6px 10px; font-weight: 800; letter-spacing: .12em; transform: rotate(-8deg); font-size: 15px; }
.art-kc { background: #020a04; color: #3dff7a; font-family: var(--pixel); font-size: 12px; padding: 12px; line-height: 1; white-space: pre; text-shadow: 0 0 6px #3dff7a; }
.art-bars { background: #000; display: grid; place-items: center; }
.art-bars::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #c0c0c0 0 14.3%, #c0c000 0 28.6%, #00c0c0 0 42.9%, #00c000 0 57.1%, #c000c0 0 71.4%, #c00000 0 85.7%, #0000c0 0); opacity: .55; }
.art-bars span { position: relative; z-index: 1; font-family: var(--pixel); font-size: 22px; color: #fff; background: #000; padding: 2px 10px; letter-spacing: .06em; }

/* preview panel */
.gp { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.2, .8, .2, 1); }
.gp.open { grid-template-rows: 1fr; }
.gp-in { overflow: hidden; padding-top: 8px; }
.gp-card { position: relative; margin-top: 8px; display: grid; grid-template-columns: minmax(260px, 46%) 1fr; gap: 32px; padding: 24px; border: 1px solid rgba(255, 179, 71, .35); border-radius: 8px;
  background: radial-gradient(ellipse at 20% 50%, rgba(120, 170, 255, .10), transparent 60%), #100d0b; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
.gp.open .gp-card { opacity: 1; transform: none; }
.gp-caret { position: absolute; top: -7px; width: 12px; height: 12px; background: #100d0b; border-left: 1px solid rgba(255, 179, 71, .35); border-top: 1px solid rgba(255, 179, 71, .35); transform: rotate(45deg); transition: left .28s cubic-bezier(.2, .8, .2, 1); }
.gp-tv { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; padding: 16px; background: linear-gradient(#c4bdad, #a49d8e); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 0 60px rgba(120, 170, 255, .18); }
.gp-scr { position: relative; width: 100%; height: 100%; border-radius: 12px; overflow: hidden; background: #000; box-shadow: inset 0 0 30px rgba(0, 0, 0, .9); }
.gp-scr .layer { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .5s; animation: kb 9s linear infinite alternate; }
.gp-scr .layer.on { opacity: 1; }
.gp-scr > .pic { position: absolute; inset: 0; }
.gp-scr .art-spy span { font-size: 28px; padding: 10px 16px; border-width: 4px; }
.gp-scr .art-kc { font-size: 22px; padding: 28px; line-height: 1.15; }
.gp-scr .art-bars span { font-size: 34px; padding: 4px 16px; }
.gp-scr::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .22) 2px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .6)); }
.gp-scr.flip::before { content: ""; position: absolute; inset: 0; z-index: 3; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9'/%3E%3C/filter%3E%3Crect width='120' height='90' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: cover; animation: stat .22s steps(3) forwards; }
@keyframes stat { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes kb { from { transform: scale(1.02); } to { transform: scale(1.09); } }
.gp-osd { position: absolute; top: 26px; right: 30px; z-index: 4; font-family: var(--pixel); font-size: 24px; color: var(--crt); text-shadow: 0 0 6px var(--crt); }
.gp-body { align-self: center; transition: opacity .16s, transform .16s; }
.gp-body.swap { opacity: 0; transform: translateY(6px); }
.gp-ch { font-size: 11px; letter-spacing: .2em; color: var(--accent); }
.gp-body h3 { margin: 8px 0 6px; font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.035em; line-height: 1; }
.gp-tag { margin: 0 0 14px; font-size: 16px; color: var(--ink); }
.gp-desc { margin: 0 0 20px; font-size: 14.5px; line-height: 1.6; color: var(--dim); max-width: 520px; }
.gp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gp-chips span { font: 500 11px var(--mono); letter-spacing: .06em; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: rgba(255, 255, 255, .03); }
.gp-x { position: absolute; top: 12px; right: 12px; background: none; border: 1px solid var(--line); color: var(--dim); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; }
.gp-x:hover { color: var(--ink); }

/* CTA + footer */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--line); border-radius: 8px; padding: 40px; background: radial-gradient(ellipse at 15% 50%, rgba(255, 179, 71, .12), transparent 60%); }
.cta h2 { margin: 0; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { font-size: 14px; font-weight: 700; padding: 12px 18px; border-radius: 7px; text-decoration: none; color: var(--ink); border: 1px solid rgba(243, 233, 210, .25); }
.btn.p { background: var(--ink); color: #1a120c; border-color: transparent; }
span.btn.p { background: rgba(243, 233, 210, .14); color: var(--ink); }
footer { max-width: 1180px; margin: 0 auto; padding: 28px 32px 40px; display: flex; gap: 16px; font-size: 11px; color: var(--dim); border-top: 1px solid var(--line); }
footer .abuse { margin-left: auto; }
footer a { color: var(--dim); }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .games { grid-template-columns: repeat(4, 1fr); }
  .term { display: none; }
}
@media (max-width: 760px) {
  .nav { padding-left: 12px; }
  .nav > a:not(.logo):not(.joinlink) { display: none; }
  .games { grid-template-columns: repeat(2, 1fr); }
  .gp-card { grid-template-columns: 1fr; gap: 18px; padding: 16px; }
  .gp-caret { display: none; }
  .cta { flex-direction: column; align-items: flex-start; padding: 28px; }
  .now { display: none; }
  section { padding: 72px 16px; }
  footer { flex-direction: column; padding: 24px 16px 32px; }
  footer .abuse { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .gp, .gp-card, .gp-body, .gp-caret, #scene { transition: none; }
  .js .reveal { opacity: 1; transform: none; }
  .gp-scr .layer { animation: none; }
  .gp-scr.flip::before, .term .cur { animation: none; }
}
