/* The app's fonts, served from this site (no requests to other servers).
   Copied from app/src/main/res/font; licences in fonts/OFL-*.txt. Weights 600 and up
   use the Commissioner ExtraBold file, the nearest heavier weight. */
@font-face {
  font-family: "Commissioner";
  src: url("/fonts/Commissioner-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Commissioner";
  src: url("/fonts/Commissioner-ExtraBold.ttf") format("truetype");
  font-weight: 600 900;
  font-display: swap;
}

/* "Tokens & Waves": the icon's pink and blue tokens and lilac point
   (app/src/main/kotlin/com/tairi/ui/theme/Tokens.kt) on a bright pink page, drawn with ink outlines. */
:root {
  --bg: #ffe2ee;
  --ink: #1b1020;
  --card: #fff8fb;
  --muted: #5b4763;
  --pink: #ff7eb3;
  --blue: #7ab0ff;
  --lilac: #c8a2ff;
  --honey: #ffd27a;
  --mint: #9fe3c8;
  --line: 2.5px solid var(--ink);
  --gutter: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { line-height: 1.1; font-weight: 900; text-wrap: balance; overflow-wrap: break-word; }
a { color: var(--ink); text-decoration-thickness: 2px; text-decoration-color: var(--pink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px var(--gutter) 40px;
}

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

/* One language at a time (lang.js sets data-lang on <html>). Without JavaScript both show. */
html[data-lang="en"] [data-lang="el"],
html[data-lang="el"] [data-lang="en"],
html[data-lang] .no-js { display: none; }
html:not([data-lang]) .picker { display: none; }

/* ---------- Header bar ---------- */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 10px 12px 10px 10px;
  border: var(--line); border-radius: 999px; background: var(--card);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; text-decoration: none; }
.logo { width: 40px; height: 40px; border-radius: 50%; display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.nav a { padding: 8px 10px; border-radius: 999px; font-weight: 800; text-decoration: none; }
.nav a:hover { background: var(--honey); }

.picker { display: inline-flex; gap: 2px; padding: 3px; border: 2px solid var(--ink); border-radius: 999px; background: var(--bg); }
.picker button {
  font: 800 .85rem/1 "Commissioner", system-ui, sans-serif;
  color: var(--ink); background: none; border: 0; border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
}
.picker button[aria-pressed="true"] { background: var(--ink); color: var(--card); }

/* ---------- Shared pieces ---------- */
.sticker {
  display: inline-block; padding: 6px 12px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--honey);
  font-weight: 900; font-size: .8rem; line-height: 1.3; transform: rotate(-2deg);
}
.h1 { font-size: clamp(2.7rem, 8vw, 5.4rem); line-height: .98; letter-spacing: -.04em; margin-top: 18px; }
.h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1; letter-spacing: -.03em; }
.sub { font-weight: 600; margin-top: 10px; max-width: 52ch; }
.sec { padding-block: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: var(--line); border-radius: 16px; padding: 12px 20px;
  font-weight: 900; background: var(--blue); color: var(--ink); text-decoration: none;
  transition: background-color .12s;
}
.btn:hover { background: var(--honey); }
.btn.alt { background: var(--card); }
.btn.alt:hover { background: var(--honey); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-sm { padding: 8px 14px; border-width: 2px; border-radius: 999px; font-size: .88rem; }
.btn-sm svg { width: 16px; height: 16px; }

/* The hero word that loops "tonight?" and "today?". Both words share one grid cell, so the line never jumps. */
.h1 em { font-style: normal; }
.hl { background: var(--pink); padding: 0 .12em; border-radius: .18em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.swap { display: inline-grid; }
.swap > span { grid-area: 1 / 1; animation: swap-out 5s ease-in-out infinite; }
.swap > span:nth-child(2) { opacity: 0; background: var(--blue); animation-name: swap-in; }
@keyframes swap-out { 0%, 42% { opacity: 1; transform: none; } 50%, 92% { opacity: 0; transform: translateY(-.25em); } 100% { opacity: 1; transform: none; } }
@keyframes swap-in { 0%, 42% { opacity: 0; transform: translateY(.25em); } 50%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(.25em); } }

/* ---------- Home: hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; padding-block: 48px 40px; }
.lede { font-size: 1.2rem; font-weight: 600; margin-top: 18px; max-width: 36ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.ripple { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.ring { fill: none; stroke: var(--ink); stroke-width: 2; transform-box: fill-box; transform-origin: center; opacity: 0; animation: ripple 3.6s ease-out infinite; }
.ring:nth-of-type(2) { animation-delay: 1.2s; }
.ring:nth-of-type(3) { animation-delay: 2.4s; }
@keyframes ripple { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }

/* The two tokens slide in from the sides and the diamond spins up from below, locking into the app icon.
   One 42s loop: ~1.1s to assemble, the icon holds for ~40s, ~1.3s to come apart, then it starts again.
   Offsets are in icon units (the group is scaled 5×). */
.tok-pink, .tok-blue, .tok-dia { transform-box: fill-box; transform-origin: center; }
.tok-pink { animation: from-left 42s linear .15s infinite both; }
.tok-blue { animation: from-right 42s linear .15s infinite both; }
.tok-dia { animation: spin-in 42s linear .55s infinite both; }
@keyframes from-left {
  0% { transform: translate(-28px, 0); opacity: 0; animation-timing-function: cubic-bezier(.2, .9, .25, 1.2); }
  2.6%, 96.5% { transform: none; opacity: 1; }
  96.5% { animation-timing-function: ease-in; }
  100% { transform: translate(-28px, 0); opacity: 0; }
}
@keyframes from-right {
  0% { transform: translate(28px, 0); opacity: 0; animation-timing-function: cubic-bezier(.2, .9, .25, 1.2); }
  2.6%, 96.5% { transform: none; opacity: 1; }
  96.5% { animation-timing-function: ease-in; }
  100% { transform: translate(28px, 0); opacity: 0; }
}
@keyframes spin-in {
  0% { transform: translateY(26px) rotate(-180deg) scale(.3); opacity: 0; animation-timing-function: cubic-bezier(.2, .9, .25, 1.15); }
  2.6%, 96.5% { transform: none; opacity: 1; }
  96.5% { animation-timing-function: ease-in; }
  100% { transform: translateY(26px) rotate(-180deg) scale(.3); opacity: 0; }
}

.members { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.members li { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-size: .88rem; }
.members b { font-weight: 900; }
.members span:last-child { color: var(--muted); font-weight: 600; }
.tok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .78rem; border: 2px solid var(--ink); }
.t0 { background: var(--pink); } .t1 { background: var(--blue); } .t2 { background: var(--lilac); } .t3 { background: var(--honey); }

/* ---------- Home: how it works, promises, modes ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.step { border: var(--line); border-radius: 22px; padding: 20px; background: var(--card); box-shadow: 5px 5px 0 var(--ink); display: grid; gap: 8px; align-content: start; }
.step:nth-child(1) { transform: rotate(-1.2deg); }
.step:nth-child(3) { transform: rotate(1.2deg); }
.step .n { width: 40px; height: 40px; border-radius: 50%; border: var(--line); display: grid; place-items: center; font-weight: 900; }
.step:nth-child(1) .n { background: var(--pink); } .step:nth-child(2) .n { background: var(--blue); } .step:nth-child(3) .n { background: var(--lilac); }
.step h3 { font-size: 1.2rem; }

.proms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.prom { border: var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 4px; align-content: start; }
.prom:nth-child(1) { background: var(--honey); } .prom:nth-child(2) { background: var(--mint); } .prom:nth-child(3) { background: var(--lilac); } .prom:nth-child(4) { background: var(--blue); }
.prom svg { width: 26px; height: 26px; }
.prom h3 { font-size: 1rem; line-height: 1.25; }
.prom p { font-size: .92rem; font-weight: 600; }

.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.mode { border: var(--line); border-radius: 26px; padding: 24px; display: grid; gap: 14px; align-content: start; }
.mode.chat { background: var(--pink); }
.mode.play { background: var(--lilac); }
.mode-head { display: flex; align-items: center; gap: 12px; }
.mode-head svg { width: 48px; height: 48px; flex: none; }
.mode .sticker { background: var(--card); transform: none; }
.mode h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); letter-spacing: -.02em; }
.mode ul { display: grid; gap: 8px; }
.mode li { position: relative; padding-left: 26px; font-weight: 600; }
.mode li::before { content: ""; position: absolute; left: 0; top: .42em; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); }
.mode .btn { justify-self: start; }

/* ---------- Home: Guess who? ---------- */
.game { background: var(--ink); color: var(--card); border-radius: 32px; padding: 32px; margin-block: 16px; }
.game .sticker { background: var(--lilac); color: var(--ink); border-color: var(--card); }
.game .h2 { margin-top: 14px; }
.game .sub { color: #e6d6ea; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 26px; padding-bottom: 10px; }
.card { background: var(--card); color: var(--ink); border: 2.5px solid var(--card); border-radius: 18px; padding: 16px 16px 18px; display: grid; gap: 10px; align-content: start; min-height: 170px; }
.card .corner { display: flex; justify-content: space-between; font-weight: 900; font-size: 1.15rem; }
.card .corner span:last-child { color: var(--pink); -webkit-text-stroke: 1px var(--ink); }
.card p { font-weight: 600; font-size: .95rem; }
.card:nth-child(even) { transform: translateY(10px); }

/* ---------- Home: ablinki ---------- */
.about { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: center; border: var(--line); border-radius: 32px; padding: 32px; background: var(--card); box-shadow: 6px 6px 0 var(--ink); margin-top: 32px; }
.about svg { width: 100%; max-width: 340px; height: auto; display: block; margin: 0 auto; }
.about .sticker { background: var(--blue); }
.about .h2 { margin-top: 14px; }
.about-body { font-size: 1.08rem; font-weight: 600; margin-top: 12px; max-width: 50ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips li { padding: 7px 14px; border-radius: 999px; border: 2px solid var(--ink); font-weight: 800; font-size: .88rem; background: var(--honey); }
.chips li:nth-child(2) { background: var(--mint); } .chips li:nth-child(3) { background: var(--pink); }

/* ---------- Home: get the app ---------- */
.get { margin-top: 32px; border: var(--line); border-radius: 32px; padding: 32px; background: var(--honey); display: grid; gap: 4px; justify-items: start; }
.get .ctas { margin-top: 18px; }
.get .btn:hover, .get .btn.alt:hover { background: var(--lilac); }

/* ---------- Footer ---------- */
footer { display: flex; flex-wrap: wrap; gap: 10px 22px; padding-top: 36px; font-weight: 700; font-size: .9rem; }
footer .sp { margin-left: auto; }
footer .copy { flex-basis: 100%; font-size: .85rem; opacity: .8; }

/* ---------- Privacy policy ---------- */
.langs { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-weight: 700; }
.p-hero { padding-block: 44px 28px; display: grid; gap: 14px; justify-items: start; }
.p-hero .h1 { margin-top: 4px; }
.p-meta { font-weight: 700; color: var(--muted); }
.p-intro { font-size: 1.12rem; font-weight: 600; max-width: 62ch; }
.p-contact { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 2px solid var(--ink); border-radius: 999px; padding: 7px 16px; background: var(--card); font-weight: 800; }
.p-label { font-size: .8rem; line-height: 1; letter-spacing: .1em; text-transform: uppercase; }
.glance .proms { margin-top: 12px; }
.glance .prom { grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 10px; }
.p-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; padding-block: 32px 8px; }
.toc { position: sticky; top: 16px; border: var(--line); border-radius: 22px; background: var(--card); padding: 16px; display: grid; gap: 2px; }
.toc h2 { font-size: .78rem; line-height: 1; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px 10px; }
.toc a { padding: 7px 10px; border-radius: 12px; font-weight: 700; font-size: .92rem; line-height: 1.3; text-decoration: none; }
.toc a:hover { background: var(--honey); }
.p-secs { display: grid; gap: 16px; min-width: 0; }
.p-sec { border: var(--line); border-radius: 24px; background: var(--card); padding: 24px; display: grid; gap: 12px; scroll-margin-top: 16px; }
.p-sec h2 { font-size: clamp(1.25rem, 2.6vw, 1.55rem); line-height: 1.15; letter-spacing: -.02em; display: flex; gap: 12px; align-items: center; }
.p-sec h2::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; border: var(--line); background: var(--pink); }
.p-sec:nth-child(5n+2) h2::before { background: var(--blue); }
.p-sec:nth-child(5n+3) h2::before { background: var(--lilac); }
.p-sec:nth-child(5n+4) h2::before { background: var(--honey); }
.p-sec:nth-child(5n+5) h2::before { background: var(--mint); }
.p-sec p, .p-sec li { max-width: 70ch; }
.p-sec ul { display: grid; gap: 10px; }
.p-sec li { position: relative; padding-left: 24px; }
.p-sec li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: var(--bg); }

/* ---------- Analytics consent (analytics.js) ---------- */
.linkish {
  font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--pink); text-underline-offset: 3px;
}
.consent {
  position: fixed; z-index: 10; left: var(--gutter); right: var(--gutter); bottom: 16px;
  max-width: 560px; margin-inline: auto;
  border: var(--line); border-radius: 22px; background: var(--card); padding: 16px 18px;
  box-shadow: 4px 4px 0 var(--ink); font-weight: 600; font-size: .95rem;
}
.consent-in { display: grid; gap: 12px; }
.consent-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.consent .btn { font-family: inherit; cursor: pointer; }

