/* TETRAVANIA: Block Survivors - site styles. No build step, no external requests. */

@font-face { font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/press-start-2p-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/press-start-2p-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/rubik-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/rubik-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/rubik-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/rubik-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/rubik-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/rubik-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #060914;
  --bg-2: #0b0f24;
  --bg-glow: #161d44;
  --panel: #10163a;
  --line: #24306a;
  --text: #e9ecff;
  --muted: #a9b1d9;
  --cyan: #4de8ff;
  --gold: #ffc83d;
  --red: #ff3b5c;
  --purple: #b45cff;
  --green: #4cf07a;
  --orange: #ff7a3d;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 50% -10%, var(--bg-glow) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 60%);
  background-color: var(--bg);
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #9cf3ff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--gold); color: #000; padding: 8px 12px; font-family: var(--pixel); font-size: 12px; }
.skip:focus { left: 8px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(6, 9, 20, 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid rgba(77, 232, 255, 0.12); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--pixel); font-size: 12px; letter-spacing: 1px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; image-rendering: auto; }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a { font-family: var(--pixel); font-size: 10px; color: var(--muted); text-decoration: none; padding: 10px 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--cyan); }
@media (max-width: 640px) { .site-nav .opt { display: none; } .brand span { display: none; } }

/* ---------- pixel headings & buttons ---------- */
h1, h2, h3, .pixel { font-family: var(--pixel); font-weight: 400; line-height: 1.45; letter-spacing: 0.5px; }
h2 { font-size: clamp(16px, 3.2vw, 24px); margin: 0 0 12px; }
h3 { font-size: 13px; margin: 0 0 10px; }
.kicker { font-family: var(--pixel); font-size: 10px; color: var(--gold); letter-spacing: 2px; margin: 0 0 14px; text-transform: uppercase; }
.lead { color: var(--muted); font-size: 18px; max-width: 60ch; margin: 0; }

.btn {
  --c: var(--cyan);
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 16px 22px;
  font-family: var(--pixel); font-size: 13px; line-height: 1.4; text-decoration: none; text-align: center;
  color: #04101a; background: var(--c);
  border: 0; border-radius: 2px;
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.28), inset 4px 4px 0 rgba(255, 255, 255, 0.35), 0 0 28px color-mix(in srgb, var(--c) 45%, transparent);
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:hover { color: #04101a; filter: brightness(1.08); transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn .tri { width: 0; height: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }

.store-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 12px; min-height: 52px;
  border: 1px solid #3a4580; border-radius: 10px; background: #0a0e22; color: var(--text); text-decoration: none;
}
a.store-badge:hover { border-color: var(--cyan); color: var(--text); }
.store-badge svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store-badge small { display: block; font-size: 11px; color: var(--muted); line-height: 1.2; }
.store-badge strong { display: block; font-size: 16px; font-weight: 500; line-height: 1.25; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 56px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.25fr 0.75fr; } .hero { padding: 64px 0 80px; } }
.logo-art {
  width: 100%; max-width: 620px; aspect-ratio: 960 / 495; margin: 0 0 18px -6px;
  -webkit-mask-image: radial-gradient(ellipse 72% 78% at 50% 50%, #000 58%, transparent 100%);
          mask-image: radial-gradient(ellipse 72% 78% at 50% 50%, #000 58%, transparent 100%);
}
.hero h1 { font-size: clamp(14px, 2.6vw, 20px); margin: 0 0 14px; color: var(--text); }
.hero h1 .accent { color: var(--cyan); }
.hero .cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 26px; }
.hero .cta-note { font-size: 14px; color: var(--muted); margin: 0; }

.phone {
  justify-self: center; width: min(300px, 78vw);
  border-radius: 34px; padding: 10px; background: #050713;
  border: 2px solid #2a3570;
  box-shadow: 0 0 0 6px #0d1230, 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 90px rgba(77, 232, 255, 0.18);
  transform: rotate(2deg);
}
.phone img { border-radius: 26px; width: 100%; aspect-ratio: 540 / 1169; }
@media (max-width: 899px) { .phone { transform: none; } }

/* falling blocks decoration */
.blocks { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.blocks i { position: absolute; width: 22px; height: 22px; background: var(--c); opacity: 0.16; box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.3), inset 4px 4px 0 rgba(255, 255, 255, 0.3); animation: fall 14s linear infinite; }
@keyframes fall { from { transform: translateY(-120px); } to { transform: translateY(110vh); } }

/* ---------- sections ---------- */
section { padding: 56px 0; }
.section-head { margin-bottom: 28px; }

.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
  --c: var(--cyan);
  position: relative; padding: 22px 20px 20px; background: linear-gradient(180deg, rgba(22, 29, 68, 0.75), rgba(11, 15, 36, 0.75));
  border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 4px;
}
.feature h3 { color: var(--c); }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }
.mino { display: grid; grid-template-columns: repeat(4, 10px); grid-auto-rows: 10px; gap: 2px; margin-bottom: 14px; }
.mino b { background: var(--c); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.3); }

