/* ============================================
   pH Piscine — Design System 2026
   Glassmorphism + Mesh Gradients + Fluid Motion
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Palette — Bleu piscine */
    --blue-50: #f0f9ff;
    --blue-100: #e0f2fe;
    --blue-200: #b9e6fe;
    --blue-300: #7cd4fd;
    --blue-400: #36bffa;
    --blue-500: #0ba5ec;
    --blue-600: #0086c9;
    --blue-700: #026aa2;
    --blue-800: #065986;
    --blue-900: #0b4a6f;

    /* Accents */
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --rose-400: #fb7185;
    --rose-500: #f43f5e;

    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --gray-950: #030712;

    /* Semantic */
    --color-primary: var(--blue-500);
    --color-primary-hover: var(--blue-600);
    --color-primary-light: var(--blue-100);
    --color-secondary: var(--cyan-500);
    --color-success: var(--emerald-500);
    --color-warning: var(--amber-500);
    --color-danger: var(--rose-500);

    /* Surfaces — Light mode */
    --bg-body: #f8fbff;
    --bg-surface: #ffffff;
    --bg-surface-hover: var(--gray-50);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-strong: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.06);
    --border-color-strong: rgba(0, 0, 0, 0.1);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-400);
    --text-on-primary: #ffffff;
    --shadow-color: 220 60% 50%;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px hsl(var(--shadow-color) / 0.04);
    --shadow-sm: 0 1px 3px hsl(var(--shadow-color) / 0.06), 0 1px 2px hsl(var(--shadow-color) / 0.04);
    --shadow-md: 0 4px 6px -1px hsl(var(--shadow-color) / 0.06), 0 2px 4px -2px hsl(var(--shadow-color) / 0.04);
    --shadow-lg: 0 10px 15px -3px hsl(var(--shadow-color) / 0.07), 0 4px 6px -4px hsl(var(--shadow-color) / 0.04);
    --shadow-xl: 0 20px 25px -5px hsl(var(--shadow-color) / 0.08), 0 8px 10px -6px hsl(var(--shadow-color) / 0.04);
    --shadow-glow: 0 0 20px hsl(var(--shadow-color) / 0.15);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;

    /* Layout */
    --container-max: 1200px;
    --header-height: 4rem;
}

/* --- Dark Mode --- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #0a0f1a;
        --bg-surface: #111827;
        --bg-surface-hover: #1f2937;
        --bg-glass: rgba(17, 24, 39, 0.75);
        --bg-glass-strong: rgba(17, 24, 39, 0.9);
        --border-color: rgba(255, 255, 255, 0.06);
        --border-color-strong: rgba(255, 255, 255, 0.1);
        --text-primary: var(--gray-50);
        --text-secondary: var(--gray-400);
        --text-tertiary: var(--gray-600);
        --shadow-color: 220 80% 10%;
        --color-primary-light: rgba(11, 165, 236, 0.15);
    }
}

/* --- Global --- */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + var(--space-8));
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Mesh gradient background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(11, 165, 236, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 90% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(52, 211, 153, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: var(--text-secondary); max-width: 65ch; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--color-primary-hover); }

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* --- Header / Nav --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow var(--duration-normal) var(--ease-out);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    font-weight: 700;
}

.nav-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: linear-gradient(135deg, var(--blue-500), var(--cyan-400));
    color: white;
    font-weight: 800;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    letter-spacing: -0.03em;
}

.nav-logo-text {
    font-size: 1.125rem;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-out);
}

.nav-links a:hover:not(.btn-nav),
.nav-links a.active:not(.btn-nav) {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

.nav-links a.active {
    color: var(--color-primary);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger svg {
    transition: transform var(--duration-fast) var(--ease-out);
}

.nav-dropdown:hover .nav-dropdown-trigger svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: 200px;
    padding: var(--space-2);
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--duration-normal) var(--ease-out);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    color: var(--text-on-primary);
    box-shadow: 0 2px 8px rgba(11, 165, 236, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    color: var(--text-on-primary);
    box-shadow: 0 4px 16px rgba(11, 165, 236, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color-strong);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-color-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.btn-nav {
    padding: var(--space-2) var(--space-5);
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    color: var(--text-on-primary) !important;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    box-shadow: 0 2px 8px rgba(11, 165, 236, 0.25);
}

.btn-nav:hover {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    color: var(--text-on-primary) !important;
    box-shadow: 0 4px 12px rgba(11, 165, 236, 0.35);
    transform: translateY(-1px);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
    border-radius: var(--radius-xl);
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius-md);
}

/* --- Cards --- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color-strong);
    transform: translateY(-2px);
}

.card-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.card-highlight {
    border-color: rgba(11, 165, 236, 0.2);
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(11, 165, 236, 0.05);
}

.card-highlight:hover {
    border-color: rgba(11, 165, 236, 0.3);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(11, 165, 236, 0.08);
}

/* --- Tool Card (homepage) --- */
.tool-card {
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-400), var(--cyan-400));
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-5);
    font-size: 1.5rem;
    background: var(--color-primary-light);
}

