/**
 * Basis: Reset, Typografie, Farbpalette, Hilfsklassen
 * Palette: Cremeweiß · Saphirblau · Nachtblau
 */

@font-face {
    font-family: 'Lexend';
    src: url('/fonts/Lexend.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Farben */
    --color-bg:              #F7F4EE;
    --color-surface:         #FEFCF8;
    --color-surface-alt:     #F2EFE8;
    --color-text:            #0C0C0C;
    --color-muted:           #7C7365;
    --color-border:          #E3DDD3;
    --color-border-subtle:   #EDE9E2;

    /* Saphirblau — Hauptakzent */
    --color-primary:         #0F52BA;
    --color-primary-hover:   #0A3D8F;
    --color-primary-light:   #EBF1FC;
    --color-primary-mid:     #C7D9F5;

    /* Nachtblau — Logo "land", tiefe Akzente */
    --color-night:           #0A1628;
    --color-night-hover:     #141F35;

    /* Status */
    --color-success-bg:      #E8F4ED;
    --color-success-text:    #1A5C35;
    --color-error-bg:        #FDECEA;
    --color-error-text:      #891C2B;

    /* Typografie */
    --font-display: 'Lexend', system-ui, -apple-system, sans-serif;
    --font-sans:    'Lexend', system-ui, -apple-system, sans-serif;

    /* Radius */
    --radius:    14px;
    --radius-sm: 8px;
    --radius-xs: 5px;

    /* Schatten */
    --shadow-xs: 0 1px 2px rgba(12, 12, 12, 0.04);
    --shadow-sm: 0 2px 8px rgba(12, 12, 12, 0.06), 0 1px 2px rgba(12, 12, 12, 0.04);
    --shadow-md: 0 8px 32px rgba(12, 12, 12, 0.09), 0 2px 8px rgba(12, 12, 12, 0.05);
    --shadow-lg: 0 24px 64px rgba(12, 12, 12, 0.12), 0 8px 24px rgba(12, 12, 12, 0.06);
    --shadow-primary: 0 6px 24px rgba(15, 82, 186, 0.28);

    /* Timing */
    --ease:         cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:     cubic-bezier(0, 0, 0.2, 1);
    --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-sm:  0.15s;
    --duration-md:  0.25s;
    --duration-lg:  0.4s;

    /* Layout */
    --space: 1rem;
    --max-width: 1140px;
    --focus-ring: 2px solid var(--color-primary);
    --focus-offset: 3px;
}

/* ─── Reset ─────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ─── Typografie ─────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

/* ─── Links ──────────────────────────────────────── */

a {
    color: var(--color-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--duration-sm) var(--ease);
}

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

/* ─── Fokus ──────────────────────────────────────── */

:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
    border-radius: var(--radius-xs);
}

/* ─── Skip-Link ──────────────────────────────────── */

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: var(--space);
    top: var(--space);
    width: auto;
    height: auto;
    padding: 0.5rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

/* ─── Hilfsklassen ───────────────────────────────── */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.muted {
    color: var(--color-muted);
    font-weight: 400;
}

/* ─── Seitenlade-Animation ───────────────────────── */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.main > * {
    animation: fadeUp var(--duration-lg) var(--ease-out) both;
}

.main > *:nth-child(1) { animation-delay: 0.05s; }
.main > *:nth-child(2) { animation-delay: 0.12s; }
.main > *:nth-child(3) { animation-delay: 0.18s; }
.main > *:nth-child(4) { animation-delay: 0.24s; }
