/* thepaintislava.com — tokens and rules in website/DESIGN.md */
@font-face {
  font-family: "Lilita One";
  src: url("/fonts/lilitaone-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ink: #1d1446;
  --ink-soft: #3d3470;
  --paper: #fff8ee;
  --white: #ffffff;
  --sun: #ffd23f;
  --grape: #8b4dff;
  --grape-deep: #6a2fe0;
  --aqua: #22cfe6;
  --coral: #ff8257;
  --safe: #2bd96b;
  --hurt: #ff3b4e;
  --sky: #4aa3ff;
  --radius: 20px;
  --line: 4px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --gutter: 16px;
  --max: 1160px;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 600 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}
[hidden] {
  display: none !important;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--grape-deep);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ink);
}
:focus-visible {
  outline: 4px solid var(--grape);
  outline-offset: 3px;
  border-radius: 6px;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
}
h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}
h3 {
  font-size: 1.45rem;
}
p {
  margin: 0 0 1em;
}
.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  background: var(--sun);
  color: var(--ink);
  padding: 10px 16px;
  border: var(--line);
  border-radius: 12px;
  font-weight: 800;
}
.skip:focus {
  top: 8px;
}

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  padding: 12px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.25rem;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 3px solid var(--ink);
}
.nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.78);
  border: 3px solid var(--ink);
  font-size: 0.95rem;
}
.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--sun);
}
@media (max-width: 640px) {
  .nav a.nav-optional {
    display: none;
  }
  .brand span {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--sun);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  font: 400 1.35rem/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--bg);
  border: var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
}
.btn:hover {
  color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 var(--ink);
}
.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}
.btn-xl {
  min-height: 68px;
  padding: 16px 34px;
  font-size: clamp(1.6rem, 4.6vw, 2.1rem);
}
.btn-ghost {
  --bg: var(--white);
  font-size: 1.05rem;
  min-height: 46px;
  padding: 10px 18px;
  box-shadow: 4px 4px 0 var(--ink);
}
.btn .tri {
  width: 0;
  height: 0;
  border-left: 0.8em solid currentColor;
  border-top: 0.5em solid transparent;
  border-bottom: 0.5em solid transparent;
}
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--grape-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--white);
  border: 3px solid var(--ink);
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.2;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--safe);
  box-shadow: 0 0 0 3px rgb(43 217 107 / 0.3);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 920px);
  display: grid;
  align-items: center;
  padding: 96px 0 72px;
  background: var(--sky) center / cover no-repeat;
  background-image: url("/img/hero-960.webp");
  isolation: isolate;
  overflow: hidden;
}
@media (min-width: 961px) {
  .hero {
    background-image: url("/img/hero-1672.webp");
  }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 46%, rgb(255 255 255 / 0.55), rgb(255 255 255 / 0) 62%);
}
.hero-inner {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.hero-logo {
  width: min(92vw, 760px);
  filter: drop-shadow(0 10px 0 rgb(29 20 70 / 0.18));
}
.hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 5.2vw, 3rem);
  color: var(--ink);
  -webkit-text-stroke: 8px var(--white);
  paint-order: stroke fill;
  max-width: 18ch;
}
.hero-sub {
  margin: 0;
  max-width: 38ch;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  font-weight: 800;
  background: rgb(255 255 255 / 0.85);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 10px 16px;
}
.safe {
  color: #0d8a3e;
}
.hurt {
  color: #d01f33;
}
.play-note {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  background: rgb(255 255 255 / 0.85);
  border-radius: 999px;
  padding: 4px 14px;
}
.play-alt {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.hero .chips {
  justify-content: center;
}
.countdown {
  font-variant-numeric: tabular-nums;
}

/* ---------- Sections ---------- */
section {
  padding: 72px 0;
  scroll-margin-top: 16px;
}
.section-ink {
  background: var(--ink);
  color: var(--paper);
}
.section-ink a {
  color: var(--sun);
}
.section-sun {
  background: var(--sun);
}
.section-grape {
  background: var(--grape);
  color: var(--white);
}
.kicker {
  display: inline-block;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--aqua);
  color: var(--ink);
}
.lead {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  max-width: 60ch;
}
.center {
  text-align: center;
}
.center .lead {
  margin-inline: auto;
}
.splat-divider {
  display: block;
  width: 100%;
  height: 48px;
  margin: -1px 0;
}

/* ---------- Grids and cards ---------- */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.card {
  background: var(--white);
  color: var(--ink);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card h3 {
  margin-bottom: 6px;
}
.card p:last-child {
  margin-bottom: 0;
}
.card-media {
  padding: 0;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: var(--line);
}
.card-media .card-body {
  padding: 18px 20px 22px;
}
.swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  vertical-align: -3px;
  margin-right: 6px;
}
.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grape-deep);
}

/* Rule cards: green safe vs red hurts */
.rule-pair {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  margin-top: 28px;
}
.rule {
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  color: var(--ink);
}
.rule-safe {
  background: #c9f7da;
}
.rule-hurt {
  background: #ffd3d8;
}
.rule h3 {
  font-size: 1.8rem;
}

