:root {
    --sage-50: #f4f7f4;
    --sage-100: #e3ebe3;
    --sage-200: #c5d8c5;
    --sage-300: #9ebf9e;
    --sage-400: #749f74;
    --sage-500: #5a825a;
    --sage-600: #4a6a4a;
    --sage-700: #3d553d;
    --sage-800: #334433;
    --sage-900: #2a362a;

    --bg-body: #fafdfa;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-muted: #f4f7f4;
    --bg-hover: #edf2ed;

    --text-primary: #1a2b1a;
    --text-secondary: #4a5a4a;
    --text-muted: #6b7b6b;
    --text-inverse: #ffffff;

    --border-subtle: #e8ede8;
    --border-default: #d1dcd1;
    --border-strong: #a8b9a8;

    --accent-primary: #5a825a;
    --accent-primary-hover: #4a6a4a;
    --accent-cta: #e55a5a;
    --accent-cta-hover: #c94a4a;
    --accent-success: #5a825a;
    --accent-error: #dc4545;
    --accent-warning: #d4a72c;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    --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-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --radius-btn: 8px;

    --bg-secondary: var(--bg-muted);
    --bg: var(--bg-body);

    --shadow-sm: 0 1px 3px rgba(90, 130, 90, 0.08);
    --shadow-md: 0 4px 12px rgba(90, 130, 90, 0.1);
    --shadow-lg: 0 10px 24px rgba(90, 130, 90, 0.12);
    --shadow-xl: 0 20px 40px rgba(90, 130, 90, 0.15);
    --shadow-glow: 0 0 0 3px rgba(90, 130, 90, 0.2);

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

[data-theme="dark"] {
    --bg-body: #0f1410;
    --bg-card: #1a231a;
    --bg-elevated: #232f23;
    --bg-muted: #1f2b1f;
    --bg-hover: #283428;

    --text-primary: #edf5ed;
    --text-secondary: #b8c9b8;
    --text-muted: #96a596;
    --text-inverse: #1a231a;

    --border-subtle: #283428;
    --border-default: #3a473a;
    --border-strong: #4a5a4a;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 0 3px rgba(90, 130, 90, 0.3);
}

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

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
    width: 100%;
}

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

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

