/* TT Vision's site: the app's look (app/TTVision/TTVisionStyle.swift): the hall at night, the white lines of the table,
   the ball's orange as the one accent, condensed scoreboard numerals. */

@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --hall: #0f1c30;
  --card: #0a1426;
  --card-low: #07101f;
  --table: #1e4a86;
  --line: #f3f5f8;
  --muted: rgba(243, 245, 248, 0.68);
  --rule: rgba(243, 245, 248, 0.14);
  --ball: #f2902e;
  --display: "Barlow Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
  --measure: 62ch;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--hall);
  color: var(--line);
  font: 17px/1.55 var(--body);
}

/* one language at a time: the page carries both, the switch picks (site.js) */
html[data-lang="de"] [lang="en"]:not(html),
html[data-lang="en"] [lang="de"]:not(html) { display: none !important; }

a { color: var(--line); text-decoration-color: var(--ball); text-underline-offset: 3px; }
a:hover { color: var(--ball); }
:focus-visible { outline: 2px solid var(--ball); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------- top bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; padding-bottom: 20px;
}
.mark {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 26px/1 var(--display); letter-spacing: 0.01em; text-decoration: none;
}
.mark::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--ball);
}
.mark:hover { color: var(--line); }

.lang { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; }
.lang button {
  appearance: none; border: 0; background: none; color: var(--muted);
  font: 600 15px/1 var(--display); letter-spacing: 0.06em;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--line); color: var(--hall); }

/* ---------------------------------------------------------------- hero */
.hero { padding-top: clamp(28px, 6vw, 72px); }
.hero h1 {
  margin: 0; max-width: 14ch;
  font: 700 clamp(48px, 9vw, 112px)/0.92 var(--display); letter-spacing: -0.005em;
}
.hero .lede { margin: 22px 0 0; max-width: 44ch; font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); }

.board {
  margin: clamp(32px, 6vw, 64px) 0 0;
  border-radius: clamp(18px, 3vw, 36px);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--rule), 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.board figcaption { position: absolute; left: -9999px; }

/* ---------------------------------------------------------------- sections */
section.wrap { margin-top: clamp(64px, 10vw, 128px); }
h2 {
  margin: 0 0 18px;
  font: 700 clamp(34px, 5vw, 56px)/1 var(--display);
}
h3 { margin: 0 0 6px; font: 700 26px/1.1 var(--display); }
p { margin: 0 0 14px; max-width: var(--measure); }
.muted { color: var(--muted); }

/* the set-up: a real sequence, so the steps carry their numbers as flip cards */
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(3, 1fr); }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.flip {
  position: relative; width: 58px; height: 72px; border-radius: 8px;
  background: linear-gradient(var(--card) 50%, var(--card-low) 50%);
  display: grid; place-items: center;
  font: 700 54px/1 var(--display); color: var(--line);
}
.flip::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--hall); }
.steps p { margin: 0; color: var(--muted); }

/* what the board says */
.reads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 28px; }
.reads .val { font: 700 64px/1 var(--display); color: var(--line); }
.reads .val small { font-size: 0.42em; color: var(--muted); margin-left: 6px; }
.reads p { color: var(--muted); }

/* skins: a strip that scrolls sideways, each board at its own width */
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 520px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 18px;
  margin: 28px calc(-1 * var(--gutter)) 0;
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
}
.strip figure { margin: 0; scroll-snap-align: start; }
.strip img { border-radius: 16px; box-shadow: 0 0 0 1px var(--rule); }
.strip figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font: 600 20px/1.2 var(--display); }
.strip figcaption span:last-child { color: var(--muted); font-weight: 600; }
.free { color: var(--ball) !important; }

/* privacy statement: the one place the accent fills */
.private {
  margin-top: clamp(56px, 9vw, 112px);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: clamp(36px, 6vw, 64px) 0;
}
.private h2 { max-width: 18ch; }

/* ---------------------------------------------------------------- text pages */
.doc { padding-top: clamp(24px, 5vw, 56px); padding-bottom: 24px; }
.doc h1 { margin: 0 0 24px; font: 700 clamp(44px, 7vw, 80px)/0.95 var(--display); }
.doc h2 { font-size: clamp(28px, 4vw, 38px); margin-top: 40px; }
.doc ul { padding-left: 1.2em; max-width: var(--measure); }
.doc li { margin-bottom: 8px; }
.doc dl { max-width: var(--measure); }
.doc dt { font: 700 22px/1.2 var(--display); margin-top: 26px; }
.doc dd { margin: 6px 0 0; color: var(--muted); }

/* ---------------------------------------------------------------- footer */
footer { margin-top: clamp(56px, 9vw, 112px); border-top: 1px solid var(--rule); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; padding-top: 24px; padding-bottom: 40px; color: var(--muted); font-size: 15px; }
footer a { color: var(--muted); }
footer .sp { flex: 1; }

@media (max-width: 820px) {
  .steps, .reads { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .strip { scroll-behavior: smooth; }
}
