/* Ballflation website. Colors and type follow the game (lib/ui/theme.dart). */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #0b1026;
  --navy2: #131a3a;
  --navy3: #1c2550;
  --line: #2a3570;
  --text: #e8ecf5;
  --dim: #a3acca;
  --coin: #ffd34d;
  --gem: #5cf2ff;
  --star: #ffe680;
  --green: #3ddc84;
  --pink: #ff5fa2;
  --epic: #b05cff;
  --display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--navy); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--text);
  font: 17px/1.65 var(--body);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.06) 1.5px, transparent 2px) 0 0 / 38px 38px,
    radial-gradient(900px 620px at 12% -8%, rgba(120, 84, 255, 0.42), transparent 62%),
    radial-gradient(760px 520px at 100% 4%, rgba(255, 95, 162, 0.16), transparent 60%),
    linear-gradient(180deg, #2b1d7c 0, #161b52 560px, var(--navy) 1200px) no-repeat;
  background-color: var(--navy);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; }

a { color: var(--gem); text-underline-offset: 3px; }
a:hover { color: #9ef8ff; }
:focus-visible { outline: 3px solid var(--coin); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(30px, 4.2vw, 44px); text-align: center; margin-bottom: 1.1em; }
h3 { font-size: 21px; font-weight: 600; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--coin); color: var(--navy); padding: 8px 14px; border-radius: 10px; font-weight: 700; z-index: 10; }
.skip:focus { left: 8px; }

