:root {
    color-scheme: light dark;
    --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bg: #f0f4f8;
    --fg: #0f172a;
    --muted: #64748b;
    --card: #ffffff;
    --border: #e2e8f0;
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --accent-muted: rgba(13, 148, 136, 0.15);
    --hero-1: #115e59;
    --hero-2: #312e81;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.06);
    --radius: 14px;
    --radius-sm: 10px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0f1a;
        --fg: #e2e8f0;
        --muted: #94a3b8;
        --card: #121a2b;
        --border: #2d3b52;
        --accent: #2dd4bf;
        --accent-hover: #5eead4;
        --accent-muted: rgba(45, 212, 191, 0.12);
        --hero-1: #134e4a;
        --hero-2: #1e1b4b;
        --shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
        --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
    }
}

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

body {
    margin: 0;
    font-family: var(--font);
    line-height: 1.55;
    background: var(--bg);
    color: var(--fg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(13, 148, 136, 0.18), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(49, 46, 129, 0.12), transparent),
        var(--bg);
}

@media (prefers-color-scheme: dark) {
    .page-bg {
        background:
            radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 212, 191, 0.08), transparent),
            radial-gradient(ellipse 60% 40% at 100% 0%, rgba(99, 102, 241, 0.1), transparent),
            var(--bg);
    }
}

.hero {
    position: relative;
    padding: 2.5rem 1.25rem 3rem;
    text-align: center;
    color: #f8fafc;
    background: linear-gradient(135deg, var(--hero-1) 0%, var(--hero-2) 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.9;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 36rem;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    margin: 0 0 0.75rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.95);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.hero-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.75rem, 5vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.hero-lead {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(248, 250, 252, 0.88);
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.container {
    max-width: 58rem;
    margin: 0 auto;
    padding: 0 1.1rem 3.5rem;
    position: relative;
}

.container::before {
    content: "";
    display: block;
    height: 1px;
    margin: -0.5rem 0 1.75rem;
}

.search-box {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--fg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.search-box:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--shadow-card), 0 0 0 3px var(--accent-muted);
}

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

.products {
    display: grid;
    gap: 1.1rem;
}

@media (min-width: 36rem) {
    .products {
        grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    }
}

.product-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.3rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(13, 148, 136, 0.35);
}

@media (prefers-color-scheme: dark) {
    .product-card:hover {
        border-color: rgba(45, 212, 191, 0.35);
    }
}

.product-title {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.45rem;
    color: var(--fg);
}

.product-desc {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.doc-link {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.doc-link:hover,
.doc-link:focus-visible {
    color: var(--accent-hover);
    border-color: var(--accent);
    background: var(--accent-muted);
}

.product-card[hidden] {
    display: none !important;
}

.no-results {
    color: var(--muted);
    text-align: center;
    margin-top: 2rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.no-results[hidden] {
    display: none;
}
