/* =======================================================================
   style.css — Keychron Landing Page
   Organized into: Tokens → Reset → Typography → Layout → Components →
   Sections → Animations → Responsive
   ======================================================================= */

/* -----------------------------------------------------------------------
   1. DESIGN TOKENS
   ----------------------------------------------------------------------- */
:root {
    /* Colors — light mode */
    --color-bg: #f9f9fb;
    --color-bg-dark: #111111;
    --color-surface: #ffffff;
    --color-surface-alt: #1a1a1a;
    --color-accent: #ff5c00;
    --color-accent-hover: #e05200;
    --color-text: #1a1a1a;
    --color-text-inv: #ffffff;
    --color-text-muted: #888888;
    --color-border: #e5e5e5;
    --color-border-dark: #333333;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px -15px rgba(0, 0, 0, 0.15);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.08);

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

/* -----------------------------------------------------------------------
   1b. DARK MODE TOKENS
   Applied when <html data-theme="dark"> — only color tokens change.
   All components automatically adapt via CSS custom properties.
   ----------------------------------------------------------------------- */
[data-theme="dark"] {
    --color-bg: #121212;
    --color-bg-dark: #090909;
    --color-surface: #1e1e1e;
    --color-surface-alt: #282828;
    --color-text: #f0f0f0;
    /* --color-text-inv is intentionally NOT overridden here.
       It stays #ffffff so text on dark/accent backgrounds (hero, buttons)
       remains readable in both themes. */
    --color-text-muted: #9a9a9a;
    --color-border: #2e2e2e;
    --color-border-dark: #3a3a3a;
}

/* Dark mode: header */
[data-theme="dark"] .header {
    background: rgba(18, 18, 18, 0.95);
    border-bottom-color: var(--color-border);
}

/* Dark mode: hero (already dark, deepen it slightly) */
[data-theme="dark"] .hero {
    background: #090909;
}

/* Dark mode: sound test section */
[data-theme="dark"] .sound-test {
    background: #090909;
}

/* Dark mode: product card image area */
[data-theme="dark"] .product-image-wrap {
    background: var(--color-surface-alt);
}

/* Dark mode: comparison table header/row cells */
[data-theme="dark"] .comparison-table th,
[data-theme="dark"] .comparison-table td:first-child {
    background: var(--color-surface-alt);
}

/* Dark mode: testimonial cards */
[data-theme="dark"] .testimonial-card {
    background: var(--color-surface-alt);
}

/* Dark mode: buttons
   .btn-primary uses background:var(--color-text) which turns light in dark mode.
   We force a permanent crisp white button with dark text. */
[data-theme="dark"] .btn-primary {
    background: #f0f0f0;
    color: #111111;
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--color-accent);
    color: #ffffff;
}

[data-theme="dark"] .btn-secondary {
    color: var(--color-text);
    border-color: var(--color-border);
}

[data-theme="dark"] .btn-secondary:hover {
    background: #f0f0f0;
    color: #111111;
}

/* Dark mode: filter buttons */
[data-theme="dark"] .filter-btn {
    color: var(--color-text-muted);
    border-color: var(--color-border);
}

[data-theme="dark"] .filter-btn:hover,
[data-theme="dark"] .filter-btn.active {
    background: #f0f0f0;
    color: #111111;
    border-color: #f0f0f0;
}

/* Dark mode: footer */
[data-theme="dark"] .footer {
    background: #090909;
}

[data-theme="dark"] .footer-bottom {
    border-top-color: var(--color-border);
}

/* Dark mode: page hero */
[data-theme="dark"] .page-hero {
    background: #090909;
}

/* Dark mode: form inputs */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    background: var(--color-surface-alt);
    color: var(--color-text);
    border-color: var(--color-border);
}

/* Dark mode: anatomy card hover */
[data-theme="dark"] .anatomy-card:hover {
    background: var(--color-surface-alt);
}

/* Dark mode: mobile nav menu */
[data-theme="dark"] .faq-question {
    color: var(--color-text-muted);
}

