/* ─── Design Tokens ─── */
:root {
    --color-primary: #5B4FCF;
    --color-focus: #5B4FCF;
    --color-primary-light: #7B71D9;
    --color-primary-dark: #4A3FB3;
    --color-primary-50: #EEEDFA;
    --color-secondary: #D97706;
    --color-secondary-light: #F59E0B;
    --color-accent: #5B4FCF;
    --color-accent-light: #7B71D9;
    --color-bg: #FAFAF9;
    --color-bg-elevated: #FFFFFF;
    --color-text: #1C1917;
    --color-text-muted: #57534E;
    --color-text-tertiary: #78716C;
    --color-border: #E7E5E4;
    --color-border-strong: #D6D3D1;
    --color-success: #16A34A;
    --color-warning: #D97706;
    --color-error: #DC2626;
    --color-info: #5B4FCF;

    --font-display: 'Instrument Serif', serif;
    --font-body: 'DM Sans', sans-serif;
    --font-ui: 'DM Sans', sans-serif;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06);
    --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.08);
    --shadow-lg: 0 8px 24px rgba(28, 25, 23, 0.1);
}

html.dark {
    --color-bg: #1C1917;
    --color-bg-elevated: #2C2926;
    --color-text: #FAFAF9;
    --color-text-muted: #D6D3D1;
    --color-text-tertiary: #A8A29E;
    --color-border: #57534E;
    --color-border-strong: #78716C;
    --color-primary: #9B93E3;
    --color-focus: #A59BEC;
    --color-primary-light: #B5AFF0;
    --color-primary-dark: #5B4FCF;
    --color-primary-50: #2A2640;
    --color-accent: #5B4FCF;
    --color-accent-light: #9B93E3;
    --color-secondary: #F59E0B;
    --color-success: #4ADE80;
    --color-error: #F87171;
    --color-info: #7B71D9;

    --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 8px 24px rgba(0, 0, 0, 0.3);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    transition: background-color 300ms ease, color 300ms ease;
}

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.2;
    font-weight: 400;
}

a { color: var(--color-primary); text-decoration: none; transition: color 200ms ease; }
a:hover { color: var(--color-primary-light); }
a:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ─── Text overflow safety ─── */
.song-title, .song-artist, .song-title-link,
.set-song-title, .set-song-artist {
    overflow-wrap: break-word;
}

/* ─── Utilities ─── */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 200ms ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-accent);
    color: #FFFFFF;
}
.btn-primary:hover {
    background: var(--color-primary-dark);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 79, 207, 0.25);
}
.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(91, 79, 207, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1.5px solid var(--color-border-strong);
}
.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 0.85rem;
    border-radius: 8px;
    min-height: 44px;
}

/* ─── Nav ─── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid transparent;
    transition: border-color 200ms ease, box-shadow 200ms ease, background-color 300ms ease;
}
.nav.scrolled {
    border-bottom-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav-logo {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--color-text);
    text-decoration: none;
}
.nav-logo span { color: var(--color-primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.nav-links a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    transition: color 200ms ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.nav-links a:hover { color: var(--color-primary); }
.nav-links a.btn-primary { color: #FFFFFF; }
.nav-links a.btn-primary:hover { color: #FFFFFF; }
.nav-dropdown { position: relative; }
.nav-dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown-panel:hover { display: block; }
.nav-dropdown:focus-within .nav-dropdown-panel { display: block; }
.nav-dropdown-panel a {
    display: block;
    padding: 10px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
    border-radius: var(--radius-sm);
    transition: background 150ms ease, color 150ms ease;
}
.nav-dropdown-panel a:hover {
    color: var(--color-primary);
    background: var(--color-primary-50);
}
.nav-dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 4px 6px;
}

.theme-toggle {
    background: none;
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius-full);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 300ms ease;
}
.theme-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.theme-toggle svg { width: 18px; height: 18px; }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
}
.mobile-toggle svg { width: 24px; height: 24px; }

.mobile-menu {
    display: none;
    padding: 16px 0;
    border-top: 1px solid var(--color-border);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block;
    padding: 12px 0;
    color: var(--color-text-muted);
    font-weight: 500;
}
.mobile-menu a:hover { color: var(--color-primary); }

@media (max-width: 640px) {
    .nav-links { display: none; }
    .mobile-toggle { display: flex; }
}

/* ─── Waitlist CTA ─── */
.waitlist-cta {
    padding: 64px 0;
}
.waitlist-cta-inner {
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 64px 32px;
    text-align: center;
}
html.dark .waitlist-cta-inner {
    background: #4A3FB3;
}
.waitlist-cta-inner h2 {
    font-size: 2rem;
    color: #FFFFFF;
    margin-bottom: 12px;
}
.waitlist-cta-inner > p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 480px;
    margin: 0 auto 32px;
}
.waitlist-form {
    display: flex;
    gap: 8px;
    max-width: 440px;
    margin: 0 auto;
}
.waitlist-form input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}
.waitlist-form input[type="email"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}
.waitlist-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.75);
}
.waitlist-form .btn-primary {
    background: #FFFFFF;
    color: #5B4FCF;
    flex-shrink: 0;
}
.waitlist-form .btn-primary:hover {
    background: #F5F5F4;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
html.dark .waitlist-form .btn-primary {
    color: #5B4FCF;
}

@media (max-width: 640px) {
    .waitlist-form { flex-direction: column; }
    .waitlist-cta-inner { padding: 48px 24px; }
}

/* ─── Footer ─── */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--color-border);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.footer-logo {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1rem;
    color: var(--color-text-muted);
}
.footer-logo span { color: var(--color-primary); }
.footer a { padding: 12px 4px; }

@media (max-width: 640px) {
    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ─── Success state ─── */
.form-success {
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--color-success);
}
.form-success svg { width: 20px; height: 20px; flex-shrink: 0; }
.form-success.show {
    display: flex;
    justify-content: center;
    animation: fadeIn 300ms ease-out;
}

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

/* ─── Social Proof Strip ─── */
.social-proof {
    padding: 16px 24px;
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
}
.proof-items {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 32px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
}
.proof-items span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.proof-items span::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .proof-items {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

/* ─── Pricing Teaser ─── */
.pricing-teaser {
    padding: 48px 24px;
}
.pricing-teaser-header {
    text-align: center;
    margin-bottom: 40px;
}
.pricing-teaser-header .section-label {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: 12px;
}
.pricing-teaser-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    font-weight: 400;
    margin-bottom: 12px;
}
.pricing-teaser-header p {
    color: var(--color-text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}
.pricing-grid {
    max-width: 720px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.pricing-col {
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
}
.pricing-col-plus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}
.pricing-col-label {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: 8px;
}
.pricing-col h3 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 400;
    margin-bottom: 16px;
}
.pricing-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pricing-col li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}
.pricing-col li svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-primary);
}
.pricing-teaser-cta {
    text-align: center;
    margin-top: 32px;
}
@media (max-width: 640px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

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