/* Game Night: shared styles for the door (invite code) and the hall (the games). */
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0c0b10;
  --bg-2: #14121b;
  --card: #17151f;
  --card-2: #1d1a27;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f4f1ea;
  --muted: #a7a2b3;
  --faint: #6f6a7c;
  --gold: #f2c36b;
  --radius: 22px;
  --display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
.glow { position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 15% 10%, rgba(194, 65, 45, .22), transparent 60%),
    radial-gradient(38vmax 38vmax at 90% 20%, rgba(138, 109, 233, .18), transparent 60%),
    radial-gradient(45vmax 45vmax at 60% 100%, rgba(54, 217, 201, .12), transparent 60%);
  filter: saturate(1.1);
}
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Mark */
.mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.mark-dot { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: conic-gradient(from 200deg, #c2412d, #f26b1d, #f2c36b, #36d9c9, #8a6de9, #c2412d);
  box-shadow: 0 8px 24px rgba(242, 107, 29, .25), inset 0 0 0 1px rgba(255,255,255,.25); }
.mark-dot svg { width: 20px; height: 20px; }
.mark-word { font: 800 21px/1 var(--display); letter-spacing: -.01em; }

/* ---------- Door ---------- */
.door { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.door-card { width: min(440px, 100%); text-align: center; padding: 40px 28px 32px; border-radius: 28px;
  background: linear-gradient(180deg, rgba(29, 26, 39, .86), rgba(20, 18, 27, .92));
  border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0,0,0,.5); backdrop-filter: blur(14px); }
.door h1 { font: 800 clamp(34px, 9vw, 46px)/1.02 var(--display); letter-spacing: -.025em; margin: 22px 0 10px; }
.door p { color: var(--muted); margin: 0 auto 26px; max-width: 30ch; }
.code { display: flex; flex-direction: column; gap: 12px; }
.code input { width: 100%; height: 60px; border-radius: 16px; border: 1px solid var(--line-2); background: #0f0e14;
  color: var(--text); text-align: center; font: 600 22px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; outline: none;
  transition: border-color .2s, box-shadow .2s; }
.code input::placeholder { color: #4a4656; letter-spacing: .14em; }
.code input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(242, 195, 107, .15); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 26px; border: 0; border-radius: 16px;
  font: 700 17px/1 var(--body); color: #17130a; cursor: pointer; text-decoration: none;
  background: linear-gradient(180deg, #f7d589, #eab04c); box-shadow: 0 10px 30px rgba(234, 176, 76, .25), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .15s, box-shadow .2s, filter .2s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.msg { min-height: 22px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.msg.bad { color: #ff9c86; }
.door-foot { margin-top: 26px; font-size: 13px; color: var(--faint); }

/* ---------- Hall ---------- */
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 16px; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.top-note { font-size: 13px; color: var(--faint); }
.hero { padding: 36px 0 30px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); padding: 8px 12px; border-radius: 999px; background: rgba(242, 195, 107, .08); border: 1px solid rgba(242, 195, 107, .2); }
.hero h1 { font: 800 clamp(40px, 8vw, 76px)/.98 var(--display); letter-spacing: -.035em; margin: 18px 0 16px; max-width: 14ch; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #f7d589, #f26b1d 60%, #c2412d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); max-width: 52ch; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; padding: 18px 0 40px; }
.game { grid-column: span 4; position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.35);
  transition: transform .25s ease, border-color .25s, box-shadow .25s; isolation: isolate; }
.game:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 28px 70px rgba(0,0,0,.45), 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; container-type: inline-size; display: block; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.game:hover .cover img { transform: scale(1.04); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(23, 21, 31, .9)); }
.chip { position: absolute; top: 14px; left: 14px; z-index: 2; font: 600 12px/1 var(--body); letter-spacing: .04em; padding: 8px 11px; border-radius: 999px;
  background: rgba(12, 11, 16, .62); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); }
.chip i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 1px; box-shadow: 0 0 10px var(--accent); }
.wordmark { position: absolute; z-index: 2; left: 0; right: 0; top: 50%; transform: translateY(-58%) skewX(-8deg); text-align: center;
  font: 800 13cqw/1 var(--display); letter-spacing: -.02em; color: #fff; white-space: nowrap;
  text-shadow: 0 2px 0 #b34a0d, 0 4px 0 #7a2e05, 0 14px 40px rgba(249, 115, 22, .55); }
.body { display: flex; flex-direction: column; gap: 10px; padding: 18px 22px 22px; flex: 1; }
.game h2 { font: 800 26px/1.05 var(--display); letter-spacing: -.02em; margin: 0; }
.tagline { font-weight: 600; color: color-mix(in srgb, var(--accent) 55%, #fff); margin: 0; }
.about { color: var(--muted); margin: 0; font-size: 15px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; padding: 0; list-style: none; }
.meta li { font-size: 12.5px; color: #cbc6d6; padding: 6px 10px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); }
.play { margin-top: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.play .btn { height: 50px; padding: 0 22px; font-size: 16px; color: #0d0c11;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 30%, transparent), inset 0 1px 0 rgba(255,255,255,.45); }
.pass { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); width: 100%; }
.pass code { font: 600 14px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text); background: var(--card-2); border: 1px solid var(--line-2);
  padding: 8px 10px; border-radius: 10px; letter-spacing: .02em; white-space: nowrap; }
.copy { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--text);
  font: 600 13px/1 var(--body); cursor: pointer; }
.copy:hover { background: var(--card-2); }

/* Six games: feature row, a row of three, then the last two share a row */
.game:not(.feature):nth-last-child(-n+2) { grid-column: span 6; }

/* Featured card: wide, cover beside the text */
.game.feature { grid-column: span 12; display: grid; grid-template-columns: 1.35fr 1fr; }
.game.feature .cover { aspect-ratio: auto; min-height: 380px; }
.game.feature .cover::after { background: linear-gradient(90deg, transparent 60%, rgba(23, 21, 31, .95)); }
.game.feature .body { padding: 34px 34px 32px; justify-content: center; gap: 14px; }
.game.feature h2 { font-size: clamp(34px, 4vw, 48px); }
.game.feature .about { font-size: 16.5px; }
.new { font: 700 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 8px 0 34px; }
.tip { padding: 20px 20px 18px; border-radius: 18px; background: rgba(23, 21, 31, .7); border: 1px solid var(--line); }
.tip b { display: block; font: 700 16px/1.2 var(--display); margin-bottom: 6px; letter-spacing: -.01em; }
.tip span { color: var(--muted); font-size: 14.5px; }
.tip svg { width: 22px; height: 22px; color: var(--gold); margin-bottom: 10px; }
footer { padding: 18px 0 46px; color: var(--faint); font-size: 13px; text-align: center; }

@media (max-width: 960px) {
  .game, .game:not(.feature):nth-last-child(-n+2) { grid-column: span 6; }
  .game.feature { grid-template-columns: 1fr; }
  .game.feature .cover { min-height: 0; aspect-ratio: 16 / 10; }
  .game.feature .cover::after { background: linear-gradient(180deg, transparent 55%, rgba(23, 21, 31, .9)); }
  .game.feature .body { padding: 20px 22px 24px; }
  .tips { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid { gap: 16px; }
  .game, .game:not(.feature):nth-last-child(-n+2) { grid-column: span 12; }
  .top-note { display: none; }
  .hero { padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
