/* Tanks vs Kittens: site styles. Colours mirror the game UI (TanksVsKittens/Assets/TvK/UI/Resources/TvKUI/TvKUI.uss). */
:root {
  --accent: #FFD23F;
  --accent-light: #FFE47F;
  --danger: #FF5A5F;
  --good: #4ADE80;
  --ink: #33294D;
  --paper: #FFF8EE;
  --panel: #3A2F5B;
  --panel-light: #54487D;
  --dim: #B6A9D6;
  --pink: #FF8FB1;
  --boss: #7C3AED;
  --water: #5CC8F0;
  --tuna: #FF8A7A;
  --kamikaze: #FF3D6E;
  --sky-top: #5FA8EE;
  --sky-bottom: #CFE8FF;
  --grass: #8BD36A;
  --grass-dark: #5DB345;

  --display: "Lilita One", "Fredoka", system-ui, sans-serif;
  --body: "Fredoka", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  --outline: 4px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 500;
  font-size: clamp(17px, 1.1vw + 12px, 20px);
  line-height: 1.55;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--accent);
  -webkit-text-stroke: 0;
  text-shadow:
    0 4px 0 var(--ink),
    3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink), 0 3px 0 var(--ink),
    2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink),
    0 8px 0 rgba(51, 41, 77, 0.35);
}
.hl { color: var(--pink); }

/* ---------------------------------------------------------------- buttons (game-style chunky) */
.btn {
  --bg: var(--paper); --fg: var(--ink); --edge: #d9cbb6;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--display); font-weight: 400; font-size: 1.1em; letter-spacing: 0.02em;
  text-decoration: none; color: var(--fg); background: var(--bg);
  padding: 0.6em 1.2em 0.5em;
  border: var(--outline) solid var(--ink);
  border-bottom-width: 9px;
  border-radius: 18px;
  box-shadow: inset 0 -5px 0 var(--edge), 0 6px 0 rgba(51, 41, 77, 0.25);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 1.1em; height: 1.1em; fill: currentColor; }
.btn:hover { transform: translateY(-2px) rotate(-1deg); filter: brightness(1.05); }
.btn:active { transform: translateY(3px); border-bottom-width: 5px; }
.btn:focus-visible { outline: 4px solid var(--water); outline-offset: 3px; }
.btn--big { font-size: clamp(1.15em, 1.4vw + 0.8em, 1.5em); }
.btn--accent { --bg: var(--accent); --edge: #E8B400; }
.btn--pink { --bg: var(--pink); --edge: #E96E95; }
.btn--ghost { --bg: transparent; --fg: var(--paper); --edge: transparent; border-color: var(--paper); box-shadow: none; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  overflow: hidden;
  background: var(--ink) url("/media/hero-loop-poster.jpg") center / cover no-repeat;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(51, 41, 77, 0.15) 0%, rgba(51, 41, 77, 0.55) 75%),
    linear-gradient(to bottom, rgba(51, 41, 77, 0.35) 0%, rgba(51, 41, 77, 0) 30%, rgba(51, 41, 77, 0.75) 100%);
}
.hero__inner {
  width: 100%; max-width: 1000px;
  padding: calc(64px + env(safe-area-inset-top)) var(--gutter) 96px;
  text-align: center;
}
.hero__title img {
  width: min(100%, 880px); height: auto; margin: 0 auto;
  filter: drop-shadow(0 8px 0 rgba(51, 41, 77, 0.45));
  animation: bob 4s ease-in-out infinite;
}
.hero__tag {
  margin: 1.2rem auto 2rem;
  max-width: 34ch;
  color: var(--paper);
  font-weight: 700;
  font-size: clamp(1.1rem, 1.6vw + 0.8rem, 1.7rem);
  line-height: 1.3;
  text-shadow: 0 3px 0 var(--ink), 0 0 18px rgba(51, 41, 77, 0.8);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px 18px; justify-content: center; }
.hero__scroll {
  position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  translate: -50% 0;
  width: 48px; height: 48px; display: grid; place-items: center;
  color: var(--paper); border-radius: 50%;
  background: rgba(51, 41, 77, 0.5);
  animation: nudge 1.8s ease-in-out infinite;
}
.hero__scroll svg { width: 28px; height: 28px; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-0.6deg); } }
@keyframes nudge { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .hero__title img, .hero__scroll { animation: none; }
}