.draft { background: #ff5c7a; color: #fff; text-align: center; font: 600 14px/1.4 var(--body); padding: 8px 12px; }

/* ---------------------------------------------------------------- header */

.top { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(11, 16, 38, 0.55); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.top-in { width: min(var(--wrap), 100% - 32px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 700 22px/1 var(--display); }
.brand img { border-radius: 11px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.brand span { background: linear-gradient(180deg, #fff6b0 5%, #ffda4d 50%, #ffb321 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand.small { font-size: 19px; }
.brand.small img { border-radius: 9px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--text); text-decoration: none; font: 600 16px/1 var(--display); padding: 10px 12px; border-radius: 12px; }
.nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav .nav-cta { background: var(--green); color: #06301a; margin-left: 6px; }
.nav .nav-cta:hover { background: #5ae79c; color: #06301a; }

@media (max-width: 620px) {
  .nav a:not(.nav-cta) { padding: 8px 8px; font-size: 15px; }
  .nav a[href="/#screens"] { display: none; }
}

/* ------------------------------------------------------------------ hero */

.hero { padding: clamp(36px, 7vw, 84px) 0 clamp(48px, 7vw, 96px); }
.hero-in { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: clamp(28px, 5vw, 72px); }

.kicker { font: 600 15px/1 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gem); margin: 0 0 18px; }

.hero h1 { font-size: clamp(44px, 7.2vw, 84px); line-height: 1.02; margin-bottom: 22px; text-shadow: 0 6px 0 rgba(7, 10, 28, 0.55); }
.gold { background: linear-gradient(180deg, #fff6b0 8%, #ffda4d 52%, #ffb321 96%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 6px 0 rgba(7, 10, 28, 0.55)) drop-shadow(0 0 30px rgba(255, 197, 49, 0.35)); }

.lead { font-size: clamp(18px, 2vw, 21px); color: #d4daf0; max-width: 34em; margin: 0 0 30px; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.badge img { height: 64px; width: auto; display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; border-radius: 18px; text-decoration: none; font: 700 19px/1 var(--display); color: #241500; background: linear-gradient(180deg, #ffe680, #ffc531); box-shadow: 0 5px 0 #c98a00, 0 14px 30px rgba(255, 197, 49, 0.3); }
.btn:hover { color: #241500; filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #c98a00, 0 8px 20px rgba(255, 197, 49, 0.3); }
.soon { display: inline-flex; align-items: center; gap: 12px; margin: 0; padding: 14px 22px; border-radius: 18px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); font: 600 18px/1 var(--display); }
.soon .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: ping 1.8s ease-out infinite; }
@keyframes ping { to { box-shadow: 0 0 0 12px rgba(61, 220, 132, 0); } }

.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 26px 0 0; color: var(--dim); font: 500 16px/1.2 var(--display); }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--coin); }

.hero-media { display: flex; justify-content: center; }
.game-card { position: relative; width: min(340px, 78vw); aspect-ratio: 480 / 862; border-radius: 30px; overflow: hidden; background: var(--navy); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16), 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 110px rgba(255, 211, 77, 0.28); transform: rotate(2deg); }
.game-card video { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .cta, .facts { justify-content: center; }
  .game-card { transform: none; }
}

/* -------------------------------------------------------------- features */

.features { padding: clamp(40px, 7vw, 80px) 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: linear-gradient(180deg, rgba(28, 37, 80, 0.85), rgba(19, 26, 58, 0.85)); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius); padding: 26px 24px 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.card p { color: var(--dim); margin: 0; font-size: 16px; }
.ico { --c: var(--coin); width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 16px; background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent); }
.ico svg { width: 34px; height: 34px; fill: var(--c); }
.ico svg .hl { fill: color-mix(in srgb, var(--c) 55%, white); }
.ico svg text { font: 700 15px var(--display); fill: var(--navy); }
.ico.coin { --c: var(--coin); }
.ico.pink { --c: var(--pink); }
.ico.epic { --c: var(--epic); }
.ico.star { --c: var(--star); }
.ico.green { --c: var(--green); }
.ico.gem { --c: var(--gem); }

@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------- screenshots */

.screens { padding: clamp(40px, 7vw, 80px) 0; }
.strip { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px max(20px, (100% - var(--wrap)) / 2) 26px; scrollbar-color: var(--line) transparent; }
.strip img { flex: 0 0 auto; width: clamp(200px, 24vw, 270px); border-radius: 20px; scroll-snap-align: center; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08); }

/* ------------------------------------------------------------------ fair */

.fair { padding: clamp(40px, 7vw, 80px) 0; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.point { padding: 4px 6px; }
.point h3 { color: var(--coin); }
.point p { color: var(--dim); margin: 0; }
@media (max-width: 900px) { .grid.three { grid-template-columns: 1fr; text-align: center; } }

/* ---------------------------------------------------------------- closer */

.closer { padding: clamp(40px, 7vw, 90px) 0 clamp(60px, 8vw, 110px); }
.closer-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.closer-icon { border-radius: 30px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 80px rgba(255, 211, 77, 0.25); margin-bottom: 26px; }
.closer h2 { margin-bottom: 26px; }

/* ---------------------------------------------------------------- footer */

.foot { border-top: 1px solid rgba(255, 255, 255, 0.07); background: rgba(7, 10, 28, 0.6); padding: 34px 0 40px; }
.foot-in { width: min(var(--wrap), 100% - 40px); margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.foot-nav a { color: var(--text); text-decoration: none; font: 500 16px/1.4 var(--display); }
.foot-nav a:hover { color: var(--gem); }
.fine { color: var(--dim); font-size: 14px; margin: 0; }

/* ------------------------------------------------------ documents (legal) */

.prose { max-width: 800px; padding: clamp(30px, 6vw, 64px) 0 80px; }
.prose h1 { font-size: clamp(36px, 6vw, 54px); margin-bottom: 0.3em; }
.prose h1 + p em { color: var(--dim); font-style: normal; }
.prose h2 { font-size: clamp(24px, 3.4vw, 30px); text-align: left; margin: 1.8em 0 0.5em; }
.prose h3 { font-size: 20px; margin: 1.5em 0 0.4em; }
.prose p, .prose li { color: #d7dcef; }
.prose strong { color: #fff; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--coin); }
.prose code { font: 0.92em ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--navy3); padding: 1px 6px; border-radius: 6px; }
.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: 16px; }
.prose table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15.5px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { font: 600 15px/1.3 var(--display); color: var(--coin); background: rgba(28, 37, 80, 0.7); }
.prose tr:last-child td { border-bottom: 0; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--coin); background: rgba(28, 37, 80, 0.6); border-radius: 0 12px 12px 0; }

/* ------------------------------------------------------------------- 404 */

.lost { text-align: center; padding: clamp(50px, 10vw, 120px) 0; }
.lost .big { font: 700 clamp(90px, 18vw, 160px)/1 var(--display); margin: 0; background: linear-gradient(180deg, #fff6b0, #ffb321); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lost .links { color: var(--dim); }

@media (prefers-reduced-motion: reduce) {
  .soon .dot { animation: none; }
  .strip { scroll-behavior: auto; }
}