.tool-card h3 {
    margin-bottom: var(--space-3);
}

.tool-card p {
    font-size: 0.9375rem;
    margin-bottom: var(--space-5);
}

.tool-card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
}

.tool-card-link::after {
    content: '→';
    transition: transform var(--duration-fast) var(--ease-out);
}

.tool-card:hover .tool-card-link::after {
    transform: translateX(4px);
}

/* --- Hero --- */
.hero {
    padding: var(--space-24) 0 var(--space-16);
    text-align: center;
}

.hero h1 {
    margin-bottom: var(--space-6);
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--blue-500), var(--cyan-400), var(--emerald-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    max-width: 600px;
    margin: 0 auto var(--space-8);
    font-size: 1.125rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* --- Sections --- */
.section {
    padding: var(--space-20) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-header p {
    margin: var(--space-4) auto 0;
    font-size: 1.0625rem;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-4);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Grids --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

/* --- Forms --- */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-lg);
    outline: none;
    transition: all var(--duration-fast) var(--ease-out);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(11, 165, 236, 0.12);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: var(--space-1);
}

/* --- Tool UI Components --- */
.tool-container {
    max-width: 800px;
    margin: 0 auto;
}

.tool-header {
    text-align: center;
    padding: var(--space-16) 0 var(--space-10);
}

.tool-header h1 {
    margin-bottom: var(--space-4);
}

.tool-header p {
    margin: 0 auto;
    font-size: 1.0625rem;
}

.tool-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
}

.tool-result {
    margin-top: var(--space-6);
    padding: var(--space-6);
    background: var(--color-primary-light);
    border: 1px solid rgba(11, 165, 236, 0.15);
    border-radius: var(--radius-xl);
    display: none;
}

.tool-result.visible {
    display: block;
    animation: slideUp 0.4s var(--ease-out);
}

.tool-result-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.tool-result-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

/* pH Scale visual */
.ph-scale {
    position: relative;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg,
        #ff1a1a 0%,
        #ff6b35 14%,
        #ffa500 28%,
        #ffd700 42%,
        #7cfc00 50%,
        #00c853 57%,
        #00bcd4 64%,
        #2196f3 71%,
        #3f51b5 78%,
        #673ab7 85%,
        #9c27b0 100%
    );
    margin: var(--space-6) 0;
    overflow: visible;
}

.ph-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border: 3px solid var(--gray-900);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transition: left 0.6s var(--ease-spring);
}

.ph-labels {
    display: flex;
    justify-content: space-between;
    padding: var(--space-2) var(--space-1) 0;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* --- Range slider custom --- */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--gray-200);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    box-shadow: 0 2px 8px rgba(11, 165, 236, 0.35);
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-spring);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    box-shadow: 0 2px 8px rgba(11, 165, 236, 0.35);
    cursor: pointer;
}

/* --- Stat / Number badges --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-4);
}

.stat-card {
    text-align: center;
    padding: var(--space-6);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

/* --- CTA Banner --- */
.cta-banner {
    position: relative;
    padding: var(--space-12) var(--space-8);
    background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
    border-radius: var(--radius-2xl);
    text-align: center;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(34, 211, 238, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(52, 211, 153, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.cta-banner h2 {
    color: white;
    margin-bottom: var(--space-4);
    position: relative;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    margin: 0 auto var(--space-8);
    position: relative;
}

.cta-banner .btn {
    position: relative;
    background: white;
    color: var(--blue-700);
}

.cta-banner .btn:hover {
    background: var(--gray-50);
    color: var(--blue-800);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* --- FAQ / Accordion --- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--duration-fast) var(--ease-out);
}

.faq-item:hover {
    border-color: var(--border-color-strong);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-5) var(--space-6);
    background: var(--bg-surface);
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-tertiary);
    transition: transform var(--duration-normal) var(--ease-out);
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-slow) var(--ease-out);
}

.faq-answer-inner {
    padding: 0 var(--space-6) var(--space-5);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* --- Content / Article --- */
.content {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-12) 0 var(--space-20);
}

.content h2 {
    margin-top: var(--space-12);
    margin-bottom: var(--space-4);
}

.content h3 {
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.content p {
    margin-bottom: var(--space-5);
    max-width: none;
}

.content ul, .content ol {
    margin-bottom: var(--space-5);
    padding-left: var(--space-6);
    color: var(--text-secondary);
}

.content li {
    margin-bottom: var(--space-2);
    line-height: 1.7;
}

.content blockquote {
    margin: var(--space-6) 0;
    padding: var(--space-5) var(--space-6);
    background: var(--color-primary-light);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Alert boxes */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    margin-bottom: var(--space-5);
}

.alert-info {
    background: var(--color-primary-light);
    border: 1px solid rgba(11, 165, 236, 0.15);
    color: var(--blue-700);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: var(--emerald-500);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: var(--amber-500);
}

.alert-danger {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.15);
    color: var(--rose-500);
}