/* Smooth colour transition — scoped to html/body only.
   Do NOT apply to *, as it overrides element-specific hover
   and animation transitions (fade-in-up, scale, etc.)       */
html,
body {
    transition: background-color 0.3s ease;
}

/* ------ Dark Mode Toggle Button ------ */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--color-bg);
    border-color: var(--color-text-muted);
}

/* Show the right icon for each state */
.theme-toggle-btn .icon-moon {
    display: block;
}

.theme-toggle-btn .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn .icon-sun {
    display: block;
}



/* -----------------------------------------------------------------------
   2. RESET & BASE
   ----------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

button,
input {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
    cursor: pointer;
}


/* -----------------------------------------------------------------------
   3. TYPOGRAPHY
   ----------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.text-accent {
    color: var(--color-accent);
}


/* -----------------------------------------------------------------------
   4. LAYOUT
   ----------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}


/* -----------------------------------------------------------------------
   5. BUTTONS
   ----------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn-sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--color-text);
    color: var(--color-text-inv);
    box-shadow: var(--shadow-sm);
}

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

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

.btn-secondary:hover {
    background: var(--color-bg);
    border-color: var(--color-text);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-text-inv);
}

.btn-accent:hover {
    background: var(--color-accent-hover);
}

/* Accent button on dark backgrounds (Hero) */
.hero .btn-secondary {
    color: var(--color-text-inv);
    border-color: rgba(255, 255, 255, .3);
}

.hero .btn-secondary:hover {
    background: var(--color-text-inv);
    color: var(--color-text);
}


/* -----------------------------------------------------------------------
   6. NAVIGATION
   ----------------------------------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, background 0.3s ease;
}

[data-theme="dark"] .header {
    background: rgba(18, 18, 18, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.header.hide {
    transform: translateY(-100%);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--color-text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.nav-link:hover {
    color: var(--color-text);
}

/* Nav right-side actions: cart + hamburger */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.cart-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--color-text);
    padding: 0.25rem;
    transition: color var(--transition);
}

.cart-icon-btn:hover {
    color: var(--color-accent);
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    transform: scale(0);
    transition: opacity var(--transition), transform var(--transition);
}

.cart-count.visible {
    opacity: 1;
    transform: scale(1);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 20px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s ease;
}

.mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* -----------------------------------------------------------------------
   7. CART DRAWER
   ----------------------------------------------------------------------- */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100%;
    background: var(--color-surface);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s var(--transition-slow);
    box-shadow: -10px 0 40px rgba(0, 0, 0, .1);
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.cart-header h3 {
    font-size: 1.25rem;
}

.cart-close-btn {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.cart-close-btn:hover {
    color: var(--color-text);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-sm) var(--space-md);
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    text-align: center;
    padding: var(--space-lg);
}

.cart-empty i {
    color: var(--color-border);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.qty-btn:hover {
    border-color: var(--color-text);
}

.qty-display {
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.cart-item-remove:hover {
    color: var(--color-accent);
}

.cart-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.cart-note {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-xs);
}


/* -----------------------------------------------------------------------
   8. HERO
   ----------------------------------------------------------------------- */
.hero {
    position: relative;
    padding-top: 120px;
    padding-bottom: var(--space-lg);
    background: var(--color-bg-dark);
    color: var(--color-text-inv);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-lg);
    align-items: center;
}

.hero-tag {
    display: inline-block;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #a0a0a0;
    margin-bottom: var(--space-md);
    max-width: 480px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.hero-image-container {
    width: 100%;
    height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .5));
}


/* -----------------------------------------------------------------------
   9. ANATOMY
   ----------------------------------------------------------------------- */
.anatomy {
    padding: var(--space-xl) 0;
    background: var(--color-surface);
}

.anatomy-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.anatomy-image img {
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .08);
}

.anatomy-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.anatomy-card {
    padding: 1.25rem;
    border-left: 2px solid var(--color-border);
    transition: border-color var(--transition), background var(--transition);
}

