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

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 16px;
}

/* Visually Hidden (for screen readers) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #10b981;
    --accent-dark: #059669;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --bg-dark: #111827;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
}

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

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

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

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}

.badge .apple-logo {
    width: 14px;
    height: 14px;
}

.hero h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.7;
}

/* Waitlist Form */
.waitlist-form {
    margin-bottom: 32px;
}

.form-group {
    display: flex;
    gap: 12px;
    max-width: 440px;
}

.form-group input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--text-lighter);
}

.btn-primary {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    position: relative;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-primary .btn-loading {
    display: none;
}

.btn-primary.loading .btn-text {
    visibility: hidden;
}

.btn-primary.loading .btn-loading {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

.form-hint {
    font-size: 13px;
    color: var(--text-lighter);
    margin-top: 12px;
}

/* Newsletter Form (Loops.so) */
.newsletter-form-container {
    margin-bottom: 32px;
}

.newsletter-form {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
}

.newsletter-form-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-right: 12px;
    max-width: 300px;
}

.newsletter-form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.newsletter-form-input::placeholder {
    color: var(--text-lighter);
}

.newsletter-success,
.newsletter-error {
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.newsletter-success {
    background: rgba(16, 185, 129, 0.1);
}

.newsletter-success-message {
    color: var(--accent-dark);
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}

.newsletter-error {
    background: rgba(239, 68, 68, 0.1);
}

.newsletter-error-message {
    color: #dc2626;
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}

.newsletter-back-button {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
}

.newsletter-back-button:hover {
    color: var(--primary);
    text-decoration: underline;
}

.newsletter-loading-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Social Proof */
.social-proof {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatars {
    display: flex;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f472b6, #ec4899);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid white;
    margin-left: -8px;
}

.avatar:first-child {
    margin-left: 0;
}

.avatar:nth-child(2) {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.avatar:nth-child(3) {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.avatar:nth-child(4) {
    background: var(--border);
    color: var(--text-light);
}

.social-proof p {
    font-size: 14px;
    color: var(--text-light);
}

.social-proof strong {
    color: var(--text);
}

/* Phone Mockup */
.hero-mockup {
    display: flex;
    justify-content: center;
}

.phone-frame {
    width: 300px;
    background: var(--bg-dark);
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.phone-screen {
    background: var(--bg);
    border-radius: 32px;
    padding: 24px 16px;
    min-height: 500px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.app-greeting {
    font-weight: 700;
    font-size: 18px;
}

.app-date {
    font-size: 14px;
    color: var(--text-light);
}

.app-card {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
}

.app-card.faded {
    opacity: 0.6;
}

.exercise-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
}

.exercise-recommendation {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.rec-label {
    font-size: 11px;
    color: var(--text-lighter);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rec-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.confidence-badge {
    display: inline-block;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 500;
}

.confidence-badge.high {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-dark);
}

.confidence-badge.medium {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

/* Problem Section */
.problem {
    padding: 100px 0;
}

.problem h2 {
    font-size: 40px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.02em;
}

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

.problem-card {
    text-align: center;
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.problem-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.problem-icon {
    font-size: 56px;
    margin-bottom: 20px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
    transform: perspective(100px) rotateX(5deg);
    display: inline-block;
}

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

.problem-card p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--bg-alt);
}

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

.section-header h2 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
}

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

.feature-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

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

.feature-card p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
}

/* How It Works */
.how-it-works {
    padding: 100px 0;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: 600px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-number {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    flex-shrink: 0;
}

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

.step-content p {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.7;
}

/* Science Section */
.science {
    padding: 100px 0;
    background: var(--bg-dark);
    color: white;
}

.science-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.science h2 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.science-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
}

.science-points {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.science-point {
    display: flex;
    gap: 16px;
}

.check-icon {
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.science-point strong {
    display: block;
    font-size: 17px;
    margin-bottom: 4px;
}

.science-point p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.algo-preview {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.algo-header {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
}

.algo-code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.algo-code .keyword {
    color: var(--primary-light);
}

.algo-code .action {
    color: var(--accent);
}

/* Final CTA */
.final-cta {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.final-cta h2 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.final-cta p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 32px;
}

.waitlist-form-alt .form-group {
    margin: 0 auto;
    justify-content: center;
}

/* Footer */
.footer {
    padding: 60px 0 40px;
    background: var(--bg-dark);
    color: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    color: white;
    margin-bottom: 12px;
}

.footer-brand .logo-icon {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    max-width: 400px;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.modal-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

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

    .hero-content {
        max-width: 100%;
    }

    .form-group {
        max-width: 100%;
        justify-content: center;
    }

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

    .hero-mockup {
        order: -1;
    }

    .phone-frame {
        width: 260px;
    }

    .phone-screen {
        min-height: 420px;
    }

    .problem-grid,
    .features-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

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

    .science-visual {
        order: -1;
    }
}

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

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

    .hero h1 {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .form-group {
        flex-direction: column;
    }

    .form-group input,
    .btn-primary {
        width: 100%;
    }

    .section-header h2,
    .problem h2,
    .science h2,
    .final-cta h2 {
        font-size: 32px;
    }

    .footer-content {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }
}

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

.hero-content,
.hero-mockup {
    animation: fadeInUp 0.6s ease-out;
}

.hero-mockup {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

/* Tagline */
.tagline {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
}

/* Progression Table */
.progression-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progression-row {
    display: grid;
    grid-template-columns: 90px 1fr 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: background 0.2s;
}

.progression-row.highlight-row {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.session-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.session-data {
    display: flex;
    gap: 8px;
    align-items: center;
}

.session-data .weight {
    font-weight: 700;
    font-size: 15px;
    color: white;
}

.session-data .reps {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.decision {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.decision.hold {
    color: rgba(255, 255, 255, 0.5);
}

.decision.increase {
    color: var(--accent);
}

.decision-icon {
    font-size: 16px;
}

.table-footnote {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 16px;
    font-style: italic;
}

/* Why Section */
.why-section {
    padding: 80px 0;
    background: var(--bg-alt);
}

.why-content {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.why-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 24px;
}

.why-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 24px;
    display: block;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-lg);
}

.why-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.why-section blockquote {
    font-size: 20px;
    line-height: 1.7;
    color: var(--text);
    font-style: italic;
    margin-bottom: 20px;
}

.why-author {
    font-size: 15px;
    color: var(--text-light);
    font-weight: 500;
}

/* Responsive additions */
@media (max-width: 768px) {
    .tagline {
        font-size: 17px;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 12px;
    }

    .newsletter-form-input {
        max-width: 100%;
        width: 100%;
        margin-right: 0;
    }

    .newsletter-form-button,
    .newsletter-loading-button {
        width: 100%;
    }

    .progression-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: left;
    }

    .session-data {
        justify-content: flex-start;
    }

    .why-section blockquote {
        font-size: 17px;
    }

    .why-section h2 {
        font-size: 24px;
    }
}