main {
    flex: 1 0 auto;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    line-height: 1.5;
    font-family: inherit;
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--shadow-glow);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-primary:hover {
    background-color: var(--accent-primary-hover);
    border-color: var(--accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

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

.btn-cta {
    background-color: var(--accent-cta);
    color: white;
    border-color: var(--accent-cta);
}

.btn-cta:hover {
    background-color: var(--accent-cta-hover);
    border-color: var(--accent-cta-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border-default);
}

.btn-secondary:hover {
    background-color: var(--bg-muted);
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover {
    background-color: var(--bg-muted);
    color: var(--text-primary);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--transition-base);
}

.card,
.bento-card:not(.featured),
.feature-card {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(135deg, #6BA368, #4A7A4A, #3b82f6, #8b5cf6) border-box;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="password"],
textarea,
select {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-family: inherit;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(90, 130, 90, 0.2);
    background-color: var(--bg-card);
}

input[type="number"] {
    text-align: center;
    font-weight: 600;
    font-size: 1.125rem;
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7b6b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

::selection {
    background: var(--accent-primary);
    color: white;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 253, 250, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

[data-theme="dark"] .header {
    background: rgba(15, 20, 16, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    text-decoration: none;
    position: relative;
}

.logo-text {
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-3d {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo:hover .logo-3d {
    transform: scale(1.1);
}

.logo-3d svg {
    width: 22px;
    height: 22px;
}


.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    padding: var(--space-2) 0;
    position: relative;
    text-decoration: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-fast);
}

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

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    z-index: 0;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1.5px;
    background: conic-gradient(from var(--angle, 0deg),
        #2563EB,
        #7C3AED,
        #2563EB40,
        #7C3AED40,
        #2563EB
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
    animation: spinBorder 6s linear infinite;
    pointer-events: none;
}

.theme-toggle:hover {
    color: var(--accent-primary);
    background: var(--bg-muted);
}

.theme-toggle:hover::before {
    padding: 2px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
}

.mobile-menu-btn:hover {
    background: var(--bg-muted);
}

.hero-wrapper {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: -50%;
    background: radial-gradient(ellipse 60% 50% at 30% 40%, rgba(37, 99, 235, 0.04) 0%, transparent 70%),
                radial-gradient(ellipse 50% 40% at 70% 60%, rgba(124, 58, 237, 0.04) 0%, transparent 70%),
                radial-gradient(ellipse 40% 30% at 50% 20%, rgba(90, 130, 90, 0.03) 0%, transparent 60%);
    animation: bgShift 12s ease-in-out infinite alternate;
    z-index: -1;
    pointer-events: none;
}

@keyframes bgShift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(2%, 1%) rotate(2deg); }
}

.hero {
    padding: var(--space-16) var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.page-header {
    padding: var(--space-12) var(--space-6) var(--space-8);
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
}

.page-header h1 {
    margin-bottom: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.hero-content {
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--sage-50);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: var(--space-6);
    position: relative;
    z-index: 0;
    animation: fadeUp 0.6s ease-out 0.15s both;
}

.hero-badge::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-full);
    padding: 2px;
    background: conic-gradient(from var(--angle, 0deg),
        #2563EB,
        #7C3AED,
        #2563EB20,
        #7C3AED20,
        #2563EB
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
    animation: spinBorder 4s linear infinite;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes spinBorder {
    to { --angle: 360deg; }
}

.hero-badge::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: calc(var(--radius-full) + 2px);
    background: conic-gradient(from var(--angle, 0deg),
        rgba(37, 99, 235, 0.08),
        rgba(124, 58, 237, 0.08),
        transparent,
        transparent,
        rgba(37, 99, 235, 0.08)
    );
    z-index: -2;
    animation: spinBorder 6s linear infinite reverse;
    filter: blur(6px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.floating-icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.floating-icon {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.15;
    animation: floatIcon 20s ease-in-out infinite;
    transition: opacity 0.4s;
}

.floating-icon svg {
    width: 28px;
    height: 28px;
    stroke: #2563EB;
    stroke-width: 1.5;
    fill: none;
}

.floating-icon span {
    font-size: 0.65rem;
    font-weight: 600;
    color: #2563EB;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.floating-icon:nth-child(1) { top: 18%; left: 6%; }
.floating-icon:nth-child(2) { top: 22%; right: 8%; animation-delay: -5s; }
.floating-icon:nth-child(3) { bottom: 28%; left: 10%; animation-delay: -10s; }
.floating-icon:nth-child(4) { bottom: 22%; right: 6%; animation-delay: -15s; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-12px) rotate(1deg); }
    50% { transform: translateY(-4px) rotate(-0.5deg); }
    75% { transform: translateY(-18px) rotate(0.5deg); }
}

.hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: var(--space-8);
}

.hero-logo .logo-3d svg {
    width: 40px;
    height: 40px;
}

.hero-logo .logo-3d svg path {
    stroke-width: 5;
    stroke-linecap: round;
}

.hero-logo span {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.3;
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-glow {
    filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.25)) drop-shadow(0 0 30px rgba(124, 58, 237, 0.15));
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.25)) drop-shadow(0 0 30px rgba(124, 58, 237, 0.15)); }
    50% { filter: drop-shadow(0 0 20px rgba(37, 99, 235, 0.4)) drop-shadow(0 0 50px rgba(124, 58, 237, 0.25)); }
}

.hero-logo {
    animation: fadeUp 0.6s ease-out 0s both;
}

.hero h1 {
    margin-bottom: var(--space-6);
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    animation: fadeUp 0.6s ease-out 0.3s both;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeUp 0.6s ease-out 0.45s both;
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-10);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-12);
    flex-wrap: wrap;
    margin-top: var(--space-6);
    animation: fadeUp 0.6s ease-out 0.6s both;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat strong {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
    display: inline-block;
}