/* --- Breadcrumb --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) 0;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.breadcrumb a {
    color: var(--text-tertiary);
}

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

.breadcrumb-sep::before {
    content: '/';
    margin: 0 var(--space-1);
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: var(--space-20);
    background: var(--bg-surface);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-10);
    margin-bottom: var(--space-12);
}

.footer-brand p {
    margin-top: var(--space-4);
    font-size: 0.875rem;
}

.footer-col h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-4);
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    display: block;
    padding: var(--space-1) 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin: 0 auto;
}

/* --- Hero Images --- */
.hero-image {
    position: relative;
    overflow: hidden;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--bg-body) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, var(--bg-body) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-image > * {
    position: relative;
    z-index: 2;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
}

@media (prefers-color-scheme: dark) {
    .hero-bg img { opacity: 0.12; }
}

/* --- Image Components --- */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.img-rounded {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.img-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.img-frame:hover img {
    transform: scale(1.03);
}

/* Aspect ratio containers */
.aspect-video { aspect-ratio: 16/9; }
.aspect-photo { aspect-ratio: 4/3; }
.aspect-square { aspect-ratio: 1/1; }

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    transition: all var(--duration-normal) var(--ease-out);
}

.gallery-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease-out);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    padding: var(--space-4) var(--space-5);
}

.gallery-caption h4 {
    font-size: 0.9375rem;
    margin-bottom: var(--space-1);
}

.gallery-caption p {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* Symptom cards with images */
.symptom-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.symptom-card:hover {
    border-color: var(--border-color-strong);
    box-shadow: var(--shadow-sm);
}

.symptom-card.active {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.symptom-card-img {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.symptom-card-text strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.symptom-card-text small {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* Content images */
.content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: var(--space-6) 0;
}

.content figure {
    margin: var(--space-8) 0;
}

.content figcaption {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: var(--space-2);
}

/* Comparison table */
.table-responsive {
    overflow-x: auto;
    margin: var(--space-6) 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.table-compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.table-compare th {
    background: var(--bg-surface-hover);
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.table-compare td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.table-compare tr:last-child td {
    border-bottom: none;
}

.table-compare tr:hover td {
    background: var(--bg-surface-hover);
}

.table-compare .highlight {
    background: var(--color-primary-light);
    font-weight: 600;
    color: var(--color-primary);
}

/* Timeline visual */
.timeline {
    position: relative;
    padding-left: var(--space-8);
    margin: var(--space-8) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--blue-400), var(--emerald-400));
    border-radius: 1px;
}

.timeline-step {
    position: relative;
    padding-bottom: var(--space-6);
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-8) + 0.625rem);
    top: 4px;
    width: 0.75rem;
    height: 0.75rem;
    background: var(--color-primary);
    border: 2px solid var(--bg-body);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.timeline-step-time {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-1);
}

.timeline-step h4 {
    font-size: 0.9375rem;
    margin-bottom: var(--space-1);
}

.timeline-step p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* --- Responsive additions --- */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .symptom-card-img {
        width: 3rem;
        height: 3rem;
    }
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    transform: scale(0.92) translateY(8px);
    transition: transform var(--duration-normal) var(--ease-spring);
}

.modal-overlay.visible .modal-box {
    transform: scale(1) translateY(0);
}

.modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin: 0 auto var(--space-5);
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber-500);
    border-radius: var(--radius-full);
}

.modal-message {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    max-width: none;
}

.modal-close {
    min-width: 120px;
}

/* --- Animations --- */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
}

@media (max-width: 768px) {
    :root {
        --header-height: 3.5rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100dvh - var(--header-height));
        height: calc(100vh - var(--header-height));
        z-index: 999;
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-6);
        padding-bottom: var(--space-16);
        background: var(--bg-surface);
        border-top: 1px solid var(--border-color);
        gap: var(--space-2);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.open {
        display: flex;
        animation: fadeSlideDown 0.25s var(--ease-out) forwards;
    }

    @keyframes fadeSlideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .nav-links a {
        padding: var(--space-3) var(--space-4);
        font-size: 1rem;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none;
        border: none;
        background: transparent;
        backdrop-filter: none;
        padding: 0;
        padding-left: var(--space-4);
        min-width: 0;
    }

    .nav-dropdown-trigger svg {
        display: none;
    }

    .nav-links .btn-nav {
        margin-top: var(--space-4);
        text-align: center;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: var(--space-16) 0 var(--space-10);
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .tool-panel {
        padding: var(--space-5);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