/* ---------- Motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  .swap > span { animation: none; }
  .swap > span:nth-child(2) { visibility: hidden; }
  .tok-pink, .tok-blue, .tok-dia { animation: none; }
  .ring { animation: none; opacity: .35; }
  .ring:nth-of-type(2) { transform: scale(.75); opacity: .5; }
  .ring:nth-of-type(3) { transform: scale(.5); opacity: .7; }
  .btn { transition: none; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
  .proms, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero, .about, .p-layout { grid-template-columns: minmax(0, 1fr); }
  .steps, .modes { grid-template-columns: minmax(0, 1fr); }
  .step:nth-child(n) { transform: none; }
  .top { border-radius: 24px; }
  .game, .about, .get { padding: 22px; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .toc h2 { flex-basis: 100%; padding: 2px 4px 6px; }
  .toc a { border: 2px solid var(--ink); border-radius: 999px; padding: 6px 12px; font-size: .85rem; }
  .p-sec { padding: 20px; }
}
@media (max-width: 480px) {
  .proms, .cards { grid-template-columns: minmax(0, 1fr); }
  .card:nth-child(even) { transform: none; }
  .card { min-height: 0; }
}

.inl-icon { width: 1.1em; height: 1.1em; vertical-align: -.2em; }

/* Game mode: Free play and Tournament, side by side under the numbered cards */
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.way { border: 2.5px solid var(--card); border-radius: 22px; padding: 20px; color: var(--ink); display: grid; gap: 12px; align-content: start; }
.way.free { background: var(--mint); }
.way.cup { background: var(--honey); }
.way h3 { font-size: 1.35rem; }
.way .lead { font-weight: 700; font-size: .95rem; }
.way ul { display: grid; gap: 8px; }
.way li { position: relative; padding-left: 26px; font-weight: 600; }
.way li::before { content: ""; position: absolute; left: 0; top: .42em; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); }
.way li b { font-weight: 900; }
@media (max-width: 760px) { .cmp { grid-template-columns: minmax(0, 1fr); } }
