/*
 * Salux — "Zacht daglicht", op het web.
 *
 * Eén bron voor de website, met exact de tokens die de app gebruikt:
 * frontend/salux_app/lib/utils/app_colors.dart (kleuren),
 * app_dimens.dart (spacing, radii, schaduw) en app_typography.dart (type).
 *
 * Een waarde hier verzinnen in plaats van overnemen is hoe de site en de app
 * uit elkaar gaan lopen — verander eerst het token in de app.
 */

/* ===========================================================================
   Tokens
   =========================================================================== */

:root {
    /* Vlakken */
    --canvas: #F6F4F1;
    --surface: #FFFFFF;
    --sunken: #F1EEE9;

    /* Randen */
    --line: #EDE9E3;
    --stroke: #E3DED6;

    /* Inkt */
    --ink: #23211E;
    --ink-muted: #6E6A64;
    --ink-faint: #8A857D;
    --on-dark: #FFFFFF;

    /* Merk — een pastel is een vlak, een inkt is een teken daarop */
    --mint: #B8F2D4;
    --mint-tint: #DFF5EA;
    --mint-ink: #186347;
    --coral: #FF7F7F;
    --coral-tint: #FFE8E8;
    --coral-ink: #A33232;
    --blue: #B8E0F2;
    --blue-tint: #E8F1F7;
    --blue-ink: #1F6A8C;

    /* Tekst rechtstreeks op een pastel */
    --on-mint: #14372A;
    --on-coral: #2B1010;
    --on-blue: #10333F;

    /* De primaire actie: opslaan, toevoegen, bevestigen */
    --accent: var(--blue-ink);
    --on-accent: #FFFFFF;

    /* Radii — vier waarden, geen andere */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 999px;

    /* Lift — schaduw of een rand, nooit allebei */
    --shadow-card: 0 1px 2px rgba(35, 33, 30, 0.05), 0 10px 26px rgba(35, 33, 30, 0.055);
    --shadow-float: 0 2px 10px rgba(35, 33, 30, 0.05);

    /* Ruimte, op hetzelfde 2px-raster als de app */
    --space-xxs: 4px;
    --space-xs: 6px;
    --space-sm: 8px;
    --space-smd: 10px;
    --space-md: 12px;
    --space-mdl: 14px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-xxl: 24px;

    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===========================================================================
   Basis
   =========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-weight: 500;
    background: var(--canvas);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* De typeschaal van de app, opgerekt naar leesafstand op een scherm.
   Hiërarchie komt van gewicht en grootte, niet van een tweede letter. */

h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.4px;
    line-height: 1.15;
    color: var(--ink);
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.1rem, 1.35rem + 2.6vw, 3.25rem);
    letter-spacing: -1.2px;
}

h2 {
    font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.35rem);
    letter-spacing: -0.8px;
}

h3 {
    font-size: 1.25rem;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

p {
    text-wrap: pretty;
}

a {
    color: var(--blue-ink);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--ink);
}

img {
    max-width: 100%;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--space-xxl);
}

.container--narrow {
    max-width: 720px;
}

/* Een sectiekop: bovenschrift in kapitalen, dan de kop, dan één regel uitleg. */

.eyebrow {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: var(--space-md);
}

.section-lead {
    font-size: 1.0625rem;
    color: var(--ink-muted);
    max-width: 52ch;
}

.section-head {
    margin-bottom: 48px;
}

.section-head--center {
    text-align: center;
}

.section-head--center .section-lead {
    margin-left: auto;
    margin-right: auto;
}

/* ===========================================================================
   Kaarten
   =========================================================================== */

.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: var(--space-xxl);
}

/* Een icoontegel: pastel als vlak, de bijbehorende inkt als teken. */
.icon-tile {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.icon-tile--mint { background: var(--mint-tint); color: var(--mint-ink); }
.icon-tile--coral { background: var(--coral-tint); color: var(--coral-ink); }
.icon-tile--blue { background: var(--blue-tint); color: var(--blue-ink); }

.icon-tile svg {
    width: 22px;
    height: 22px;
}

/* ===========================================================================
   Knoppen — 12px radius, precies één primaire per scherm
   =========================================================================== */

.btn {
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    padding: 0 var(--space-xl);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-smd);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn--primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn--primary:hover:not(:disabled) {
    background: #185674;
    color: var(--on-accent);
}

.btn--primary:disabled {
    background: var(--sunken);
    color: #847F77;
    cursor: not-allowed;
}

/* De destructieve actie: een koraalvlak met de koraalinkt erop — nooit een
   tweede gevulde knop naast de primaire. */
.btn--danger {
    background: var(--coral-tint);
    color: var(--coral-ink);
}

.btn--danger:hover:not(:disabled) {
    background: #FBDADA;
    color: var(--coral-ink);
}

.btn--danger:disabled {
    background: var(--sunken);
    color: #847F77;
    cursor: not-allowed;
}

.btn--ghost {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--stroke);
}

.btn--ghost:hover {
    background: var(--sunken);
    color: var(--ink);
}

.btn:focus-visible,
.lang-btn:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===========================================================================
   Navigatie — de kop rijdt op het canvas, net als in de app
   =========================================================================== */

.site-nav {
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    min-height: 72px;
}

.site-nav .logo {
    height: 64px;
    width: auto;
    display: block;
}

.logo-link {
    display: inline-flex;
    text-decoration: none;
}

.lang-switch {
    display: flex;
    gap: var(--space-sm);
}

.lang-btn {
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--ink-muted);
    background: transparent;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.lang-btn:hover:not(.active) {
    color: var(--ink);
    border-color: var(--ink-faint);
}

.lang-btn.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--on-dark);
}

/* ===========================================================================
   Voet
   =========================================================================== */

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 40px 0;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.site-footer p,
.site-footer a {
    font-size: 0.875rem;
    color: var(--ink-muted);
}

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

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

/* ===========================================================================
   Taalwissel: toon alleen de actieve taal
   =========================================================================== */

[lang]:not([lang="nl"]) .nl-only,
[lang]:not([lang="en"]) .en-only {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (max-width: 720px) {
    .container {
        padding: 0 var(--space-xl);
    }

    .card {
        padding: var(--space-xl);
    }

    .site-footer .container {
        flex-direction: column;
        text-align: center;
    }
}
