/* Opmaak van bankyapp.nl (homepage + 404). Kleuren = tokens uit src/constants/theme.ts, licht + donker. */
/* Kleurtokens: zelfde waarden als de app (light + dark). Geen losse kleuren verderop. */
:root {
  --bg: #FFFFFF; --surface: #EEF4EE; --border: #DDE8DE; --text: #14211B; --muted: #5A6B5E;
  --primary: #2E7D32; --on-primary: #FFFFFF;
  /* De groene kopbalk blijft in beide standen bosgroen met witte tekst, net als de winkelafbeelding. */
  --hero-from: #2E7D32; --hero-to: #245F27; --on-hero: #FFFFFF; --path: #E8E2C8;
  /* Pad in het rust-tafereel: zelfde kleuren als PATH_COLORS in src/components/ui/pixel-refresh.tsx */
  --rest-path: #E4E6DB; --rest-edge: #A9AE9F; --xp-off: #DDE8DE;
  --radius: 16px; --ease: 0.2s ease;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0F0C; --surface: #1B241E; --border: #28332B; --text: #F2F6F3; --muted: #A8B4AB;
    --primary: #5CC177; --on-primary: #0B0F0C;
    --rest-path: #1E251F; --rest-edge: #39433B; --xp-off: #28332B;
  }
}

/* Basis: systeemlettertype (zoals de app), 16px tekst, ruime regelafstand */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--primary); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
/* Alleen voor schermlezers (bijv. de volledige taalnaam bij NL/EN/DE) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--bg); padding: 8px 12px; }

/* Kopbalk: groen vlak met titel, korte uitleg, knop en de pixelart-scène onderaan */
.hero { background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%); color: var(--on-hero); }
.hero .wrap { display: grid; gap: 24px; padding-top: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--on-hero);
         text-decoration: none; width: fit-content; }
.brand svg { flex: none; }
.hero h1 { margin: 16px 0 0; font-size: clamp(36px, 8vw, 52px); line-height: 1.05; letter-spacing: -1px;
           font-weight: 800; text-wrap: balance; }
.hero p.lead { margin: 16px 0 0; font-size: 18px; max-width: 34em; opacity: .95; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 24px; }

/* Bovenrand van de kopbalk: logo links, taalkeuze rechts */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.langs { display: flex; gap: 4px; font-size: 14px; font-weight: 700; }
.langs a { color: var(--on-hero); text-decoration: none; padding: 10px 8px; min-width: 44px; text-align: center;
           border-radius: 8px; transition: background-color var(--ease); }
/* Volle witte tekst (contrast 5,1); de gekozen taal is onderstreept, dus niet alleen aan kleur te herkennen */
.langs a:hover { background: rgba(255, 255, 255, .12); }
.langs a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.langs a:focus-visible, .hero .btn:focus-visible { outline-color: #FFFFFF; }

/* Winkelknoppen (officiële afbeeldingen van Apple en Google, niet aanpassen): even hoog, naast elkaar.
   Zonder winkellink staan ze er als plaatje met "Binnenkort" erboven (website/strings.mjs → STORE_LINKS). */
.stores { margin-top: 24px; }
.stores__soon { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .3px; margin-bottom: 10px;
                padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .22); } /* donkerder vlak: contrast 7,4 */
.stores__row { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; border-radius: 9px; transition: transform var(--ease), opacity var(--ease); }
.store img { display: block; height: 48px; width: auto; }
a.store:hover { opacity: .9; }
a.store:active { transform: scale(.97); }
a.store:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; }