.anatomy-card:hover {
    border-color: var(--color-accent);
    background: var(--color-bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.anatomy-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.35rem;
}

.anatomy-card h4 {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.anatomy-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}


/* -----------------------------------------------------------------------
   10. FEATURES
   ----------------------------------------------------------------------- */
.features {
    padding: var(--space-xl) 0;
    background: var(--color-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: transform 0.3s ease, background var(--transition), color var(--transition);
}

.feature-item:hover .feature-icon {
    transform: scale(1.1);
    background: var(--color-text);
    color: var(--color-surface);
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
}

.feature-item p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}


/* -----------------------------------------------------------------------
   11. SOUND TEST
   ----------------------------------------------------------------------- */
.sound-test {
    padding: var(--space-xl) 0;
    background: var(--color-bg-dark);
    color: var(--color-text-inv);
}

.sound-test-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.sound-test-text {
    flex: 1;
    min-width: 220px;
}

.sound-test-text p {
    color: #a0a0a0;
    margin-top: var(--space-xs);
    max-width: 380px;
}

.sound-controls {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sound-btn {
    background: rgba(255, 255, 255, .05);
    padding: 0.9rem 1.4rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all var(--transition);
    border: 1px solid rgba(255, 255, 255, .1);
    color: var(--color-text-inv);
    min-width: 190px;
}

.sound-btn:hover,
.sound-btn.playing {
    background: rgba(255, 255, 255, .1);
    border-color: var(--color-accent);
}

.sound-btn.playing .play-icon {
    background: #10b981;
}

.play-icon {
    width: 40px;
    height: 40px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition);
}

.btn-label strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
}

.btn-label span {
    font-size: 0.78rem;
    opacity: 0.6;
}


/* -----------------------------------------------------------------------
   12. PRODUCTS
   ----------------------------------------------------------------------- */
.products {
    padding: var(--space-xl) 0;
    background: var(--color-bg);
}

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

.product-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--color-accent), 0.1);
}

.product-image-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #e8e8e8;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image-wrap img {
    transform: scale(1.05);
}

.product-info {
    padding: var(--space-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-series {
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.product-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

.product-info p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.product-price {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
}


/* -----------------------------------------------------------------------
   13. COMPARISON TABLE
   ----------------------------------------------------------------------- */
.comparison {
    padding: var(--space-xl) 0;
    background: var(--color-surface);
}

.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--space-md);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
}

.comparison-table th,
.comparison-table td {
    padding: 1.25rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
    background: var(--color-bg);
    font-weight: 700;
    font-size: 0.95rem;
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 600;
    background: var(--color-bg);
}

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


/* -----------------------------------------------------------------------
   14. SPOTLIGHT
   ----------------------------------------------------------------------- */
.spotlight {
    padding: var(--space-xl) 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.spotlight-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.spotlight-img-wrapper {
    position: relative;
}

.spotlight-img {
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .08);
    transition: opacity 0.3s ease;
}

.style-selector {
    display: flex;
    gap: 0.75rem;
    margin-top: var(--space-sm);
    justify-content: center;
}

.style-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--color-border);
    cursor: pointer;
    transition: box-shadow var(--transition);
}

.style-dot:hover {
    box-shadow: 0 0 0 2px var(--color-text-muted);
}

.style-dot.active {
    box-shadow: 0 0 0 2px var(--color-accent);
}

.spotlight-info h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0.5rem 0 1rem;
}

.spotlight-info p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Accordion */
.accordion {
    margin: var(--space-md) 0;
    border-top: 1px solid var(--color-border);
}

.accordion-item {
    border-bottom: 1px solid var(--color-border);
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: color var(--transition);
}

.accordion-header:hover {
    color: var(--color-accent);
}

.accordion-header i {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

.accordion-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 400px;
    padding-bottom: 1.25rem;
}

.specs-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.specs-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.specs-list li i {
    color: var(--color-accent);
    flex-shrink: 0;
}

.specs-table {
    width: 100%;
    font-size: 0.9rem;
}

.specs-table td {
    padding: 0.4rem 0;
}

.specs-table td:first-child {
    color: var(--color-text-muted);
}

