/* ============================================================================
   theme.css — Patemo: "De tafel" (2026-10-01).
   The only design file this site rewrites; tokens.css and site.css stay byte-identical
   to the template.

   Michael found the "Onder de lamp" hall (dark gradients, glow, monospace labels, outlined
   counters) not beautiful and asked for a site inspired by Awwwards Sites of the Day. The
   reference that fits a racket sport is Merci Michel's The Tie-Break (SOTD 25-09-2026): the
   court lines ARE the page grid, on a flat colour field, with oversized type laid over them.
   Patemo's version is the table: a flat table-blue hero whose white edge, centre line and net
   frame the headline, the phone standing across the net, one orange ball crossing it.

   Colours are the app's design-v2 roles (apps/patemo/docs/design/DESIGN-v2.md §4): table blue
   for the playing surface, ball orange only as a marker or a fill under dark ink (never as text
   on white), deep teal for the won rallies. Grounds are white (light) or deep navy (dark).

   Avoid: gradients, glow, cream grounds, monospace or numbered labels, pill buttons, italic
   accent words, a dark hero by default.
   ============================================================================ */

/* ---- palette ---- */
:root,
[data-theme="light"] {
  --bg:#ffffff; --bg-2:#f1f4f8; --surface:#ffffff;
  --text:#0c1a2b; --text-soft:#4a5a6c;
  --accent:#176b60; --accent-2:#1f8577; --accent-ink:#ffffff;
  --accent-text:#176b60;
  --line:#d8dee7;
  --verified:#176b60; --caution:#a34208; --caution-text:#7a3309;
  --table:#1a4f98; --table-deep:#123b74; --ink:#0c1a2b; --ball:#ff9a4d; --won:#2fae96;
  --orange-soft:#fff0df; --on-orange-soft:#6b2d07;
  --halo:none;
}
[data-theme="dark"] {
  --bg:#0b1622; --bg-2:#101f2f; --surface:#112234;
  --text:#eef3f8; --text-soft:#a9b8c8;
  --accent:#72c9b8; --accent-2:#8dd6c7; --accent-ink:#0b1622;
  --accent-text:#72c9b8;
  --line:#22374d;
  --verified:#72c9b8; --caution:#ffad66; --caution-text:#ffddbb;
  --chip-bg:#112234;
  --orange-soft:#3b2818; --on-orange-soft:#ffddbb;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:#0b1622; --bg-2:#101f2f; --surface:#112234;
    --text:#eef3f8; --text-soft:#a9b8c8;
    --accent:#72c9b8; --accent-2:#8dd6c7; --accent-ink:#0b1622;
    --accent-text:#72c9b8;
    --line:#22374d;
    --verified:#72c9b8; --caution:#ffad66; --caution-text:#ffddbb;
    --chip-bg:#112234;
    --orange-soft:#3b2818; --on-orange-soft:#ffddbb;
  }
}


/* ---- type and shared bits ---- */
body { --display-tracking: -.035em; }
body h1, body h2 { font-weight: 850; letter-spacing: -.045em; line-height: .95; }
body h3 { font-weight: 780; letter-spacing: -.02em; }
body .eyebrow { font-size: .82rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: inherit; }
body .eyebrow::before { width: .62rem; height: .62rem; border-radius: 50%; background: var(--ball); }
body .btn, body .btn.primary { border-radius: 8px; min-height: 48px; padding-inline: 1.3rem; box-shadow: none; }
body .btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
body .btn.primary:hover { box-shadow: none; transform: translateY(-2px); }

/* ---- shell: main is full width, the header sits on the table ---- */
body:has(.pt-hero) main { max-width: none; padding-inline: 0; overflow-x: clip; }
body:has(.pt-hero) { position: relative; }
body:has(.pt-hero) > header.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 40;
  padding-inline: max(1.25rem, calc((100% - 72rem) / 2 + 1.25rem));
  --text:#ffffff; --text-soft:#d6e3f5; --line:rgba(255,255,255,.4);
  --language-text:#0c1a2b; --language-surface:#ffffff; }
