/* Krynetic Games — site stylesheet.
   One file for every page. No JavaScript anywhere on the site.
   Palette and type match Flip Drift: deep indigo ground, neon cyan / magenta / amber,
   Press Start 2P for the wordmark and headings, the system font for reading. */

:root {
  --bg: #07071a;
  --bg-glow: #17114a;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --cyan: #4deaff;
  --cyan-dim: rgba(77, 234, 255, 0.35);
  --magenta: #ff3b7f;
  --magenta-dim: rgba(255, 59, 127, 0.35);
  --amber: #ffd166;
  --text: #eef0fb;
  --text-soft: #c9cde3;
  --muted: #9ea4c6;
  --ink: #06111a;
  --pixel: "Press Start 2P", "Courier New", monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  --wrap: 1080px;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  background:
    radial-gradient(70% 45% at 50% -5%, var(--bg-glow) 0%, rgba(23, 17, 74, 0) 70%),
    var(--bg);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
  border-radius: 4px;
}

::selection { background: var(--magenta); color: #fff; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 14px;
  background: var(--cyan);
  color: var(--ink);
  border-radius: 8px;
  font-weight: 700;
  z-index: 100;
}
.skip:focus { top: 16px; }

/* ---------- Type ---------- */

.pixel {
  font-family: var(--pixel);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; }

h1.pixel {
  font-size: clamp(24px, 4.6vw, 40px);
  line-height: 1.45;
  color: var(--cyan);
  text-shadow: 0 0 18px var(--cyan-dim), 0 0 2px rgba(77, 234, 255, 0.6);
}

h2.pixel {
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.6;
  color: var(--text);
}

h3 { font-size: 19px; font-weight: 700; }

p { margin: 0; }
p + p { margin-top: 14px; }
h1.pixel + .lede { margin-top: 22px; }
h2.pixel + p { margin-top: 14px; }

.lede {
  font-size: clamp(18px, 2.3vw, 22px);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 34ch;
}

.eyebrow {
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--magenta);
  margin: 0 0 14px;
}
.eyebrow.cyan { color: var(--cyan); }

.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- Header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 7, 26, 0.72);
  border-bottom: 1px solid var(--line);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 22px;
  height: 26px;
  filter: drop-shadow(0 0 6px var(--cyan-dim));
}
.brand span {
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  padding-top: 2px;
  white-space: nowrap;
}
.brand em { font-style: normal; }
.brand span b { color: var(--cyan); font-weight: 400; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--panel-strong); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--cyan); }

/* ---------- Buttons & chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.15;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-primary {
  background: var(--cyan);
  color: var(--ink);
  box-shadow: 0 10px 30px -12px rgba(77, 234, 255, 0.75);
}
.btn-primary:hover { box-shadow: 0 14px 34px -12px rgba(77, 234, 255, 0.9); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--panel-strong); }

.btn-soon {
  background: var(--panel);
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  cursor: default;
}
.btn-soon:hover { transform: none; }

.btn small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
  line-height: 1;
  margin-bottom: 4px;
}
.btn .stack { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.chip.live::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.chip.soon::before { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.chip.later::before { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }

/* ---------- Sections ---------- */

main { flex: 1; }