.specs-table td:last-child {
    text-align: right;
    font-weight: 500;
}

.spotlight-cta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.spotlight-price {
    font-size: 2rem;
    font-weight: 700;
}


/* -----------------------------------------------------------------------
   15. TESTIMONIALS (Gallery)
   ----------------------------------------------------------------------- */
.testimonials {
    padding: var(--space-xl) 0;
    background: var(--color-surface);
    overflow: hidden;
}

.testimonial-gallery-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-sm) var(--space-lg);
    scrollbar-width: none;
    /* Firefox */
}

.testimonial-grid::-webkit-scrollbar {
    display: none;
    /* Safari and Chrome */
}

.testimonial-card {
    flex: 0 0 calc(33.333% - (var(--space-md) * 2 / 3));
    min-width: 320px;
    scroll-snap-align: center;
    background: var(--color-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition);
    border: 1px solid var(--color-border);
}

.testimonial-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

.testimonial-content p {
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.7;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.testimonial-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
}

.testimonial-author strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
}

.testimonial-author span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Gallery Navigation */
.gallery-nav {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.gallery-nav button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.gallery-nav button:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    transform: scale(1.1);
}


/* -----------------------------------------------------------------------
   16. FOOTER
   ----------------------------------------------------------------------- */
.footer {
    background: var(--color-bg-dark);
    color: var(--color-text-inv);
    padding: 5rem 0 2rem;
}

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

.footer .logo {
    color: var(--color-text-inv);
    display: block;
    margin-bottom: var(--space-sm);
}

.footer-brand p {
    color: #a0a0a0;
    font-size: 0.9rem;
    max-width: 280px;
    margin-bottom: var(--space-md);
}

.socials {
    display: flex;
    gap: var(--space-sm);
}

.socials a {
    color: #a0a0a0;
    transition: color var(--transition);
}

.socials a:hover {
    color: var(--color-text-inv);
}

.footer-col h4 {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-col a {
    color: #a0a0a0;
    font-size: 0.88rem;
    transition: color var(--transition);
}

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

.footer-bottom {
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: var(--space-sm);
}


/* -----------------------------------------------------------------------
   17. PAGE-LEVEL STYLES (for keyboards.html, accessories.html, support.html)
   ----------------------------------------------------------------------- */
.page-hero {
    padding-top: 120px;
    padding-bottom: var(--space-lg);
    background: var(--color-bg-dark);
    color: var(--color-text-inv);
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--space-sm);
}

.page-hero p {
    color: #a0a0a0;
    max-width: 500px;
}

.page-section {
    padding: var(--space-xl) 0;
}

.page-section.bg-alt {
    background: var(--color-surface);
}

/* Product page filter bar */
.filter-bar {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    border: 1px solid var(--color-border);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-text);
    color: var(--color-text-inv);
    border-color: var(--color-text);
}

/* Support FAQ */
.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    transition: color var(--transition);
}

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

.faq-question i {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-bottom: 1.25rem;
}

/* Contact form */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: var(--space-sm);
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    background: var(--color-surface);
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent);
}

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


/* -----------------------------------------------------------------------
   18. ANIMATIONS
   ----------------------------------------------------------------------- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}


/* -----------------------------------------------------------------------
   19. RESPONSIVE
   ----------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto var(--space-md);
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image-container {
        height: 380px;
        margin-top: var(--space-md);
    }

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

    .spotlight-content {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 900px) {

    /* Mobile nav */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--color-surface);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-md);
        transform: translateX(100%);
        transition: transform var(--transition-slow);
        font-size: 1.25rem;
    }

    .nav-links.open {
        transform: translateX(0);
    }

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

    /* Sound section stacks on mobile */
    .sound-test-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .sound-controls {
        justify-content: flex-start;
        width: 100%;
    }

    .sound-btn {
        flex: 1;
        min-width: 0;
    }

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

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

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    .sound-controls {
        flex-direction: column;
    }

    .sound-btn {
        width: 100%;
    }

    .hero-image-container {
        height: 260px;
    }

    .cart-drawer {
        width: 100vw;
    }
}