/* ==========================================
   TrackWasher — Style Sheet
   ========================================== */

/* ---- Variables ---- */
:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #111115;
    --bg-card: #16161b;
    --bg-card-hover: #1c1c22;
    --border: #2a2a33;
    --border-active: #4a4a5a;
    --text-primary: #e8e6e3;
    --text-secondary: #8a8894;
    --text-muted: #5a5868;
    --accent: #c8ff00;
    --accent-dim: #a0cc00;
    --accent-glow: rgba(200, 255, 0, 0.15);
    --danger: #ff4444;
    --success: #00cc88;
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---- Grain overlay ---- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* ==========================================
   Navigation
   ========================================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(42, 42, 51, 0.5);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-logo span {
    color: var(--accent);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: color 0.3s;
    letter-spacing: 0.02em;
}

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

.nav-cta {
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-weight: 500 !important;
    transition: all 0.3s !important;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* ==========================================
   Hero
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.4;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    background: var(--bg-secondary);
    animation: fadeInUp 0.8s ease both;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 2s infinite;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero h1 em {
    font-style: italic;
    color: var(--accent);
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 3rem;
    font-weight: 300;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* ---- Waveform decoration ---- */
.waveform-deco {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    align-items: center;
    height: 40px;
    opacity: 0.3;
    animation: fadeInUp 0.8s ease 0.5s both;
}

.waveform-deco .bar {
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
    animation: wave 1.5s ease-in-out infinite;
}

/* ==========================================
   Buttons
   ========================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.9rem 2rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-body);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-primary);
    padding: 0.9rem 2rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 400;
    text-decoration: none;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-body);
}

.btn-secondary:hover {
    border-color: var(--border-active);
    background: var(--bg-secondary);
}

/* ==========================================
   Sections (shared)
   ========================================== */
section {
    padding: 6rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.15;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    line-height: 1.7;
    font-weight: 300;
}

.section-desc--centered {
    margin: 0 auto;
}

/* ==========================================
   How It Works
   ========================================== */
#how-it-works {
    border-top: 1px solid var(--border);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3.5rem;
}

.step {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-card);
    transition: all 0.4s;
    position: relative;
}

.step:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.step-number {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 300;
}

/* ==========================================
   Upload
   ========================================== */
#upload {
    border-top: 1px solid var(--border);
}

.upload-container {
    margin-top: 3rem;
    max-width: 680px;
}

.dropzone {
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 3.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s;
    background: var(--bg-card);
    position: relative;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--accent);
    background: rgba(200, 255, 0, 0.02);
}

.dropzone-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.dropzone-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.dropzone-text strong {
    color: var(--accent);
    font-weight: 500;
}

.dropzone-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* ---- Preset selector ---- */
.preset-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.preset-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-card);
    text-align: left;
}

.preset-card:hover {
    border-color: var(--border-active);
}

.preset-card.active {
    border-color: var(--accent);
    background: rgba(200, 255, 0, 0.03);
}

.preset-card h4 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.preset-card p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.preset-card .intensity {
    display: flex;
    gap: 4px;
    margin-top: 0.75rem;
}

.preset-card .intensity .bar {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
}

.preset-card .intensity .bar.filled {
    background: var(--accent);
}

/* ---- File info ---- */
.file-info {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 1.5rem;
}

.file-info.visible {
    display: flex;
}

.file-icon {
    font-size: 1.5rem;
}

.file-details {
    flex: 1;
}

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.file-size {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    transition: color 0.3s;
}

.file-remove:hover {
    color: var(--danger);
}

/* ---- Submit row ---- */
.submit-row {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.submit-row.visible {
    display: flex;
}

.price-tag {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.price-tag strong {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ---- Progress ---- */
.progress-container {
    display: none;
    margin-top: 1.5rem;
}

.progress-container.visible {
    display: block;
}

.progress-bar-outer {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ==========================================
   Pricing
   ========================================== */
#pricing {
    border-top: 1px solid var(--border);
    text-align: center;
}

.pricing-card {
    max-width: 420px;
    margin: 3rem auto 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    background: var(--bg-card);
    text-align: left;
}

.pricing-card .price {
    font-family: var(--font-display);
    font-size: 3rem;
    margin-bottom: 0.25rem;
}

.pricing-card .price small {
    font-size: 1rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

.pricing-card .price-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pricing-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
}

/* ==========================================
   FAQ
   ========================================== */
#faq {
    border-top: 1px solid var(--border);
}

.faq-list {
    margin-top: 3rem;
    max-width: 680px;
}

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

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    padding: 1.25rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}

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

.faq-question .arrow {
    transition: transform 0.3s;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.faq-item.open .faq-question .arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

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

.faq-answer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    font-weight: 300;
}

/* ==========================================
   Footer
   ========================================== */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
}

.footer-logo span {
    color: var(--accent);
}

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

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes wave {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
    nav {
        padding: 1rem 1.25rem;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 7rem 1.5rem 4rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        justify-content: center;
    }

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

    .preset-selector {
        grid-template-columns: 1fr;
    }

    .submit-row {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        text-align: center;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
    }
}
