/* Greving huisstijl — zelfde tokens als mobile-app/src/constants/designTokens.ts */

@font-face {
    font-family: 'DIN Pro';
    src: url('../fonts/DINPro-Regular.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'DIN Pro';
    src: url('../fonts/DINPro-Medium.otf') format('opentype');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'DIN Pro';
    src: url('../fonts/DINPro-Bold.otf') format('opentype');
    font-weight: 700;
    font-display: swap;
}

:root {
    --brand-primary: #0E2050;
    --brand-primary-pressed: #0A173D;
    --on-primary: #FFFFFF;
    --bg: #F4F6FA;
    --bg-element: #E8ECF4;
    --bg-selected: #D7DFF0;
    --text: #151D38;
    --text-secondary: #5A6278;
    --border: #CED5E3;
    --error: #B91C1C;
    --error-border: rgba(220, 38, 38, 0.45);
    --error-surface: rgba(220, 38, 38, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --max-content: 800px;
    --opening-bg: #dbdbdb;
}

* { box-sizing: border-box; }

/* Ruimte voor de scrollbalk altijd reserveren, zodat de pagina niet
   verspringt tussen korte (geen scrollbalk) en lange pagina's. */
html { scrollbar-gutter: stable; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'DIN Pro', 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 24px;
}

.page {
    max-width: var(--max-content);
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

/* ---- Hero (foto of logo) + stadsbalk, zoals BranchChrome in de app ---- */
.hero {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}
.hero img.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero .hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #FFFFFF 0%, rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
}
.hero .hero-letters {
    position: absolute;
    top: 32px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
}
.hero .hero-letters img {
    width: 68%;
    max-width: 260px;
    height: 64px;
    object-fit: contain;
}
.hero.hero-logo-band {
    background: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}
.hero.hero-logo-band img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.city-bar {
    width: 100%;
    background: var(--brand-primary);
    color: var(--on-primary);
    text-align: center;
    padding: 16px 8px;
    font-size: 18px;
    line-height: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.hero-back-link {
    position: absolute;
    top: 8px;
    left: 24px;
    z-index: 2;
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}
.hero-back-link:hover { opacity: 0.72; }

/* ---- Vestigingskeuze ---- */
.onboarding-body { padding: 0 24px 64px; }
.onboarding-intro {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 20px;
    margin: 24px 0;
    text-align: center;
}
.branch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 560px) {
    .branch-grid { grid-template-columns: repeat(3, 1fr); }
}
.branch-card {
    border: none;
    padding: 0;
    background: var(--bg-element);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    display: block;
    width: 100%;
    text-align: center;
    font-family: inherit;
}
.branch-card:hover { opacity: 0.92; }
.branch-card .branch-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: var(--border);
}
.branch-card .city-bar { font-size: 15px; padding: 12px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Landing ---- */
.landing-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 24px;
    gap: 16px;
}
.landing-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    background: var(--brand-primary);
    color: var(--on-primary);
    border: 1px solid var(--brand-primary);
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
}
.landing-btn:hover { background: var(--brand-primary-pressed); }
.address-band {
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.address-band .caption {
    color: var(--brand-primary);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.2px;
}
.address-band a { color: var(--brand-primary); font-size: 15px; }
.opening-band {
    background: var(--opening-bg);
    color: #1a1d26;
    text-align: center;
    padding: 32px 24px;
}
.opening-band .caption {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}
.opening-band p { margin: 2px 0; font-size: 15px; line-height: 22px; font-weight: 500; }

/* ---- Formulier ---- */
.form-body { padding: 0 24px 64px; }
.form-title { font-size: 28px; line-height: 34px; font-weight: 700; margin: 24px 0 4px; }
.form-intro { color: var(--text-secondary); font-size: 14px; line-height: 20px; margin: 0 0 24px; }
.section-label { font-size: 15px; font-weight: 700; margin: 24px 0 8px; }
.field-label { color: var(--text-secondary); font-size: 14px; line-height: 20px; display: block; margin-top: 8px; }
.input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    font-size: 17px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text);
    background: var(--bg-element);
    margin: 4px 0 8px;
}
.input:focus { outline: 2px solid var(--brand-primary); outline-offset: 1px; }
textarea.input { min-height: 96px; resize: vertical; }

.error-banner {
    background: var(--error-surface);
    border: 1px solid var(--error-border);
    color: var(--error);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 0 0 16px;
    font-size: 15px;
}

.remember-card {
    background: var(--bg-element);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 16px 0 0;
}
.remember-card .hint { color: var(--text-secondary); font-size: 13px; line-height: 18px; margin: 6px 0 0; }

.tab-row { display: flex; gap: 8px; margin-bottom: 8px; }
.tab-btn {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--bg-element);
    border: none;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
}
.tab-btn[aria-selected="true"] { background: var(--bg-selected); }

.panel {
    background: var(--bg-element);
    border-radius: var(--radius-md);
    padding: 8px 16px;
}
.panel[hidden] { display: none; }

.stepper-row, .switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}
.stepper-controls { display: flex; align-items: center; gap: 12px; }
.stepper-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--brand-primary);
    color: var(--on-primary);
    font-size: 22px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    line-height: 1;
}
.stepper-btn:hover { background: var(--brand-primary-pressed); }
.stepper-value { min-width: 28px; text-align: center; font-size: 17px; font-weight: 700; }

/* Switch in app-stijl */
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 15px;
    transition: background 0.15s;
    cursor: pointer;
}
.switch .slider::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    top: 3px;
    background: #FFFFFF;
    border-radius: 50%;
    transition: transform 0.15s;
}
.switch input:checked + .slider { background: var(--brand-primary); }
.switch input:checked + .slider::before { transform: translateX(22px); }

.submit-btn {
    width: 100%;
    min-height: 56px;
    margin-top: 24px;
    background: var(--brand-primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}
.submit-btn:hover { background: var(--brand-primary-pressed); }
.submit-btn:disabled { opacity: 0.6; cursor: default; }

/* ---- Succes ---- */
.success-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
    gap: 16px;
}
.success-body h1 { font-size: 28px; line-height: 34px; margin: 0; }
.success-body .secondary { color: var(--text-secondary); font-size: 14px; line-height: 20px; }
