/* ── Hoekig geometry (theme-independent) ──────────────────── */
:root {
    --maxw:        1180px;
    --wrap-pad:    28px;
    --section-pad: 80px;

    /* Angular notch sizes — the signature of the hoekig design */
    --notch-sm:     8px;   /* buttons, pills          */
    --notch-md:    22px;   /* cards                   */
    --notch-lg:    26px;   /* CTA bands               */
    --seam:        56px;   /* diagonal section seam   */

    /* Sticky header height. Sections use it as scroll-margin-top so the
       browser parks them below the header rather than underneath it. */
    --header-h:    74px;

    /* Curled corner. The bevel cuts the corner away, which alone reads as a
       hole. A fold needs the other half too: the flap that the corner turned
       into, lying back on the surface.

       Geometrically the flap is the triangle mirrored across the crease, which
       occupies exactly the surviving half of a notch-sized box in that corner.
       The crease sits at 50% along a `to top left` gradient axis, so the
       gradient runs crease (in shadow) to tip (lifted, catching light).

       The flap is a pseudo-element rather than a background layer so it can
       carry a drop-shadow onto the card. That shadow points up and left, back
       into the card, so the parent's clip-path does not crop it.

       Assumes a bottom-right notch. Usage: set --curl-crease and --curl-tip,
       then apply to a ::after sized to the notch. */
    --curl-flap: linear-gradient(
        to top left,
        transparent 0 calc(50% - 0.5px),
        var(--curl-crease, currentColor) 50%,
        var(--curl-tip, currentColor) 100%
    );
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    min-height: 100dvh;
    width: 100%;
    background-color: var(--color-page-bg);
    font-family: var(--font-body);
    font-weight: var(--font-weight-n);
    font-size: var(--font-size-text);
    letter-spacing: var(--text-tracking);
    line-height: var(--text-leading);
    color: var(--color-text);
    /* Dutch compounds get long ('werkpakkettrekker'); allow a break rather
       than letting one word push the layout wider than the screen. */
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary-dark);
    line-height: 1.2;
    margin: 0 0 var(--space-md);
}

a {
    font-family: var(--font-ui);
    color: var(--color-primary);
    text-decoration: none;
}

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

/* ── Layout ───────────────────────────────────────────────── */
.page {
    display: block;
    max-width: 100%;
    background-color: var(--color-page-bg);
}

.container {
    padding: min(3%, var(--space-xl));
    padding-bottom: var(--space-2xl);
    max-width: 64rem;
    width: 100%;
    margin: 0 auto;
}

.card {
    padding: min(5%, var(--space-xl));
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: var(--shadow-1);
    margin-bottom: var(--space-lg);
}

.text-wrap {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* ── Utilities ───────────────────────────────────────────── */
.muted {
    color: var(--color-text-muted);
    font-size: var(--font-size-text-sm);
    margin-bottom: var(--space-md);
}

.error {
    color: var(--color-error);
    font-size: var(--font-size-text-sm);
    margin-bottom: var(--space-sm);
    min-height: 1.2em;
}

.empty {
    color: var(--color-text-muted);
    font-style: italic;
}

.nav-actions {
    margin-top: var(--space-md);
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

/* ── Form ─────────────────────────────────────────────────── */
.form-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--font-size-text);
    color: var(--color-text);
    background: var(--color-surface);
    outline: none;
    transition: border-color 0.15s;
}

.form-input:focus {
    border-color: var(--color-primary);
}

/* ── Hoekig layout ────────────────────────────────────────── */
.wrap {
    max-width: var(--maxw);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--wrap-pad);
}

section {
    padding: var(--section-pad) 0;
}

@media (max-width: 560px) {
    :root {
        --section-pad: 64px;
        --wrap-pad:    20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        transition: none !important;
        animation:  none !important;
    }
}
