:root {
    /* Design tokens (primitives) — the real SpecsMirror brand palette, taken from the
       logo artwork in _brand/ (see _docs/implementacny-plan-branding.md). Independent of
       core-app's try-on UI (see apps/marketing-web/CLAUDE.md). */
    --clr-white: #ffffff;

    /* Neutrals, tinted towards the logo's near-black navy (--clr-brand-950) rather than
       the violet cast they carried when the palette was indigo-based — a violet grey
       next to a teal accent reads as two different brands. */
    --clr-slate-50: #f5f8fa;
    --clr-slate-100: #e8eef2;
    --clr-slate-200: #d6e0e6;
    --clr-slate-300: #b4c3cc;
    --clr-slate-500: #61737f;
    --clr-slate-700: #2f414c;
    --clr-slate-800: #1b2830;
    --clr-slate-900: #0d181e;
    --clr-slate-950: #040910;

    /* Brand ramp. -600 and -400 are the logo's own gradient stops; -700/-800 are darker
       derivatives that exist purely so white text can sit on them (see
       --gradient-brand-strong below), and -300 is the dark-mode accent. */
    --clr-brand-300: #7fe9ef;
    --clr-brand-400: #2bd9e2;
    --clr-brand-600: #0b90af;
    --clr-brand-700: #076f88;
    --clr-brand-800: #04485c;
    --clr-brand-950: #01040a;

    /* The only non-brand hue in the palette: reserved for "this is the bad option" marks
       (the comparison stamp). Deliberately a muted rose, not a warning red. */
    --clr-rose-400: #fb7185;
    --clr-rose-500: #e11d48;

    /* The literal brand gradient. DECORATIVE ONLY — fills that carry nothing on top
       (the section-heading rule). White text on its light end is ~2.4:1, nowhere near
       readable, so anything with --color-on-brand over it must use -strong instead. */
    --gradient-brand: linear-gradient(135deg, var(--clr-brand-600) 0%, var(--clr-brand-400) 100%);
    /* Same hue, shifted dark enough that white stays legible across the whole ramp
       (5.8:1 at the light end, 10:1 at the dark end). Every badge, icon tile, primary
       button and full-bleed CTA band uses this one. */
    --gradient-brand-strong: linear-gradient(135deg, var(--clr-brand-800) 0%, var(--clr-brand-700) 100%);
    /* The foreground for --gradient-brand-strong, and the reason it isn't called
       "on-accent": that gradient is dark in *both* colour schemes, so its text must
       stay white in both. A token that flipped with the scheme (as the old
       --color-on-accent did, because the accent used to be a light indigo in dark
       mode) put near-black text on the dark primary button. */
    --color-on-brand: var(--clr-white);
    --gradient-brand-soft: linear-gradient(135deg, color-mix(in srgb, var(--clr-brand-600) 12%, transparent) 0%, color-mix(in srgb, var(--clr-brand-400) 12%, transparent) 100%);

    /* Fluid spacing */
    --space-3xs: clamp(0.25rem, 0.23rem + 0.1vw, 0.375rem);
    --space-2xs: clamp(0.375rem, 0.35rem + 0.1vw, 0.5rem);
    --space-xs: clamp(0.75rem, 0.7rem + 0.25vw, 1rem);
    --space-s: clamp(1rem, 0.9rem + 0.5vw, 1.5rem);
    --space-m: clamp(1.5rem, 1.4rem + 0.5vw, 2rem);
    --space-l: clamp(2rem, 1.8rem + 1vw, 3rem);
    --space-xl: clamp(3rem, 2.6rem + 2vw, 5rem);
    --space-2xl: clamp(5rem, 4.4rem + 3vw, 8rem);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', var(--font-sans);
    --size-step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --size-step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
    --size-step-2: clamp(1.75rem, 1.5rem + 1vw, 2.375rem);
    --size-step-3: clamp(2.5rem, 2rem + 2.5vw, 3.75rem);

    --radius-s: 0.375rem;
    --radius-m: 0.75rem;
    --radius-l: 1.25rem;
    --radius-full: 999px;

    --shadow-s: 0 1px 2px color-mix(in srgb, var(--clr-slate-900) 6%, transparent);
    --shadow-m: 0 8px 24px -8px color-mix(in srgb, var(--clr-slate-900) 18%, transparent);
    --shadow-l: 0 24px 48px -16px color-mix(in srgb, var(--clr-slate-900) 28%, transparent);
    --shadow-glow: 0 0 0 1px color-mix(in srgb, var(--clr-brand-600) 16%, transparent), 0 16px 40px -12px color-mix(in srgb, var(--clr-brand-600) 35%, transparent);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

:root {
    --color-surface: var(--clr-white);
    --color-surface-mixed: var(--clr-slate-50);
    --color-surface-raised: var(--clr-white);
    --color-text: var(--clr-slate-800);
    --color-text-muted: var(--clr-slate-500);
    /* -700, not the gradient's own -600: #0b90af against white is 3.7:1, under AA for
       body-sized text. -700 is 5.8:1 and still unmistakably the brand hue. */
    --color-accent: var(--clr-brand-700);
    --color-accent-strong: var(--clr-brand-800);
    --color-border: var(--clr-slate-200);
    --color-negative: var(--clr-rose-500);
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-surface: var(--clr-slate-950);
        --color-surface-mixed: var(--clr-slate-900);
        --color-surface-raised: var(--clr-slate-800);
        --color-text: var(--clr-slate-50);
        --color-text-muted: var(--clr-slate-300);
        --color-accent: var(--clr-brand-300);
        --color-accent-strong: var(--clr-brand-400);
        --color-border: var(--clr-slate-700);
        --color-negative: var(--clr-rose-400);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--color-surface);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--size-step-0);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.15;
    letter-spacing: -0.02em;
    /* A heading is the one place a single word can be wider than the phone. German compounds
       do it routinely — "Lizenzbedingungen" pushed the whole /de/podmienky page into sideways
       scroll at 390px. This only fires for a word that genuinely doesn't fit, so headings that
       already wrap are unchanged. */
    overflow-wrap: break-word;
}

/* Breaking mid-word without a hyphen reads badly, and German is the only language here that
   needs it often enough to be worth the typographic change. <html lang> is set per request in
   base.html.twig, so the browser uses its German hyphenation dictionary. */
:lang(de) h1,
:lang(de) h2,
:lang(de) h3 {
    hyphens: auto;
}

@media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
        opacity: 0;
        transform: translateY(1.25rem);
        transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    }

    [data-reveal].is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

@layer components, utilities;

@layer utilities {
    /* Text only a screen reader needs — e.g. the word behind a ✓/– mark in the plan matrix. */
    .visually-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }
}