/* ---------------------------------------------------------------- trailer */
.trailer {
  position: relative;
  padding: clamp(40px, 6vw, 80px) var(--gutter);
  background:
    repeating-conic-gradient(from 0deg at 50% 0%, rgba(255, 255, 255, 0.10) 0deg 8deg, transparent 8deg 16deg),
    linear-gradient(var(--sky-top), var(--sky-bottom));
}
.trailer__frame {
  position: relative;
  max-width: 1100px; margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 6px solid var(--ink);
  border-radius: 28px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 12px 0 rgba(51, 41, 77, 0.35);
}
.trailer__frame.is-tall { aspect-ratio: 9 / 16; max-width: min(440px, 100%); max-height: none; }
.trailer__video { width: 100%; height: 100%; object-fit: cover; background: var(--ink); }
.trailer__play {
  position: absolute; inset: 0;
  display: grid; place-items: center; align-content: center; gap: 12px;
  border: 0; padding: 0; cursor: pointer;
  background: rgba(51, 41, 77, 0.15);
  color: var(--ink); font: inherit;
}
.trailer__play-disc {
  width: clamp(76px, 11vw, 120px); aspect-ratio: 1;
  display: grid; place-items: center;
  background: var(--accent);
  border: 5px solid var(--ink); border-bottom-width: 10px;
  border-radius: 50%;
  box-shadow: 0 8px 0 rgba(51, 41, 77, 0.35);
  transition: transform 0.15s ease;
}
.trailer__play-disc svg { width: 50%; fill: var(--ink); translate: 6% 0; }
.trailer__play-label {
  font-family: var(--display); font-size: 1.3em; color: var(--paper);
  text-shadow: 0 3px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink);
}
.trailer__play:hover .trailer__play-disc { transform: scale(1.08) rotate(-4deg); }
.trailer__play:focus-visible { outline: 5px solid var(--water); outline-offset: -10px; }
.trailer__frame.is-playing .trailer__play { display: none; }