body:has(.pt-hero) > header.nav .brand { color: #fff; }
body:has(.pt-hero) > header.nav [data-language-picker] .language-trigger { --text:#fff; color:#fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.45); }
.wrap-x { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }

/* ============================================================================
   1. the table
   ============================================================================ */
.pt-hero { --text:#ffffff; --text-soft:#dbe6f6; --accent-text:#ffd2ad; --line:rgba(255,255,255,.4);
  position: relative; isolation: isolate; overflow: hidden; background: var(--table); color: var(--text);
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: start;
  padding: 9.5rem max(1.6rem, calc((100% - 72rem) / 2 + 1.6rem)) 0; }
.pt-hero > :not(.pt-court) { position: relative; z-index: 2; }
.pt-court { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.pt-court i { position: absolute; display: block; background: #fff; }
.pt-edge { inset: 12px; background: transparent !important; border: 3px solid #fff; border-radius: 4px; }
.pt-mid { left: 50%; top: calc(var(--net, 68%) - 9rem); bottom: 12px; width: 2px; margin-left: -1px; opacity: .6;
  -webkit-mask-image: linear-gradient(transparent, #000 9rem); mask-image: linear-gradient(transparent, #000 9rem); }
.pt-net { left: 0; right: 0; top: var(--net, 68%); height: 14px; margin-top: -7px; opacity: .95;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.95) 0 2px, rgba(255,255,255,.35) 2px 7px) !important;
  border-block: 3px solid #fff; box-shadow: 0 10px 0 rgba(0,0,0,.12); }
.pt-ball { position: absolute; z-index: 3; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ball); box-shadow: 0 0 0 3px #fff3e6 inset, 6px 10px 0 rgba(0,0,0,.14);
  top: var(--net, 68%); margin-top: -11px; transform: translate(80vw, -5rem); }

.pt-hero .eyebrow { color: #fff; justify-self: start; }
.pt-hero h1 { color: #fff; font-size: clamp(3rem, 12.6vw, 8.2rem); max-width: 11ch; margin: 1.2rem 0 1.4rem; }
.pt-hero .rl-lede { color: var(--text-soft); font-size: var(--step-1); line-height: 1.4; max-width: 34ch; margin: 0; }
.rl-cta, .rl-cta .launch-live, .rl-cta .launch-prelaunch { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.2rem; }
.rl-cta { margin-top: 2rem; }
body .pt-hero .btn.primary { background: var(--ball); border-color: var(--ball); color: #1a0d03; }
.rl-coming { color: var(--text-soft); font-weight: 600; }
.rl-store { display: inline-flex; align-items: center; gap: .7rem; min-height: 52px; padding: .55rem 1.1rem;
  border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; transition: transform .2s; }
.rl-store:hover { transform: translateY(-2px); }
.rl-store small { display: block; font-size: 10px; font-weight: 500; line-height: 1.15; }
.rl-store b { display: block; font-size: 16px; font-weight: 700; line-height: 1.15; }
.rl-note { color: var(--text-soft); font-size: var(--step--1); margin: 1.4rem 0 0; max-width: 46ch; }
body .pt-hero .app-langs { margin-top: 1.2rem; }
body .pt-hero .app-langs-lead { color: #fff; }
body .pt-hero .app-langs-note { color: var(--text-soft); }
.pt-hero .pt-hero-phone { justify-self: center; margin: 3rem 0 0; padding: 0; height: 25rem; overflow: hidden; background: none; border-radius: 0; }
.pt-hero .pt-hero-phone::before, .pt-hero .pt-hero-phone::after { content: none; }
.pt-hero .pt-hero-phone .device.dv-iphone { --dv-scale: .6; --rot: 0deg; filter: drop-shadow(0 30px 40px rgba(4, 20, 48, .45)); }
.pt-hero { --net: calc(100% - 14rem); }

@media (min-width: 900px) {
  .pt-hero { grid-template-columns: minmax(0, 1fr) 24rem; column-gap: 5rem; padding-top: 9rem; padding-bottom: 4rem; }
  .pt-hero > :not(.pt-court):not(.pt-hero-phone) { grid-column: 1; }
  .pt-hero .pt-hero-phone { grid-column: 2; grid-row: 1 / span 9; align-self: start; height: auto; margin: 1rem 0 4rem; overflow: visible; }
  .pt-hero .pt-hero-phone .device.dv-iphone { --dv-scale: .74; --rot: 3deg; }
  .pt-hero h1 { font-size: clamp(3.6rem, 6.1vw, 6.6rem); }
  .pt-hero .pt-mid { left: auto; right: 12px; top: 50%; bottom: auto; width: auto; height: 2px; left: 12px; }
  .pt-hero .pt-net { top: 12px; bottom: 12px; left: calc(100% - max(1.6rem, (100% - 72rem) / 2 + 1.6rem) - 29rem); right: auto;
    width: 14px; height: auto; margin: 0; border-block: 0; border-inline: 3px solid #fff;
    background: repeating-linear-gradient(0deg, rgba(255,255,255,.95) 0 2px, rgba(255,255,255,.35) 2px 7px) !important;
    box-shadow: 10px 0 0 rgba(0,0,0,.12); }
  .pt-ball { display: none; }
  .pt-hero .pt-mid { -webkit-mask-image: none; mask-image: none; opacity: .5; }
}

/* the ball crosses the net and back, bouncing once on each half */
@media (prefers-reduced-motion: no-preference) {
  .pt-ball { animation: pt-rally 3.2s cubic-bezier(.45, 0, .55, 1) infinite; }
  @keyframes pt-rally {
    0%   { transform: translate(6vw, 7rem) scale(1); }
    25%  { transform: translate(40vw, -3rem) scale(1.4); }
    50%  { transform: translate(86vw, -9rem) scale(1); }
    75%  { transform: translate(52vw, 1rem) scale(1.4); }
    100% { transform: translate(6vw, 7rem) scale(1); }
  }
  .pt-hero > :not(.pt-court):not(.pt-hero-phone) { animation: pt-rise .8s cubic-bezier(.2, .8, .2, 1) both; }
  .pt-hero h1 { animation-delay: .06s !important; }
  .pt-hero-phone { animation: pt-up 1s .15s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes pt-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes pt-up { from { opacity: 0; transform: translateY(70px); } to { opacity: 1; transform: none; } }
}

/* ============================================================================
   2. the strip: a match, rally by rally
   ============================================================================ */
.pt-strip { background: var(--ink); padding: .9rem 0; overflow: hidden; }
.pt-strip-run { display: flex; gap: 6px; width: max-content; }
.pt-strip-run i { display: block; height: 2.4rem; border-radius: 4px; background: var(--won); }
.pt-strip-run i.lost { background: var(--ball); }
@media (prefers-reduced-motion: no-preference) {
  .pt-strip-run { animation: pt-run 38s linear infinite; }
  @keyframes pt-run { to { transform: translateX(-50%); } }
}

/* ============================================================================
   3. three steps: stacked cards in table blue, ball orange and ink
   ============================================================================ */
.rl-steps { width: min(100% - 2.5rem, 72rem); margin: clamp(3.5rem, 8vw, 6rem) auto 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.rl-step { position: relative; display: grid; align-content: start; gap: .8rem; min-height: 21rem;
  padding: 1.8rem 1.6rem; border-radius: 18px; background: var(--table); color: #fff; overflow: hidden; }
.rl-step:nth-child(2) { background: var(--ball); color: var(--ink); }
.rl-step:nth-child(3) { background: var(--ink); color: #fff; }
[data-theme="dark"] .rl-step:nth-child(3) { background: #1b3048; }
.rl-step h3 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1; letter-spacing: -.035em; margin-top: auto; }
.rl-step p { margin: 0; font-size: var(--step-0); line-height: 1.5; opacity: .9; }
.pt-step-ic { width: 4.5rem; height: 4.5rem; fill: none; stroke: currentColor; stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round; margin-bottom: 3rem; }
.rl-step:nth-child(2) .pt-step-ic circle { fill: currentColor; }

/* ============================================================================
   4. reading sections: oversized headline, the phone standing on a coloured panel
   ============================================================================ */
.rl-section { width: min(100% - 2.5rem, 72rem); margin-inline: auto; padding-top: clamp(4.5rem, 10vw, 8rem); }
.rl-section h2 { font-size: clamp(2.5rem, 9.5vw, 5.4rem); max-width: 14ch; margin: 1rem 0 1.5rem; }
.rl-section > p { color: var(--text-soft); font-size: var(--step-0); line-height: 1.6; max-width: 40rem; margin: 0 0 1rem; }
.rl-section .eyebrow { color: var(--text); }
.rl-figure { --panel: var(--table); position: relative; display: grid; justify-items: center; margin: 2.2rem 0 0;
  padding-top: 2.6rem; height: 26rem; overflow: hidden; border-radius: 22px; background: var(--panel); }
.rl-figure::before { content: ""; position: absolute; inset: 10px; border: 2px solid rgba(255,255,255,.55); border-radius: 14px; pointer-events: none; }
.rl-figure::after { content: ""; position: absolute; left: 50%; top: 10px; bottom: 10px; width: 2px; margin-left: -1px; background: rgba(255,255,255,.35); }
.rl-figure .device { position: relative; z-index: 1; --rot: 0deg; filter: drop-shadow(0 24px 30px rgba(4, 20, 48, .35)); }
.rl-figure .device.dv-iphone { --dv-scale: .6; }
.rl-figure .device.dv-ipad { --dv-scale: .52; }
#label .rl-figure { --panel: var(--ball); }
#practice .rl-figure { --panel: var(--accent); }
#devices .rl-figure { --panel: var(--ink); height: auto; padding-bottom: 2.6rem; }
[data-theme="dark"] #devices .rl-figure { --panel: #1b3048; }
.rl-limit { margin: 1.6rem 0 0; padding: 1.2rem 1.4rem; border-radius: 12px; max-width: 40rem;
  background: var(--orange-soft); color: var(--on-orange-soft); line-height: 1.55; }
.rl-limit b { display: block; margin-bottom: .3rem; }

/* the evidence: a table-blue band with the scoreboard */
#evidence { --band: var(--table); background: var(--band); --text:#ffffff; --text-soft:#dbe6f6; color: var(--text);
  width: auto; margin-top: clamp(4.5rem, 10vw, 8rem); padding: clamp(4rem, 9vw, 7rem) max(1.25rem, calc((100% - 72rem) / 2)) clamp(4rem, 9vw, 7rem); }
#evidence .rl-figure { --panel: var(--table-deep); }
.pt-board { display: block; width: min(100%, 30rem); height: auto; margin: 2rem 0 0; }
.pb-frame { fill: var(--ink); }
.pb-card rect { fill: #13263b; }
.pb-card path { stroke: var(--ink); stroke-width: 4; }
.pb-card text { font: 900 150px/1 var(--sans); letter-spacing: -.04em; fill: var(--ball); }
.pb-dim text { fill: #ffffff; }
.pb-dot { fill: #ffffff; opacity: .7; }
.rl-count { display: grid; gap: .35rem; margin: 1.2rem 0 1.6rem; max-width: 40rem; }
.rl-count b { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 850; letter-spacing: -.03em; line-height: 1.1; }
.rl-count span { color: var(--text-soft); font-size: var(--step--1); }

/* your data: an ink band */
#privacy { --band: var(--ink); background: var(--band); --text:#ffffff; --text-soft:#c3cfdc; color: var(--text);
  width: auto; margin-top: clamp(4.5rem, 10vw, 8rem); padding: clamp(4rem, 9vw, 7rem) max(1.25rem, calc((100% - 72rem) / 2)); }
[data-theme="dark"] #privacy { --band: #050d16; }
#privacy h2, #privacy > p { margin-inline: 0; }

@media (min-width: 900px) {
  .rl-section:not(#privacy) { display: grid; grid-template-columns: minmax(0, 1fr) 24rem; column-gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
  .rl-section:not(#privacy) > * { grid-column: 1; }
  .rl-section > .rl-figure { grid-column: 2 !important; grid-row: 1 / span 9; margin: 0; height: 32rem; align-self: start; position: sticky; top: 2rem; }
  .rl-section .rl-figure .device.dv-iphone { --dv-scale: .7; }
  #devices { grid-template-columns: minmax(0, 1fr) 34rem; }
  #devices .rl-figure { height: auto; }
  #devices .rl-figure .device.dv-ipad { --dv-scale: .7; }
  #evidence { grid-template-columns: minmax(0, 1fr) 24rem; }
}

/* ---- questions: rules, no boxes ---- */
body .faq { width: min(100% - 2.5rem, 52rem); max-width: none; margin: 0 auto; padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5rem); }
body .faq h2 { font-size: clamp(2.5rem, 9.5vw, 5.4rem); margin-bottom: 2rem; }
body .faq details { border: 0; border-top: 2px solid var(--text); border-radius: 0; background: transparent; padding: 1.3rem 0; margin: 0; }
body .faq details:last-of-type { border-bottom: 2px solid var(--text); }
body .faq summary { font-size: var(--step-1); line-height: 1.25; font-weight: 750; letter-spacing: -.015em; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
body .faq summary::after { content: "+"; float: none; flex: 0 0 auto; display: grid; place-items: center; width: 2rem; height: 2rem;
  border-radius: 50%; background: var(--ball); color: #1a0d03; font-size: 1.2rem; line-height: 1; }
body .faq details[open] summary::after { content: "–"; }
body .faq details p { color: var(--text-soft); line-height: 1.6; max-width: 44rem; }
.faq a, .rl-section a { color: var(--accent-text); }
#privacy a, #evidence a { color: #ffd2ad; }

/* ---- close: the ball-orange field ---- */
[data-theme="dark"] #privacy, #privacy { background: var(--band); }
.rl-close { --band: var(--ball); background: var(--band); color: var(--ink); display: grid; justify-items: start; gap: 2rem;
  padding: clamp(4.5rem, 11vw, 8rem) max(1.25rem, calc((100% - 72rem) / 2)); }
.rl-close h2 { font-size: clamp(2.8rem, 11vw, 7rem); max-width: 12ch; margin: 0; color: var(--ink); }
body .rl-close .btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---- how it is made, footer ---- */
#how-its-made { padding-block: clamp(3.5rem, 8vw, 5rem); }
#how-its-made .eyebrow { color: var(--text); }
body footer { margin-top: 0; background: var(--ink); color: #c3cfdc; border-top: 0; }
body footer strong { color: #fff; }
body footer a { color: #c3cfdc; }
body footer a:hover { color: #fff; }

/* ---- CJK line breaking ----
   Japanese and Chinese have no spaces, so keep-all would forbid every break and push a heading
   off the screen: they break per character (strict kinsoku), and Japanese per phrase where the
   browser supports auto-phrase. Korean does use spaces between words, so keep-all keeps each
   word whole there. CJK headlines get more room: a 11ch measure is far too narrow for them. */
:lang(ja), :lang(zh) { line-break: strict; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .rl-lede { word-break: auto-phrase; }
:lang(ja) .pt-hero h1, :lang(zh) .pt-hero h1, :lang(ko) .pt-hero h1 { max-width: 9em; font-size: clamp(2.5rem, 10vw, 6rem); line-height: 1.1; letter-spacing: -.01em; }
:lang(ja) h2, :lang(zh) h2, :lang(ko) h2 { line-height: 1.12; letter-spacing: -.01em; max-width: 12em; }
:lang(ja) .rl-lede, :lang(zh) .rl-lede { max-width: 30em; }
:lang(ko) p, :lang(ko) h1, :lang(ko) h2, :lang(ko) h3, :lang(ko) summary { word-break: keep-all; }
/* long compound words (de, nl) must wrap inside the huge headlines */
h1, h2, h3 { overflow-wrap: break-word; }

/* ---- responsive ----
   No hamburger: the shared header (.nav) wraps its links onto a second row below 860px. */
@media (max-width: 860px) {
  .nav nav:not([data-language-picker]) { flex: 1 0 100%; margin-left: 0; gap: 1rem 1.1rem; }
}
@media (max-width: 899px) {
  .rl-steps { grid-template-columns: minmax(0, 1fr); }
  .rl-step { position: sticky; top: calc(1rem + var(--n, 0) * .9rem); min-height: 19rem; box-shadow: 0 -12px 30px -18px rgba(12, 26, 43, .5); }
  .rl-step:nth-child(2) { --n: 1; }
  .rl-step:nth-child(3) { --n: 2; }
  .pt-step-ic { margin-bottom: 2rem; }
}
@media (max-width: 440px) {
  /* "Datenschutz Nutzungsbedingungen Rechtliches" is wider than a 320px column. */
  footer .links { flex-wrap: wrap; gap: .4rem 1.2rem; }
  .rl-figure .device.dv-iphone, .pt-hero-phone .device.dv-iphone { --dv-scale: .56; }
  .rl-figure .device.dv-ipad { --dv-scale: .44; }
  .pt-hero { padding-top: 10.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rl-store { transition: none; }
  .pt-strip-run { overflow-x: auto; }
}

/* ---- launch swap (build.mjs resolves data-launch from app.toml [store]) ----
   Last in the file and body-scoped, so no layout rule above (.rl-cta .launch-live, .rl-store)
   can show a store badge before that store is live. */
body [data-launch="prelaunch"] .launch-live { display: none; }
body [data-launch="live"] .launch-prelaunch { display: none; }
body [data-store-badge="prelaunch"], body [data-store-badge="absent"] { display: none; }
