/*
 * Sports Timer - website
 *
 * Alles staat in dit ene bestand en er wordt niets van buitenaf geladen: geen
 * fonts, geen CDN, geen scripts. Zo werkt de site op elke host (GitHub Pages,
 * een gewone map op een webserver) en ook gewoon vanaf schijf.
 *
 * De kleuren van de blokmodi zijn niet verzonnen maar overgenomen uit
 * assets/help.htm, zodat de site en de app hetzelfde zeggen.
 */

:root {
    --bg:        #0b0b0c;
    --bg-raised: #17181a;
    --bg-sunken: #050506;
    --line:      #2a2c30;
    --text:      #e8e9ea;
    --text-dim:  #9ba0a6;
    --accent:    #4da3ff;

    /* Blokmodi - exact de kleuren uit help.htm */
    --mode-action:    #ffffff;
    --mode-rest:      #ffff00;
    --mode-stopwatch: #ff8c00;
    --mode-clock:     #ff40ff;
    --mode-laps:      #ff0000;

    --radius: 12px;
    --maxw:   1060px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
}

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

/* ---------- kop en navigatie ---------- */

header.site {
    border-bottom: 1px solid var(--line);
    background: var(--bg-sunken);
    position: sticky;
    top: 0;
    z-index: 10;
}

header.site .wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--text);
    margin-right: auto;
}

.brand img {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: block;
}

nav.site a {
    color: var(--text-dim);
    text-decoration: none;
    margin-left: 22px;
    font-size: 0.95rem;
    white-space: nowrap;
}

nav.site a:hover { color: var(--text); }
nav.site a.current { color: var(--accent); }

/* Op een smal scherm gaat de navigatie onder de naam staan in plaats van
   te verspringen; de marge links moet dan weg. */
@media (max-width: 640px) {
    header.site .wrap { padding-bottom: 8px; }
    nav.site { width: 100%; margin-top: 4px; }
    nav.site a { margin: 0 20px 6px 0; display: inline-block; }
}

/* ---------- tekst ---------- */

h1, h2, h3 {
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.6rem; margin-top: 2.2em; }
h3 { font-size: 1.15rem; margin-top: 1.8em; }

p, ul, ol { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

a { color: var(--accent); }

main { padding: 44px 0 20px; }

.lead {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 62ch;
}

.muted { color: var(--text-dim); }
.small { font-size: 0.92rem; }

code {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 0.9em;
}

/* ---------- hero ---------- */

.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
    padding: 20px 0 10px;
}

.hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    display: block;
    margin-bottom: 20px;
}

.hero h1 { font-size: 3rem; }

.hero-shot {
    justify-self: center;
    max-width: 270px;
    width: 100%;
}

@media (max-width: 780px) {
    .hero { grid-template-columns: 1fr; gap: 28px; }
    .hero h1 { font-size: 2.3rem; }
    .hero-shot { max-width: 220px; }
}

/* ---------- knoppen ---------- */

.btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;   /* anders rekken de knoppen mee met de Play-badge */
    gap: 12px;
    margin: 26px 0 0;
}

.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.98rem;
    border: 1px solid var(--line);
    color: var(--text);
    background: var(--bg-raised);
}

.btn:hover { border-color: #444851; }

.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #07131f;
}

.btn.primary:hover { background: #6bb3ff; border-color: #6bb3ff; }

/* ---------- kaarten ---------- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin: 26px 0 10px;
}

.card {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}

.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p  { margin: 0; color: var(--text-dim); font-size: 0.96rem; }

/* ---------- schermafdrukken ---------- */

figure {
    margin: 0;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
}

figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

figcaption {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 10px;
}

.shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin: 26px 0;
}

.shot-wide { margin: 26px 0; }

/* Een staande schermafdruk op volle breedte wordt een meter hoog. Deze blijft
   op telefoonformaat en staat gecentreerd. */
.shot-tall {
    margin: 26px auto;
    max-width: 300px;
}

/* Tekeningen uit de help van de app. Die zijn 485 px breed; verder oprekken
   maakt ze wazig, dus daar houdt het op. */
.shot-ui {
    margin: 18px 0 4px;
    max-width: 515px;
}

/* ---------- blokmodi ---------- */

.modes { margin: 22px 0; }

.mode {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 16px;
    padding: 13px 0;
    border-top: 1px solid var(--line);
    align-items: baseline;
}

.mode:last-child { border-bottom: 1px solid var(--line); }

.mode b { font-size: 1.02rem; }
.mode span { color: var(--text-dim); }

.m-action    { color: var(--mode-action); }
.m-rest      { color: var(--mode-rest); }
.m-stopwatch { color: var(--mode-stopwatch); }
.m-clock     { color: var(--mode-clock); }
.m-laps      { color: var(--mode-laps); }

@media (max-width: 560px) {
    .mode { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- stappen ---------- */

ol.steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

ol.steps > li {
    counter-increment: step;
    position: relative;
    padding: 0 0 4px 52px;
    margin-bottom: 26px;
}

ol.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

ol.steps > li h3 { margin: 4px 0 8px; }

/* ---------- tabel ---------- */

.table-scroll { overflow-x: auto; margin: 20px 0; }

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 460px;
    font-size: 0.96rem;
}

th, td {
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th { color: var(--text-dim); font-weight: 600; }

/* ---------- attentieblok ---------- */

.note {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 22px 0;
}

.note p:last-child { margin-bottom: 0; }

/* ---------- Play-badge ---------- */

/* De officiele badge van Google, ongewijzigd overgenomen zoals hun
   merkrichtlijnen eisen. Alleen de weergavegrootte is gezet; niet bijsnijden,
   niet inkleuren, geen eigen namaak ervan maken. */
.play-badge {
    display: inline-block;
    line-height: 0;
}

.play-badge img {
    width: 194px;
    height: auto;
    display: block;
}

/* ---------- changelog ---------- */

.release { margin-bottom: 10px; }

.release h2 {
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

ul.changes { list-style: none; padding-left: 0; }

ul.changes li {
    margin-bottom: 0.7em;
    padding-left: 0;
}

.tag {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 5px;
    margin-right: 9px;
    vertical-align: 1px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    color: var(--text-dim);
    white-space: nowrap;
}

.tag-new         { color: #7ee08a; border-color: #2f5c37; }
.tag-bugfix      { color: #ff9a8b; border-color: #6b3630; }
.tag-improvement { color: #8cc4ff; border-color: #2f4f73; }
.tag-info        { color: #e2c46b; border-color: #6b5a2a; }

.badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--accent);
    color: #07131f;
    border-radius: 20px;
    padding: 3px 11px;
    vertical-align: 5px;
    margin-left: 10px;
}

/* ---------- voettekst ---------- */

footer.site {
    border-top: 1px solid var(--line);
    margin-top: 60px;
    padding: 30px 0 50px;
    color: var(--text-dim);
    font-size: 0.92rem;
}

footer.site a { color: var(--text-dim); }
footer.site a:hover { color: var(--text); }

footer.site nav a { margin-right: 18px; display: inline-block; margin-bottom: 6px; }

.footer-note { margin-top: 14px; }
