/* ============================================
   SwitchCraft — Product Landing Page
   Dark macOS-native aesthetic
   ============================================ */

:root {
    --bg: #0a0a0f;
    --bg-subtle: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --border: #222233;
    --border-subtle: #1a1a2a;
    --text: #e8e8f0;
    --text-muted: #8888a0;
    --text-dim: #55556a;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-glow-strong: rgba(99, 102, 241, 0.3);
    --green: #34d399;
    --red: #f87171;
    --yellow: #fbbf24;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ---- Navigation ---- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: all 0.3s ease;
}

.nav-scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 0;
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    text-decoration: none;
}

.nav-logo-icon {
    font-size: 22px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* ---- Buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius); }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 0 30px var(--accent-glow-strong);
    transform: translateY(-1px);
}

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

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

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}

.btn-download {
    padding: 16px 32px;
    font-size: 17px;
    border-radius: var(--radius);
}

/* ---- Hero ---- */

.hero {
    position: relative;
    padding: 160px 0 80px;
    text-align: center;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 32px;
}

.hero-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-light) 0%, #a78bfa 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

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

.stat-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ---- Hero Demo Animation ---- */

.hero-demo {
    margin-top: 80px;
    display: flex;
    justify-content: center;
}

.demo-scene {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
}

.demo-mac {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.demo-mac-screen {
    width: 160px;
    height: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding: 8px;
    position: relative;
}

.demo-mac-topbar {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.demo-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.demo-dot.red { background: var(--red); }
.demo-dot.yellow { background: var(--yellow); }
.demo-dot.green { background: var(--green); }

.demo-mac-label {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.demo-mac-base {
    width: 60px;
    height: 4px;
    background: var(--border);
    border-radius: 0 0 4px 4px;
}

.demo-mac-base-mini {
    width: 80px;
    height: 24px;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, var(--border) 0%, #191928 100%);
}

.demo-peripheral {
    position: relative;
}

.demo-peripheral-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    color: var(--accent-light);
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 0 30px var(--accent-glow);
    animation: peripheralFloat 3s ease-in-out infinite;
}

.demo-trail {
    position: absolute;
    top: 50%;
    left: -30px;
    right: -30px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-glow-strong), transparent);
    transform: translateY(-50%);
    animation: trailPulse 3s ease-in-out infinite;
}

@keyframes peripheralFloat {
    0%, 100% { transform: translateX(-20px); }
    50% { transform: translateX(20px); }
}

@keyframes trailPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ---- Sections ---- */

.section {
    padding: 120px 0;
}

.section-dark {
    background: var(--bg-subtle);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto;
}

.section-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    background: var(--accent-glow);
    color: var(--accent-light);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ---- Problem Section ---- */

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.problem-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.problem-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.problem-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.problem-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.problem-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ---- Features Grid ---- */

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

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    box-shadow: 0 0 40px var(--accent-glow);
    transform: translateY(-2px);
}

.feature-card-large {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--accent-glow);
    color: var(--accent-light);
    margin-bottom: 16px;
}

.feature-card-large .feature-icon {
    margin: 0 auto 16px;
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.feature-detail {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.feature-detail code {
    padding: 8px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--accent-light);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.feature-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--accent-glow);
    color: var(--accent-light);
    font-size: 11px;
    font-weight: 600;
}

/* ---- How it Works ---- */

.steps {
    max-width: 600px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.step.visible {
    opacity: 1;
    transform: translateX(0);
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 0 20px var(--accent-glow);
}

.step-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-content p {
    color: var(--text-muted);
    font-size: 15px;
}

.step-connector {
    width: 2px;
    height: 40px;
    background: var(--border);
    margin-left: 23px;
}

/* ---- Comparison Table ---- */

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

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.comparison-table th,
.comparison-table td {
    padding: 14px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
    padding-bottom: 20px;
}

.comparison-table th small {
    display: block;
    color: var(--text-dim);
    font-weight: 400;
}

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

.comparison-table .highlight {
    background: rgba(99, 102, 241, 0.05);
    color: var(--text);
    font-weight: 600;
}

.comparison-table th.highlight {
    color: var(--accent-light);
    font-size: 15px;
}

.comparison-table .yes { color: var(--green); }
.comparison-table .no { color: var(--text-dim); }

/* ---- Pricing ---- */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.pricing-card {
    padding: 40px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.pricing-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.pricing-card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-glow);
}

.pricing-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 100px;
    white-space: nowrap;
}

.pricing-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-price {
    margin-bottom: 8px;
}

.pricing-amount {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.pricing-period {
    color: var(--text-muted);
    font-size: 15px;
}

.pricing-annual {
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 24px;
}

.pricing-features {
    list-style: none;
    margin: 24px 0 32px;
}

.pricing-features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
}

.pricing-features li:last-child { border: none; }

.pricing-features li::before {
    content: "✓ ";
    color: var(--green);
    font-weight: 700;
}

.pricing-features li strong {
    color: var(--text);
}

.pricing-features li strong::before {
    content: "";
}

/* ---- CTA Section ---- */

.section-cta {
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.section-cta h2 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    position: relative;
}

.section-cta p {
    color: var(--text-muted);
    font-size: 17px;
    margin-bottom: 40px;
    position: relative;
}

.cta-actions {
    position: relative;
    margin-bottom: 16px;
}

.cta-meta {
    color: var(--text-dim) !important;
    font-size: 13px !important;
    margin-bottom: 48px !important;
}

.notify-form {
    max-width: 440px;
    margin: 0 auto;
    position: relative;
}

.notify-label {
    font-size: 14px !important;
    color: var(--text-muted) !important;
    margin-bottom: 12px !important;
}

.notify-input-group {
    display: flex;
    gap: 8px;
}

.notify-input-group input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.notify-input-group input:focus {
    border-color: var(--accent);
}

.notify-input-group input::placeholder {
    color: var(--text-dim);
}

/* ---- Footer ---- */

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.footer-by {
    color: var(--text-dim);
    font-weight: 400;
    font-size: 13px;
}

.footer-by a {
    color: var(--text-muted);
    text-decoration: none;
}

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

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
}

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

.footer-copy {
    color: var(--text-dim);
    font-size: 12px;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .nav-links a:not(.btn) { display: none; }

    .hero { padding: 120px 0 60px; }

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

    .feature-card-large {
        grid-column: span 1;
    }

    .demo-scene { gap: 20px; }
    .demo-mac-screen { width: 100px; height: 70px; }
    .demo-mac-label { font-size: 10px; }
    .demo-peripheral-inner { padding: 10px 14px; font-size: 10px; }
    .demo-peripheral-inner svg { width: 24px; height: 24px; }

    .hero-stats { gap: 24px; }
    .stat-divider { display: none; }

    .comparison-table { font-size: 12px; }
    .comparison-table th, .comparison-table td { padding: 10px 8px; }

    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .notify-input-group {
        flex-direction: column;
    }
}