/* ---------------------------------------------------------------- pitch */
.pitch {
  background: var(--grass);
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 60px, transparent 60px 120px);
  padding: clamp(56px, 8vw, 110px) 0;
  text-align: center;
  position: relative;
}
.pitch::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 28px;
  background: var(--sky-bottom);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  border-bottom: var(--outline) solid var(--ink);
}
.kicker {
  margin: 0 0 0.3em;
  font-family: var(--display); font-size: clamp(1.2rem, 2vw + 0.6rem, 2rem);
  color: var(--paper); text-shadow: 0 3px 0 var(--ink);
}
.pitch h2 { font-size: clamp(2.2rem, 5vw + 0.8rem, 4.4rem); }
.lead {
  max-width: 44rem; margin: 1.6rem auto 2.4rem;
  font-size: 1.1em; font-weight: 600;
  background: var(--paper);
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius);
  padding: 1.2em 1.4em;
  box-shadow: 0 8px 0 rgba(51, 41, 77, 0.3);
  text-align: left;
}
.stats {
  list-style: none; margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  max-width: 900px;
}
.stats li {
  background: var(--panel);
  color: var(--paper);
  border: var(--outline) solid var(--ink);
  border-radius: 18px;
  padding: 14px 10px 12px;
  display: grid; gap: 2px;
  transform: rotate(var(--tilt, -1.5deg));
}
.stats li:nth-child(2) { --tilt: 1.5deg; }
.stats li:nth-child(3) { --tilt: -1deg; }
.stats li:nth-child(4) { --tilt: 2deg; }
.stats b { font-family: var(--display); font-weight: 400; font-size: 2.4em; line-height: 1; color: var(--accent); }
.stats span { font-size: 0.85em; color: var(--dim); line-height: 1.25; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- features */
.features { background: var(--panel); color: var(--paper); padding: clamp(56px, 8vw, 110px) 0; }
.section-title { font-size: clamp(2rem, 4vw + 0.8rem, 3.6rem); text-align: center; }
.section-sub { text-align: center; margin: 0.8rem auto 0; max-width: 40rem; font-weight: 600; }
.features .section-title { margin-bottom: clamp(32px, 5vw, 64px); }
.feature {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-bottom: clamp(48px, 7vw, 88px);
}
.feature:last-child { margin-bottom: 0; }
.feature--flip .feature__media { order: 2; }
.feature__media, .tank__media {
  border: 5px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-light);
  aspect-ratio: 16 / 9;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.25);
}
.feature__media { transform: rotate(-1.2deg); }
.feature--flip .feature__media { transform: rotate(1.2deg); }
.feature__media video, .tank__media video { width: 100%; height: 100%; object-fit: cover; }
.feature h3 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.8rem, 2.5vw + 0.8rem, 2.6rem);
  color: var(--paper);
  margin: 0.3em 0 0.4em;
}
.feature p { margin: 0 0 1em; color: #EDE6F7; }
.feature p.chip { color: var(--ink); margin: 0; }
.feature p.chip--boss { color: var(--paper); }
.chip {
  display: inline-block; margin: 0;
  font-family: var(--display); font-size: 0.95em; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.2em 0.8em 0.1em;
  border: 3px solid var(--ink); border-radius: 999px;
  color: var(--ink); background: var(--accent);
}
.chip--tuna { background: var(--tuna); }
.chip--kamikaze { background: #FF6F91; }
.chip--boss { background: var(--boss); color: var(--paper); }
.chip--water { background: var(--water); }
.tags { list-style: none; padding: 0; margin: 0.4em 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: 0.8em; font-weight: 700;
  padding: 0.25em 0.75em;
  border-radius: 12px;
  background: var(--panel-light);
  border: 2px solid var(--ink);
  color: var(--paper);
}
@media (max-width: 800px) {
  .feature { grid-template-columns: 1fr; }
  .feature--flip .feature__media { order: 0; }
}

/* ---------------------------------------------------------------- tanks */
.tanks {
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
  padding: clamp(56px, 8vw, 110px) 0;
}
.tanks .section-sub, .roster .section-sub { color: var(--ink); }
.tank-grid {
  margin-top: clamp(28px, 4vw, 48px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}
.tank {
  --tank: var(--danger);
  background: var(--paper);
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 10px 0 rgba(51, 41, 77, 0.3);
  transition: transform 0.15s ease;
}
.tank:hover { transform: translateY(-6px) rotate(-1deg); }
.tank--mauler { --tank: #E84545; }
.tank--soaker { --tank: #3B82F6; }
.tank--yarn { --tank: #3DBE5A; }
.tank--bertha { --tank: #F2B705; }
.tank__media { border: 0; border-bottom: var(--outline) solid var(--ink); border-radius: 0; box-shadow: none; }
.tank__body { padding: 16px 18px 20px; border-top: 10px solid var(--tank); flex: 1; }
.tank h3 { font-family: var(--display); font-weight: 400; font-size: 1.8em; color: var(--ink); }
.tank__tag { margin: 0.3em 0 0.8em; font-weight: 700; color: var(--panel-light); line-height: 1.3; }
.tank dl { margin: 0; font-size: 0.9em; line-height: 1.4; }
.tank dt {
  font-family: var(--display); font-size: 0.85em; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink);
  display: flex; align-items: center; gap: 6px;
}
.tank dt::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--tank); border: 2px solid var(--ink); }
.tank dd { margin: 0 0 0.6em; }
@media (max-width: 1000px) { .tank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tank-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- roster */
.roster { background: var(--sky-bottom); padding: 0 0 clamp(56px, 8vw, 100px); text-align: center; }
.roster__list {
  list-style: none; padding: 0; margin: 28px auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  max-width: 860px;
}
.roster__list li {
  font-family: var(--display); font-size: 1.15em;
  padding: 0.35em 0.9em 0.25em;
  background: var(--paper);
  border: var(--outline) solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 5px 0 rgba(51, 41, 77, 0.25);
}
.roster__list li:nth-child(odd) { transform: rotate(-2deg); }
.roster__list li:nth-child(even) { transform: rotate(2deg); }
.roster__list .roster__boss { background: var(--boss); color: var(--paper); }

/* ---------------------------------------------------------------- join / CTA */
.join {
  background: var(--danger);
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 24px, transparent 24px 48px);
  padding: clamp(56px, 8vw, 100px) 0;
  border-top: var(--outline) solid var(--ink);
  text-align: center;
  color: var(--paper);
}
.join h2 { font-size: clamp(2.2rem, 5vw + 0.6rem, 4.2rem); }
.join__text { font-weight: 700; font-size: 1.15em; margin: 1rem auto 1.8rem; max-width: 34rem; text-shadow: 0 2px 0 rgba(51, 41, 77, 0.5); }
.join__ctas { display: flex; flex-wrap: wrap; gap: 14px 18px; justify-content: center; align-items: center; }

/* ---------------------------------------------------------------- footer */
.footer { background: var(--ink); color: var(--dim); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; }
.footer__brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); font-family: var(--display); font-size: 1.3em; }
.footer__brand img { border-radius: 12px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer__nav a { text-decoration: none; font-weight: 700; color: var(--paper); }
.footer__nav a:hover { color: var(--accent); }
.footer__small { flex-basis: 100%; margin: 0; font-size: 0.85em; }
.footer__small a { color: var(--accent); }