.stat:hover strong {
    transform: scale(1.08);
}

.stat span {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.search-section {
    padding: 0 var(--space-6) var(--space-16);
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    animation: fadeUp 0.6s ease-out 0.8s both;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 0 var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.search-container:focus-within {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), var(--shadow-lg);
    transform: translateY(-1px);
}

.search-container > svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.search-container input {
    flex: 1;
    border: none;
    background: transparent;
    padding: var(--space-4) 0;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
}

.search-container input::placeholder {
    color: var(--text-muted);
}

.search-shortcuts {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
}

.shortcut {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.shortcut:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 360px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-result-item:hover,
.search-result-item.highlighted {
    background: var(--bg-hover);
}

.search-result-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--accent-primary);
}

.search-result-item .result-name {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
}

.search-result-item .result-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* Animated placeholder */
.search-placeholder-animated {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
    font-size: 1rem;
    color: var(--text-muted);
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    animation: typewriter 4s steps(40) infinite,
               blinkCursor 0.8s step-end infinite;
    border-right: 2px solid var(--text-muted);
    max-width: calc(100% - 100px);
    display: none;
    background: var(--bg-card);
}

.search-container:not(:focus-within) .search-placeholder-animated {
    display: block;
}

.search-container:focus-within .search-placeholder-animated {
    display: none;
}

@keyframes typewriter {
    0%, 100% { width: 0; }
    20% { width: 140px; }
    80% { width: 140px; }
}

@keyframes blinkCursor {
    50% { border-color: transparent; }
}

.section {
    padding: var(--space-16) var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

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

.section-header h2 {
    margin-bottom: var(--space-4);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.footer {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-card);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-12);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.footer-brand p {
    margin-top: var(--space-4);
    max-width: 280px;
    font-size: 0.9375rem;
}

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: var(--space-12) auto 0;
    padding: var(--space-6) var(--space-6) 0;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 var(--space-5);
    }

    .header-inner {
        max-width: 100%;
        padding: 0 var(--space-5);
    }
}