/* Knoppen: minimaal 48px hoog, subtiele overgang bij hover en indrukken */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
       padding: 0 22px; border-radius: 999px; font-weight: 700; text-decoration: none; cursor: pointer;
       transition: transform var(--ease), opacity var(--ease), background-color var(--ease); }
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.97); }
.btn--light { background: #FFFFFF; color: #2E7D32; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--outline { background: transparent; color: var(--on-hero); border: 2px solid rgba(255, 255, 255, .85); }
.btn--outline:hover { opacity: 1; background: rgba(255, 255, 255, .12); }

/* Pixelart-scène: hond en wandelaar lopen naar het bankje onder de boom, zoals op de winkelafbeelding.
   Alles schaalt mee met de breedte (posities in %), harde pixelranden blijven scherp. */
.scene { position: relative; width: 100%; max-width: 560px; aspect-ratio: 560 / 290; justify-self: center; }
.scene img { position: absolute; bottom: 11%; height: auto; image-rendering: pixelated; }
.scene .path { position: absolute; left: -100vw; right: -100vw; bottom: 0; height: 11%; background: var(--path); }
.scene .tree { right: 0; width: 39.5%; }
.scene .walker { left: 19%; width: 28%; }
.scene .dog { left: 1%; width: 19.3%; }
/* Bankje = het logo-bankje van het app-icoon (vaste regel PO): rechte plank die aan beide kanten een pootbreedte
   uitsteekt over twee poten; verhouding als icon.png (plank 636 x 57, poten 58 x 116, 58 naar binnen). */
.scene .bench { position: absolute; left: 48%; bottom: 11%; width: 23%; aspect-ratio: 130 / 36; }
.scene .bench i { position: absolute; background: #FFFFFF; }
.scene .bench .plank { left: 0; right: 0; top: 0; height: 33.33%; }
.scene .bench .leg { top: 33.33%; bottom: 0; width: 9.23%; }
.scene .bench .leg--l { left: 9.23%; }
.scene .bench .leg--r { right: 9.23%; }
.hero { overflow: hidden; }

/* Secties: ruime witruimte; "tinted" = licht groen vlak om secties van elkaar te scheiden */
section { padding: 56px 0; }
section.tinted { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2 { font-size: 28px; line-height: 1.2; margin: 0 0 24px; text-wrap: balance; }
.intro { color: var(--muted); margin: 0 0 32px; max-width: 36em; }

/* Zo werkt het: drie genummerde stappen, onder elkaar op de telefoon, naast elkaar vanaf een tablet */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step h3 { font-size: 18px; margin: 12px 0 4px; }
.step p { margin: 0; color: var(--muted); }
.num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-weight: 800;
       background: var(--primary); color: var(--on-primary); }

/* Kenmerken: 1 kolom op de telefoon, 2 op een tablet, 4 op een groot scherm */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feature h3 { font-size: 18px; margin: 12px 0 4px; }
.feature p { margin: 0; color: var(--muted); }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
        background: var(--primary); color: var(--on-primary); }

/* Spelelement: kop, tafereel en vier onderdelen. Op een groot scherm tafereel links, onderdelen rechts. */
.game { display: grid; gap: 24px; }
.game__head .intro { margin-bottom: 0; }
.game h2 { margin-bottom: 8px; }
@media (min-width: 860px) {
  .game { grid-template-columns: 1fr 1fr; column-gap: 48px; align-items: start; }
  .game__head { grid-column: 1 / -1; }
}

/* Rust-tafereel: twee wandelaars en een hond op het Banky-bankje onder de linde, zoals op het profiel in de app
   (src/components/profile-bench-scene.tsx). Maten komen uit dat tafereel (in "pt": boom 74 breed, bankje 64,
   figuren = pixelmaat / 4,5) en staan hier als percentage van een vlak van 180 × 107 pt, zodat alles meeschaalt. */
.rest { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rest__scene { position: relative; aspect-ratio: 180 / 107; max-width: 460px; margin: 0 auto; }
.rest__scene img { position: absolute; height: auto; image-rendering: pixelated; }
.rest__path { position: absolute; left: -50%; right: -50%; bottom: 0; height: 6.54%; background: var(--rest-path);
              border-top: 1px solid var(--rest-edge); }
.rest .rest__tree { left: 2.5%; bottom: 5.61%; width: 41.11%; }
.rest__bench { position: absolute; left: 49.17%; bottom: 6.54%; width: 35.56%; height: 15.89%; }
.rest__bench i { position: absolute; background: var(--primary); }
.rest__bench .plank { left: 0; right: 0; top: 0; height: 35.3%; }
.rest__bench .leg { top: 35.3%; bottom: 0; width: 9.375%; }
.rest__bench .leg--l { left: 9.375%; }
.rest__bench .leg--r { right: 9.375%; }
.rest .rest__man { left: 48.3%; bottom: 9.35%; width: 18.89%; }
.rest .rest__woman { left: 68.6%; bottom: 9.35%; width: 17.9%; }
/* De hond kijkt naar de wandelaars (gespiegeld), zoals in de app */
.rest .rest__dog { left: 85.8%; bottom: 5.61%; width: 12.72%; transform: scaleX(-1); }

/* XP-balk als losse blokjes, zoals in de app (ProgressBar blocks). Alleen ter illustratie. */
.xp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 16px;
      border-top: 1px solid var(--border); background: var(--bg); font-size: 14px; }
.xp__bar { display: flex; gap: 3px; flex: 1 1 120px; }
.xp__bar i { flex: 1; height: 10px; border-radius: 2px; background: var(--xp-off); }
.xp__bar i.on { background: var(--primary); }
.xp__togo { color: var(--muted); }

.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.perks li { display: flex; gap: 16px; align-items: flex-start; }
.perks .icon { flex: none; }
.perks h3 { font-size: 18px; margin: 0 0 2px; }
.perks p { margin: 0; color: var(--muted); }

/* Veelgestelde vragen: uitklapbare regels met een plusje dat een kruisje wordt */
.faq { max-width: 720px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px;
               padding: 12px 0; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 24px; line-height: 1; color: var(--primary);
                      transition: transform var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.faq details p { margin: 0 0 16px; color: var(--muted); max-width: 36em; }

/* Blok "Plan een wandeling": verwijst naar de wandelen-site */
.plan { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.plan .wrap { display: grid; gap: 16px; }
.plan h2 { margin: 0; }
.plan p { margin: 0; color: var(--muted); max-width: 36em; }

/* Voettekst: links naar de verplichte pagina's en contact */
footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 12px; }
footer nav a { display: inline-block; padding: 6px 0; }
footer p { margin: 0 0 4px; }

@media (min-width: 768px) {
  .hero .wrap { grid-template-columns: 1fr 1fr; align-items: end; padding-top: 32px; }
  .hero .text { padding-bottom: 64px; align-self: center; }
  .brand, .topbar { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .btn, .store, .langs a, .faq summary::after { transition: none; } }
