/* Avigames Space — charcoal, burgundy, ruby red and warm gold.
   Game screenshots and artwork keep their original colours. */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
:root {
  --base: #110e12;
  --surface: #24151c;
  --line: #493039;
  --cream: #f7f0de;
  --muted: #c4afb4;
  --gold: #ffca3d;
  --gold-deep: #df9809;
  --red: #9d182d;
  --red-light: #f18492;
  --burgundy: #641329;
  --burgundy-deep: #250c17;
  --burgundy-light: #e7a0ad;
  --panel-cream: #fff4dc;
  --panel-ink: #421923;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--base); color: var(--cream); font: 17px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
a:focus-visible, .rail:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; line-height: 1.06; margin: 0; }
h1, h2 { font-weight: 800; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.5rem, 6.6vw, 4.5rem); line-height: 1; }
h2 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h3 { font-size: 1.18rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.eyebrow { font: 700 0.8rem var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(17,14,18,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font: 800 1.1rem var(--display); letter-spacing: 0.01em; }
.brand img { width: 40px; height: 40px; flex: none; object-fit: contain; }
.brand b { color: var(--gold); font-weight: 800; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--gold); }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 76px) clamp(28px, 5vw, 56px); background: radial-gradient(ellipse 70% 60% at 50% 0%, #45131f 0%, var(--base) 70%); }
.hero .wrap { display: grid; gap: 30px; }
.hero-copy { display: grid; gap: 16px; max-width: 1000px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-copy p { max-width: 60ch; font-size: 1.12rem; color: var(--muted); }
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.door { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 26px; color: var(--cream); text-decoration: none; border: 1px solid; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.door.pool { border-color: rgba(241,132,146,.4); background: linear-gradient(180deg, #451523 0%, #201016 100%); }
.door.cards { border-color: rgba(231,160,173,.4); background: linear-gradient(180deg, #54172a 0%, var(--burgundy-deep) 100%); }
.door:hover { border-color: var(--gold); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.scene { position: relative; overflow: hidden; height: clamp(250px, 29vw, 350px); }
.scene::after { content: ""; position: absolute; z-index: 3; inset: auto 0 0 0; height: 26%; }
.pool .scene { background: radial-gradient(ellipse at 50% 0%, rgba(255,190,55,.32), transparent 65%), linear-gradient(150deg, #b52b40 0%, #681329 42%, #201016 100%); }
.pool .scene::after { background: linear-gradient(180deg, rgba(32,16,22,0), #201016 100%); }
.cards .scene { background: radial-gradient(ellipse at 50% 0%, rgba(255,190,55,.32), transparent 65%), linear-gradient(210deg, #b72b46 0%, #701c36 42%, #250c17 100%); }
.cards .scene::after { background: linear-gradient(180deg, rgba(37,12,23,0), #250c17 100%); }
.phones { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding-top: 6%; }
.phones img { width: 26%; margin-top: 9%; border-radius: 9% / 5%; border: 4px solid #100b0e; outline: 1px solid rgba(255,255,255,.28); box-shadow: 0 18px 30px rgba(0,0,0,.55); background: #000; }
.phones img:first-child { transform: rotate(-7deg); margin-right: -3%; }
.phones img:last-child { transform: rotate(7deg); margin-left: -3%; }
.phones .mid { width: 31%; margin-top: 0; position: relative; z-index: 2; }
.door .body { display: grid; gap: 10px; align-content: start; padding: 16px 28px 28px; }
.door h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
.door p { color: var(--cream); opacity: .85; font-size: 1.05rem; }
.go { display: inline-block; padding: 11px 22px; border-radius: 999px; font: 700 0.98rem var(--body); text-decoration: none; color: #2a1a00; background: linear-gradient(180deg, #ffd96a 0%, var(--gold) 45%, var(--gold-deep) 100%); box-shadow: 0 3px 0 #a86d00; transition: filter .15s ease, transform .15s ease; }
.go:hover { filter: brightness(1.08); transform: translateY(-1px); }
.go:active { transform: translateY(2px); box-shadow: 0 1px 0 #a86d00; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 6px; }
.more { color: var(--cream); font-weight: 600; font-size: 0.95rem; text-underline-offset: 4px; }
.more:hover { color: var(--gold); }
.door h2 a { color: inherit; text-decoration: none; }
.door h2 a:hover { color: var(--gold); }
.chip { display: inline-block; width: fit-content; padding: 4px 12px; border-radius: 999px; font: 700 0.76rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; }
.pool .chip { background: rgba(157,24,45,.3); border: 1px solid var(--red-light); color: #ffe3e7; }
.cards .chip { background: rgba(100,19,41,.35); border: 1px solid var(--burgundy-light); color: #fce1e6; }

/* Game bands */
.game { padding-block: clamp(48px, 6vw, 76px); }
.game > .wrap { display: grid; gap: 44px; }
.game.pool { --band-muted: #e0bfc5; background: linear-gradient(180deg, var(--base) 0, rgba(17,14,18,0) 14%, rgba(17,14,18,0) 86%, var(--base) 100%), radial-gradient(circle at 76% 34%, rgba(157,24,45,.38) 0, rgba(157,24,45,0) 42%), linear-gradient(rgba(35,10,19,.45), rgba(35,10,19,.45)), url("../img/pool-night.webp") center / cover, #450f20; background-blend-mode: normal, normal, normal, luminosity; }
.game.cards { --band-muted: #e1c4ca; background: linear-gradient(180deg, var(--base) 0, rgba(17,14,18,0) 14%, rgba(17,14,18,0) 86%, var(--base) 100%), linear-gradient(rgba(42,9,22,.4), rgba(42,9,22,.4)), url("../img/sol-felt.webp") center / cover, #641329; background-blend-mode: normal, normal, luminosity; }
.intro { display: grid; gap: 36px 56px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; }
.cards .intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.copy { display: grid; gap: 18px; }
.copy .lede { font-size: 1.14rem; max-width: 54ch; }
.copy p:not(.lede) { color: var(--band-muted); max-width: 54ch; }
.stage { position: relative; display: grid; place-items: center; }
.pool .stage img { width: min(360px, 78%); transform: rotate(7deg); filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)) drop-shadow(0 0 60px rgba(157,24,45,.45)); }
.cards .stage { padding-bottom: 8%; }
.cards .stage .fan { width: min(520px, 100%); filter: drop-shadow(0 26px 30px rgba(0,0,0,.5)); }
.cards .stage .host { position: absolute; width: 38%; left: 0; bottom: 0; filter: drop-shadow(0 12px 16px rgba(0,0,0,.45)); }
.cards .stage .chest { position: absolute; width: 26%; right: 2%; bottom: 2%; filter: drop-shadow(0 12px 16px rgba(0,0,0,.45)); }

/* Fact tiles */
.tiles { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tiles li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; }
.tiles img { width: 52px; height: 52px; object-fit: contain; flex: none; }
.tiles b { display: block; font: 800 1.2rem/1.15 var(--display); font-variant-numeric: tabular-nums; }
.tiles span { font-size: 0.92rem; line-height: 1.35; display: block; }
.pool .tiles li { background: rgba(36,21,28,.82); border: 1px solid #713447; box-shadow: inset 0 1px 0 rgba(241,132,146,.25); }
.pool .tiles b { color: var(--gold); }
.pool .tiles span { color: var(--band-muted); }
.cards .tiles li { background: var(--panel-cream); border: 1px solid #c9a870; box-shadow: 0 4px 0 #b08a4e; color: var(--panel-ink); }
.cards .tiles b { color: #9c1029; }

/* Collections */
.shelf { display: grid; gap: 28px 40px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.shelf > div { display: grid; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.tables img { width: 76px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.5)); }
.cues { display: grid; gap: 12px; padding: 18px; border-radius: 18px; background: rgba(36,21,28,.82); border: 1px solid #713447; }
.cues img { width: 100%; filter: drop-shadow(0 4px 4px rgba(0,0,0,.6)); }
.backs img { width: 72px; border-radius: 9px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.45)); transition: transform .15s ease; }
.backs img:hover { transform: translateY(-6px) rotate(-2deg); }
.rooms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rooms img { width: 100%; padding: 8px; border-radius: 14px; background: rgba(37,12,23,.6); border: 1px solid rgba(231,160,173,.35); }

/* Screenshot rail */
.shots { display: grid; gap: 14px; }
.rail { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; scrollbar-color: var(--gold) transparent; }
.rail figure { margin: 0; flex: 0 0 min(232px, 62vw); scroll-snap-align: start; display: grid; gap: 8px; align-content: start; }
.rail img { border-radius: 18px; border: 1px solid rgba(255,255,255,.22); aspect-ratio: 9 / 16; width: 100%; background: #000; box-shadow: 0 14px 24px rgba(0,0,0,.4); }
.rail figcaption { font-size: 0.86rem; color: var(--band-muted); }

/* Plain facts */
.plain { padding-block: clamp(40px, 6vw, 72px); }
.plain .wrap { display: grid; gap: 28px; }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cols > div { display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.cols img { width: 56px; height: 56px; object-fit: contain; }
.cols p { color: var(--muted); font-size: 0.97rem; }
.contact { padding-block: 8px clamp(44px, 6vw, 72px); }
.contact .wrap > div { display: grid; gap: 8px; padding: clamp(24px, 4vw, 40px); border-radius: 22px; background: linear-gradient(135deg, #441521 0%, var(--surface) 60%); border: 1px solid var(--gold-deep); }
.contact a { font: 800 clamp(1.25rem, 4vw, 1.9rem) var(--display); overflow-wrap: anywhere; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 26px 40px; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--gold); }

/* Legal pages */
.legal { padding-block: clamp(36px, 6vw, 64px); background: radial-gradient(ellipse 70% 400px at 50% 0%, #45131f 0%, var(--base) 100%) no-repeat; }
.legal .wrap { max-width: 760px; display: grid; gap: 18px; }
.legal h1 { font-size: clamp(2rem, 6vw, 3rem); }
.legal h2 { font-size: 1.25rem; letter-spacing: 0; margin-top: 18px; color: var(--gold); }
.legal .date { color: var(--muted); }
.legal p, .legal li { color: #e6e1d2; }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.legal .box { border: 1px solid var(--gold-deep); background: var(--surface); border-radius: 14px; padding: 16px 18px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.legal .scroll { overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--line); }
.legal th { background: var(--surface); color: var(--gold); }

@media (max-width: 820px) {
  .doors, .intro, .cards .intro { grid-template-columns: 1fr; }
  .scene { height: clamp(250px, 62vw, 350px); }
  .cards .stage { order: -1; }
  .pool .stage img { width: min(280px, 70%); }
  .top { position: static; }
}
@media (max-width: 600px) { .top nav .g { display: none; } .tiles { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .door, .backs img { transition: none; } }