@media (max-width: 1024px) {
    .bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        gap: var(--space-5);
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + var(--space-2));
        left: var(--space-4);
        right: var(--space-4);
        background: var(--bg-card);
        flex-direction: column;
        padding: var(--space-4) var(--space-5);
        z-index: 99;
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-xl);
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-links a {
        font-size: 1rem;
        padding: var(--space-3) 0;
        width: 100%;
        border-bottom: 1px solid var(--border-subtle);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-close {
        display: none;
    }

    .nav-links.mobile-open ~ .mobile-menu-close,
    .nav-links.mobile-open .mobile-menu-close {
        display: flex;
    }

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

    .hero-logo .logo-3d svg {
        width: 32px;
        height: 32px;
    }

    .hero-logo span {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 2.75rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .floating-icon { display: none; }

    .hero-stats {
        gap: var(--space-6);
    }

    .stat strong {
        font-size: 1.5rem;
    }

    .search-container {
        padding: 0 var(--space-3);
    }

    .search-shortcuts {
        display: none;
    }

    .section {
        padding: var(--space-10) var(--space-4);
    }

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

    .footer-brand {
        text-align: center;
    }

    .footer-brand p {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links {
        text-align: center;
    }

    .toast-container {
        left: var(--space-4);
        right: var(--space-4);
        bottom: var(--space-4);
    }

    .toast {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --space-16: 3rem;
        --space-20: 3.5rem;
    }

    .header-inner {
        padding: 0 var(--space-4);
        height: 64px;
    }

    .logo {
        font-size: 1.375rem;
    }

    .logo-3d svg {
        width: 20px;
        height: 20px;
    }


    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .nav-links {
        top: 100%;
    }

    .container {
        padding: 0 var(--space-4);
    }

    .hero {
        padding: var(--space-8) var(--space-4);
    }

    .hero-logo .logo-3d svg {
        width: 28px;
        height: 28px;
    }

    .hero-logo span {
        font-size: 1.25rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

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

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    .hero-stats {
        gap: var(--space-4);
    }

    .stat {
        flex: 1;
        min-width: 80px;
    }

    .stat strong {
        font-size: 1.25rem;
    }

    .search-container input {
        font-size: 0.9375rem;
        padding: var(--space-3) 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section {
        padding: var(--space-8) var(--space-4);
    }

    .footer {
        padding: var(--space-10) 0 var(--space-6);
    }
}

@media (max-width: 360px) {
    .header-inner {
        padding: 0 var(--space-3);
        height: 56px;
    }



    .container {
        padding: 0 var(--space-3);
    }

    .hero {
        padding: var(--space-6) var(--space-3);
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo-3d svg {
        width: 18px;
        height: 18px;
    }


    .theme-toggle {
        width: 32px;
        height: 32px;
    }
}

/* ================= TOUCH & SMALL SCREEN ENHANCEMENTS ================= */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .bento-card,
    .feature-card,
    .dock-card,
    .faq-question,
    .shortcut {
        cursor: default;
    }

    .nav-links a {
        padding: var(--space-3) 0;
    }

    .bento-card,
    .feature-card,
    .dock-card {
        transform: none !important;
    }

    .bento-card:hover,
    .feature-card:hover,
    .dock-card:hover {
        transform: none !important;
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    z-index: 10;
    border-radius: var(--radius-md);
}

[data-theme="dark"] .loading-overlay {
    background: rgba(26,35,26,0.9);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-default);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: 0.9375rem;
    color: var(--text-primary);
    animation: toastIn 0.3s ease;
    max-width: 360px;
}

.toast.success {
    border-color: var(--accent-success);
    background: linear-gradient(135deg, var(--bg-card), rgba(90, 130, 90, 0.1));
}

.toast.success svg {
    color: var(--accent-success);
}

.toast.error {
    border-color: var(--accent-error);
    background: linear-gradient(135deg, var(--bg-card), rgba(220, 68, 68, 0.1));
}

.toast.error svg {
    color: var(--accent-error);
}

.toast.warning {
    border-color: var(--accent-warning);
    background: linear-gradient(135deg, var(--bg-card), rgba(212, 167, 44, 0.1));
}

.toast.warning svg {
    color: var(--accent-warning);
}

.toast.info {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, var(--bg-card), rgba(90, 130, 90, 0.1));
}

.toast.info svg {
    color: var(--accent-primary);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

/* ================= FAQ (UNIFIED) ================= */
.faq-section {
    padding: var(--space-12) 0;
    border-top: 1px solid var(--border-subtle);
}

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

.faq-header h2,
.faq-header h3 {
    font-size: 1.75rem;
    margin-bottom: var(--space-3);
}

.faq-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

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

.faq-question:hover {
    color: var(--accent-primary);
}

.faq-question svg {
    color: var(--text-muted);
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
    color: var(--accent-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

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

@media (max-width: 768px) {
    .faq-section {
        padding: var(--space-8) 0;
    }

    .faq-question {
        padding: var(--space-4) var(--space-5);
        font-size: 0.9375rem;
    }

    .faq-answer p {
        padding: 0 var(--space-5) var(--space-4);
    }
}

/* ================= REDUCED MOTION ================= */
@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;
    }

    .spinner {
        animation: none;
        border-top-color: transparent;
        opacity: 0.7;
    }

    .faq-answer {
        transition: none;
    }

    .faq-item.active .faq-answer {
        max-height: none;
    }
}