/* realms */
.realms { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); list-style: none; padding: 0; margin: 0; }
.realm {
  --c: var(--cyan);
  padding: 18px 16px; border-radius: 4px; background: #0a0e22; border: 2px solid color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--c) 14%, transparent);
}
.realm .num { font-family: var(--pixel); font-size: 10px; color: #04101a; background: var(--c); display: inline-block; padding: 5px 7px; margin-bottom: 12px; }
.realm h3 { color: var(--c); font-size: 12px; }
.realm p { margin: 0 0 8px; font-size: 15px; color: var(--muted); line-height: 1.5; }
.realm .boss { font-family: var(--pixel); font-size: 9px; color: var(--text); margin: 0; line-height: 1.7; }
.endless { margin-top: 18px; padding: 20px; border: 2px dashed rgba(255, 59, 92, 0.6); border-radius: 4px; background: rgba(255, 59, 92, 0.06); }
.endless h3 { color: var(--red); }
.endless p { margin: 0; color: var(--muted); }

/* gallery */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); list-style: none; padding: 0; margin: 0; }
.gallery li { margin: 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #050713; }
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.gallery .wide { grid-column: 1 / -1; }
@media (min-width: 900px) { .gallery .wide { grid-column: span 3; } .gallery { grid-template-columns: repeat(6, 1fr); } .gallery li:not(.wide) { grid-column: span 2; } .gallery li.tall { grid-column: span 1; } .gallery.scroller { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 899px) {
  .gallery.scroller { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .gallery.scroller li { flex: 0 0 62%; scroll-snap-align: center; }
}

.facts { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 22px 0 0; }
.facts li { font-family: var(--pixel); font-size: 10px; padding: 10px 12px; border: 1px solid var(--line); background: #0a0e22; color: var(--text); }

.final-cta { text-align: center; }
.final-cta .lead { margin: 0 auto 26px; }
.final-cta .store-row { justify-content: center; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid rgba(77, 232, 255, 0.14); padding: 32px 0 40px; margin-top: 40px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer a { color: var(--text); text-decoration: none; padding: 6px 0; display: inline-block; }
.site-footer a:hover { color: var(--cyan); text-decoration: underline; }
.site-footer p { margin: 0; }

/* ---------- legal pages ---------- */
.legal { padding: 40px 0 24px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(18px, 4vw, 26px); margin: 0 0 12px; color: var(--cyan); }
.legal .updated { color: var(--gold); font-family: var(--pixel); font-size: 10px; margin: 0 0 28px; }
.legal h2 { font-size: 14px; margin: 40px 0 12px; color: var(--gold); }
.legal h3 { font-size: 11px; margin: 24px 0 8px; color: var(--cyan); }
.legal p, .legal li { color: #d3d8f5; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 6px 0; }
.legal .summary { background: #0a0e22; border: 1px solid var(--line); border-left: 4px solid var(--cyan); padding: 16px 20px; border-radius: 4px; }
.legal .summary ul { margin: 8px 0 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--line); }
.legal th { background: #10163a; font-weight: 500; }
.legal .table-scroll { overflow-x: auto; }
.legal .toc { font-size: 15px; columns: 2 220px; margin: 0 0 8px; padding-left: 1.2em; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 100px 0; }
.notfound h1 { font-size: clamp(28px, 8vw, 56px); color: var(--red); margin: 0 0 16px; }
.notfound p { color: var(--muted); margin: 0 0 28px; }