.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 34px;
}
.section-head p { color: var(--muted); max-width: 46ch; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 64px 0 72px;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.hero-copy { position: relative; z-index: 1; }

/* The scene: a slice of a Flip Drift run drawn in CSS and inline SVG. */

.scene {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(60% 70% at 70% 30%, rgba(255, 59, 127, 0.18) 0%, rgba(255, 59, 127, 0) 60%),
    radial-gradient(60% 70% at 30% 75%, rgba(77, 234, 255, 0.14) 0%, rgba(77, 234, 255, 0) 60%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, #14103a 0%, #0a0824 100%);
  box-shadow:
    0 30px 80px -40px rgba(77, 234, 255, 0.45),
    0 30px 80px -50px rgba(255, 59, 127, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.scene::after {
  /* vignette so the edges settle into the page */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(90% 90% at 50% 50%, transparent 55%, rgba(7, 7, 26, 0.7) 100%);
}

.bar {
  position: absolute;
  width: 3.2%;
  border-radius: 999px;
}
.bar::before, .bar::after {
  content: "";
  position: absolute;
  left: -45%;
  width: 190%;
  height: 4.5%;
  min-height: 7px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}
.bar::before { top: -2%; }
.bar::after { bottom: -2%; }

.bar.cyan {
  background: linear-gradient(180deg, rgba(77, 234, 255, 0.55), var(--cyan) 30%, var(--cyan) 70%, rgba(77, 234, 255, 0.55));
  box-shadow: 0 0 18px var(--cyan), 0 0 60px var(--cyan-dim);
}
.bar.magenta {
  background: linear-gradient(180deg, rgba(255, 59, 127, 0.55), var(--magenta) 30%, var(--magenta) 70%, rgba(255, 59, 127, 0.55));
  box-shadow: 0 0 18px var(--magenta), 0 0 60px var(--magenta-dim);
}
.bar.amber {
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.55), var(--amber) 30%, var(--amber) 70%, rgba(255, 209, 102, 0.55));
  box-shadow: 0 0 18px var(--amber), 0 0 60px rgba(255, 209, 102, 0.35);
}

/* gate 1 — magenta, gap high */
.bar.b1 { left: 22%; top: -6%; height: 30%; }
.bar.b2 { left: 22%; top: 58%; height: 50%; }
/* gate 2 — cyan, gap low */
.bar.b3 { left: 56%; top: -6%; height: 60%; }
.bar.b4 { left: 56%; top: 84%; height: 30%; }
/* gate 3 — amber, gap mid */
.bar.b5 { left: 86%; top: -6%; height: 36%; }
.bar.b6 { left: 86%; top: 70%; height: 40%; }

.trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.trail .path {
  fill: none;
  stroke: url(#trailGrad);
  stroke-width: 7;
  stroke-linecap: round;
}
.trail .path.glow {
  stroke-width: 22;
  opacity: 0.35;
  filter: url(#blur);
}

.trail .orb { fill: #eafcff; }
.trail .orb-glow { fill: var(--cyan); opacity: 0.55; filter: url(#blur); }

.trail .spark { fill: var(--amber); }

@media (prefers-reduced-motion: no-preference) {
  .trail .path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 2.2s cubic-bezier(0.3, 0.7, 0.2, 1) 0.3s forwards;
  }
  .trail .orb, .trail .orb-glow {
    opacity: 0;
    animation: arrive 0.6s ease-out 2.1s forwards;
  }
  .trail .orb-glow { animation: arrive-glow 0.6s ease-out 2.1s forwards, pulse 2.4s ease-in-out 2.8s infinite; }
  .trail .spark { animation: twinkle 3s ease-in-out infinite; }
  .trail .spark:nth-child(2) { animation-delay: 0.6s; }
  .trail .spark:nth-child(3) { animation-delay: 1.3s; }
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes arrive { to { opacity: 1; } }
@keyframes arrive-glow { to { opacity: 0.55; } }
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.75; } }
@keyframes twinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

/* ---------- Cards ---------- */

.grid {
  display: grid;
  gap: 18px;
}
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  position: relative;
  padding: 26px 26px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 16px; }

.card.wide { grid-column: 1 / -1; }

.card .num {
  font-family: var(--pixel);
  font-size: 10px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.card.m .num { color: var(--magenta); }
.card.a .num { color: var(--amber); }

/* Game card on the home page */

.game {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 32px;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(70% 120% at 0% 50%, rgba(77, 234, 255, 0.10) 0%, rgba(77, 234, 255, 0) 60%),
    linear-gradient(180deg, var(--panel-strong), var(--panel));
  transition: border-color 150ms ease, transform 150ms ease;
}
.game:hover { border-color: rgba(77, 234, 255, 0.45); transform: translateY(-2px); }

.game .icon {
  width: 148px;
  height: 148px;
  border-radius: 32px;
  box-shadow:
    0 0 0 1px rgba(77, 234, 255, 0.25),
    0 18px 50px -20px rgba(77, 234, 255, 0.55),
    0 18px 50px -24px rgba(255, 59, 127, 0.45);
}

.game h3 {
  font-family: var(--pixel);
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}
.game h3 a { color: inherit; }
.game h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 22px; }
.game .desc { color: var(--text-soft); max-width: 52ch; }
.game .chips { margin-top: 18px; }
.game .more {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-weight: 600;
}

/* ---------- Game page ---------- */

.art {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow:
    0 40px 100px -50px rgba(77, 234, 255, 0.55),
    0 40px 100px -60px rgba(255, 59, 127, 0.6);
}
.art img { width: 100%; height: auto; }

.hero.game-hero { padding-top: 48px; }
.hero.game-hero .wrap {
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
.hero.game-hero .hero-copy { max-width: 820px; }
.hero.game-hero .lede { max-width: 40ch; }
.hero.game-hero .facts { margin-top: 28px; }
.actions + .small { margin-top: 14px; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
}
.facts li::before { content: "◆"; color: var(--magenta); font-size: 9px; margin-right: 9px; vertical-align: 2px; }

.steps {
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.steps li {
  list-style: none;
  counter-increment: step;
  padding: 24px 24px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}
.steps li::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--amber);
  margin-bottom: 14px;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 16px; }

.orbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.orbs li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px 7px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 14px;
  color: var(--text-soft);
}
.orbs i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgb(var(--o));
  box-shadow: 0 0 10px rgba(var(--o), 0.9);
}
/* Colours are the in-game glow values for each orb */
.orbs .drifter { --o: 77,234,255; }
.orbs .spark { --o: 255,117,185; }
.orbs .mint { --o: 92,255,214; }
.orbs .glacier { --o: 112,174,255; }
.orbs .ember { --o: 255,176,66; }
.orbs .toxic { --o: 128,255,140; }
.orbs .nova { --o: 198,120,255; }
.orbs .prism { --o: 255,255,255; }
.orbs .solar { --o: 255,140,50; }

/* ---------- Prose pages (privacy) ---------- */

.prose {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.prose h1 {
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
}
.prose .updated { color: var(--muted); font-size: 14px; margin-bottom: 34px; }
.prose h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 38px 0 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.prose p, .prose li { color: var(--text-soft); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 20px; margin: 10px 0; }
.prose li { margin: 7px 0; }
.prose .headline {
  border: 1px solid rgba(77, 234, 255, 0.35);
  background: linear-gradient(160deg, rgba(77, 234, 255, 0.09), rgba(255, 59, 127, 0.05));
  border-radius: 14px;
  padding: 22px 24px;
  margin: 0 0 8px;
}
.prose .headline p { margin: 0; font-size: 19px; color: var(--text); }
.prose .box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(16, 16, 28, 0.75);
  padding: 4px 20px;
  margin: 16px 0;
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  color: var(--amber);
}

/* ---------- Contact / about ---------- */

.contact-card {
  padding: 32px;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(255, 59, 127, 0.12) 0%, rgba(255, 59, 127, 0) 60%),
    linear-gradient(180deg, var(--panel-strong), var(--panel));
}
.contact-card .email {
  display: inline-block;
  margin-top: 16px;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}
.contact-card .email:hover { color: var(--cyan); }
.contact-card .small { margin-top: 18px; }

/* ---------- 404 ---------- */

.oops {
  text-align: center;
  padding: 80px 24px 100px;
}
.oops .code {
  font-family: var(--pixel);
  font-size: clamp(40px, 10vw, 72px);
  color: var(--magenta);
  text-shadow: 0 0 24px var(--magenta-dim);
  line-height: 1.2;
}
.oops h1 { margin-top: 20px; font-size: clamp(22px, 4vw, 30px); }
.oops p { color: var(--muted); margin-top: 12px; }

/* ---------- Footer ---------- */

footer.site {
  border-top: 1px solid var(--line);
  padding: 30px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}
footer.site ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
footer.site a { color: var(--text-soft); }
footer.site a:hover { color: var(--cyan); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .scene { order: -1; aspect-ratio: 16 / 10; }
  .grid.three, .steps { grid-template-columns: minmax(0, 1fr); }
  .grid.two { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 56px 0; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .top .wrap { height: 58px; }
  .brand span { font-size: 10px; }
  .nav a { padding: 8px 9px; font-size: 14px; }
}

@media (max-width: 480px) {
  .brand em { display: none; }
  .nav { gap: 0; }
  .nav a { padding: 8px 7px; font-size: 13px; }
  .hero { padding: 36px 0 56px; }
  .game { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 24px; }
  .game .icon { width: 112px; height: 112px; border-radius: 26px; }
  .actions .btn { flex: 1 1 100%; }
  .card, .contact-card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .game { transition: none; }
}
