/* werkzeuge — custom styles (DaisyUI handles most styling) */

/* --- Self-hosted Inter font (DSGVO-safe) --- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/inter/inter-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/static/fonts/inter/inter-medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/static/fonts/inter/inter-semibold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/inter/inter-bold.woff2') format('woff2');
}

/* --- Dark theme matching vaudience.ai brand (oklch for DaisyUI 4.x) --- */
[data-theme="werkzeuge"] {
    /* Primary: Orange/amber (vaudience.ai CTA) */
    --p: 71.39% 0.1737 55.15;
    --pf: 62.78% 0.1515 55.56;
    --pc: 100% 0 0;

    /* Secondary: Warm amber */
    --s: 78.90% 0.1592 74.08;
    --sf: 71.18% 0.1517 70.83;
    --sc: 100% 0 0;

    /* Accent: Cool blue for differentiation */
    --a: 62.73% 0.1256 250.49;
    --af: 54.53% 0.1278 251.38;
    --ac: 100% 0 0;

    /* Neutral: Dark navy */
    --n: 28.31% 0.0313 266.45;
    --nf: 24.47% 0.0252 266.53;
    --nc: 87.80% 0.0113 264.51;

    /* Base: Dark navy backgrounds with light text */
    --b1: 22.73% 0.0176 266.80;
    --b2: 25.72% 0.0213 266.74;
    --b3: 28.63% 0.0249 266.70;
    --bc: 91.91% 0.0074 264.53;

    /* Status colors */
    --in: 62.83% 0.1351 250.85;
    --inc: 100% 0 0;
    --su: 69.31% 0.1535 156.04;
    --suc: 100% 0 0;
    --wa: 83.09% 0.1622 87.87;
    --wac: 21.56% 0 0;
    --er: 59.72% 0.1977 25.52;
    --erc: 100% 0 0;

    /* Component styling */
    --rounded-box: 0.75rem;
    --rounded-btn: 0.5rem;
    --rounded-badge: 1.5rem;
    --animation-btn: 0.2s;
    --animation-input: 0.2s;
    --btn-text-case: none;
    --btn-focus-scale: 0.98;
    --border-btn: 1px;
    --tab-border: 1px;
    --tab-radius: 0.5rem;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Alpine.js x-cloak: prevent FOUC before Alpine initializes */
[x-cloak] {
    display: none !important;
}

/* Smooth transitions for htmx swaps */
.htmx-settling {
    opacity: 0;
}

.htmx-swapping {
    opacity: 0;
    transition: opacity 0.15s ease-out;
}

.htmx-added {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

/* Screen-reader-only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip-to-content link */
.wkz-skip-link {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background-color: oklch(var(--p));
    color: oklch(var(--pc));
    border-radius: 0 0 0.5rem 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.wkz-skip-link:focus {
    top: 0;
}

/* Keyboard focus indicator (WCAG 2.1 AA) */
:focus-visible {
    outline: 3px solid oklch(var(--p));
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* --- Hero gradient banner --- */
.wkz-hero-gradient {
    background: linear-gradient(135deg,
        oklch(25% 0.03 266) 0%,
        oklch(28% 0.04 260) 50%,
        oklch(26% 0.05 250) 100%);
}

/* --- Tool card hover effect --- */
.wkz-tool-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    border: 1px solid oklch(var(--bc) / 0.08);
}

.wkz-tool-card:hover {
    transform: translateY(-2px);
    border-color: oklch(var(--p) / 0.3);
    box-shadow: 0 8px 25px oklch(0% 0 0 / 0.3), 0 0 0 1px oklch(var(--p) / 0.1);
}

/* --- Category section divider --- */
.wkz-category-heading {
    position: relative;
    padding-bottom: 0.5rem;
}

.wkz-category-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3rem;
    height: 3px;
    background: linear-gradient(90deg, oklch(var(--p)), oklch(var(--s)));
    border-radius: 2px;
}

/* --- Cookie banner solid background --- */
.wkz-cookie-banner {
    background-color: oklch(var(--n));
    border-top: 1px solid oklch(var(--p) / 0.3);
    backdrop-filter: blur(12px);
}

/* --- Footer gradient top border --- */
.wkz-footer {
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, oklch(var(--p)), oklch(var(--s)), oklch(var(--a))) 1;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