/* ---------- Mini-game ---------- */
.toy {
  display: grid;
  gap: 16px;
  justify-items: center;
}
.toy-frame {
  position: relative;
  width: 100%;
  max-width: 860px;
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #efe6d8;
  touch-action: none;
}
.toy-frame canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  cursor: crosshair;
}
.toy-hud {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 860px;
  font-weight: 800;
}
.bar {
  flex: 1;
  height: 22px;
  display: flex;
  border: 3px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}
.bar span {
  display: block;
  height: 100%;
  transition: width 0.15s linear;
}
.bar .g {
  background: var(--safe);
}
.bar .r {
  background: var(--hurt);
  margin-left: auto;
}
.toy-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(29 20 70 / 0.62);
  color: var(--white);
  text-align: center;
}
.toy-overlay[hidden] {
  display: none;
}
.toy-overlay .panel {
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: 34ch;
}
.toy-overlay h3 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: 0;
}
.toy-overlay p {
  margin: 0;
  font-weight: 800;
}
@media (max-width: 600px) {
  /* A squarer arena on phones: room for thumbs and for the end-of-round panel. */
  .toy-frame canvas {
    aspect-ratio: 1 / 1;
  }
}
@media (max-width: 520px) {
  .toy-overlay .btn-xl {
    min-height: 54px;
    font-size: 1.3rem;
    padding: 10px 22px;
  }
  .toy-overlay p {
    font-size: 0.92rem;
  }
}

/* ---------- Seasons ---------- */
.season-hero {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: center;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.timeline li {
  border: var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.timeline .when {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.timeline .now {
  background: var(--sun);
}
.timeline h3 {
  margin: 4px 0 6px;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  gap: 8px;
}
.checklist li {
  padding-left: 34px;
  position: relative;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--safe);
  border: 3px solid var(--ink);
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.gallery figure {
  margin: 0;
  border: var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--ink);
}
.gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin-inline: auto;
}
.faq details {
  background: var(--white);
  border: var(--line);
  border-radius: 16px;
  padding: 0 18px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 32px 16px 0;
  font-weight: 800;
  font-size: 1.1rem;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 8px;
  font: 400 1.8rem/1 var(--display);
  color: var(--grape);
}
.faq details[open] summary::after {
  content: "–";
}
.faq details > div {
  padding-bottom: 16px;
}

/* ---------- Final CTA ---------- */
.final {
  text-align: center;
  background: var(--sky) center / cover no-repeat;
  background-image: url("/img/hero-960.webp");
  position: relative;
  isolation: isolate;
}
.final::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(255 248 238 / 0.55);
}
.final .wrap {
  display: grid;
  justify-items: center;
  gap: 16px;
}

/* ---------- Page (inner pages) ---------- */
.page-head {
  padding: 120px 0 48px;
  background: linear-gradient(180deg, var(--sky), #8fc6ff);
  border-bottom: var(--line);
}
.page-head h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 0 0 8px;
}
.prose {
  max-width: 72ch;
}
.prose h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-top: 1.4em;
}
.prose ul {
  padding-left: 1.2em;
}
.prose li {
  margin-bottom: 0.35em;
}
.table-wrap {
  overflow-x: auto;
  border: var(--line);
  border-radius: 16px;
  background: var(--white);
  margin: 0 0 1.5em;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
}
th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid #eadfcf;
  vertical-align: top;
}
th {
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}
tr:last-child td {
  border-bottom: 0;
}
kbd {
  display: inline-block;
  font: 800 0.88em/1 var(--body);
  padding: 3px 7px;
  border: 2px solid var(--ink);
  border-bottom-width: 4px;
  border-radius: 7px;
  background: var(--paper);
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #d9d3f5;
  padding: 48px 0 120px;
  font-size: 0.97rem;
}
.site-footer a {
  color: var(--white);
}
.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.site-footer h2 {
  font-size: 1.25rem;
  color: var(--sun);
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.fine {
  margin-top: 32px;
  font-size: 0.88rem;
  color: #b8b0e0;
}

/* ---------- Sticky play bar (phones and tablets) ---------- */
.playbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: var(--line);
  transform: translateY(calc(100% + 40px));
  visibility: hidden;
  transition:
    transform 0.2s ease,
    visibility 0.2s;
}
.playbar.show {
  transform: none;
  visibility: visible;
}
.playbar .btn {
  min-height: 48px;
  padding: 8px 22px;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.playbar-text {
  font-weight: 800;
  line-height: 1.2;
  font-size: 0.95rem;
}
.playbar-text small {
  display: block;
  font-weight: 600;
  color: var(--ink-soft);
}
@media (min-width: 1024px) {
  .playbar {
    left: auto;
    right: 20px;
    bottom: 20px;
    border: var(--line);
    border-radius: 999px;
    padding: 8px 8px 8px 22px;
    box-shadow: var(--shadow);
  }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 60;
  width: min(100% - 32px, 460px);
  background: var(--ink);
  color: var(--white);
  border: 3px solid var(--sun);
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 800;
  text-align: center;
}
.toast[hidden] {
  display: none;
}
.toast a,
.toast .link-btn {
  color: var(--sun);
}

/* In-app browser tip (TikTok, Instagram…) */
.inapp-tip {
  margin: 0;
  background: var(--white);
  border: 3px dashed var(--ink);
  border-radius: 14px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 0.95rem;
  max-width: 40ch;
}
.inapp-tip[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
