/* ==========================================================================
   Tempo Meta Landing V2 - Brand-refined
   landing-pages/meta-v2.css

   Changelog (brand refinement):
   - Palette: navy/white/slate/indigo/text only; removed red/green
   - Cards: single .card + .card--muted, .card--accent variants; radius 8px
   - Shadows: removed; border-only cards
   - Whitespace: section padding 80/120px; stronger type hierarchy
   - Comparison: 3 bullets each; Tempo palette
   - How it works / What you get: inline app snippets (step-visual, outcome-visual)
   - Form error: #475569 (brand) instead of red
   ========================================================================== */

:root {
    /* Tempo palette only */
    --bg-primary: #0F172A;
    --bg-secondary: #F8FAFC;
    --surface: #FFFFFF;
    --text-primary: #0B1220;
    --text-secondary: #475569;
    --accent: #6366F1;
    --accent-hover: #4F46E5;
    --border: #E2E8F0;

    --max-width: 1080px;
    --section-padding-desktop: 120px;
    --section-padding-mobile: 80px;
    --container-padding: 24px;
    --container-padding-mobile: 20px;
    --radius: 8px;
    --radius-input: 8px;

    --font: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 28px;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--surface);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding-mobile);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================================================
   Card system: 1 base + 1 variant
   ========================================================================== */

.card {
    padding: 24px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.card--muted {
    background: var(--bg-secondary);
    border-color: transparent;
}

.card--accent {
    background: var(--bg-primary);
    border-color: transparent;
    color: white;
}

.card--accent h3,
.card--accent li {
    color: white;
}

.card--accent li {
    opacity: 0.9;
}

/* ==========================================================================
   CTA - brand tokens
   ========================================================================== */

.cta-btn {
    display: inline-block;
    height: 52px;
    padding: 0 28px;
    background: var(--accent);
    color: var(--surface);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-input);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    text-align: center;
    line-height: 52px;
}

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

.cta-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.cta-btn--secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: var(--surface);
}

.cta-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

.email-divider {
    font-size: 14px;
    line-height: 22px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 12px;
    margin-bottom: 12px;
}

/* ==========================================================================
   1. Hero
   ========================================================================== */

.hero {
    position: relative;
    padding: var(--section-padding-mobile) 0;
    background: var(--bg-primary);
    color: var(--surface);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
    align-items: center;
}

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

.hero-headline {
    font-size: 34px;
    line-height: 42px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subhead {
    font-size: 18px;
    line-height: 30px;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 36px;
}

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

.signup-form input[type="email"] {
    height: 44px;
    padding: 0 18px;
    font-family: var(--font);
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    background: var(--surface);
    color: var(--text-primary);
}

.signup-form input[type="email"]::placeholder {
    color: var(--text-secondary);
}

.signup-form input[type="email"]:focus {
    outline: 2px solid var(--accent);
    outline-offset: 0;
}

.signup-form input[type="email"].error {
    border-color: var(--text-secondary);
}

.signup-form .trust-microcopy {
    margin-top: 7px;
}

.trust-microcopy {
    font-size: 14px;
    line-height: 22px;
    color: rgba(255, 255, 255, 0.7);
}

.form-success .success-message {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

/* App Store badge CTAs */
.app-store-cta {
    margin-top: 16px;
}

.app-store-cta--hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.app-store-cta--final {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.app-store-label {
    font-size: 12px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.02em;
}

.app-store-badge {
    display: block;
    height: auto;
    object-fit: contain;
}

.app-store-badge--hero {
    width: 132px;
    height: 44px;
}

.app-store-badge--final {
    width: 104px;
    height: 35px;
}

.app-store-cta a {
    display: inline-block;
    line-height: 0;
}

.app-store-cta a:hover {
    opacity: 0.9;
}

.app-store-cta a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .app-store-cta--hero {
        align-items: flex-start;
    }
}

/* iPhone frames */
.iphone-frame {
    position: relative;
    background: #1a1a1a;
    border-radius: 32px;
    padding: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.iphone-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 24px;
    background: var(--surface);
}

.img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: var(--bg-primary);
    border-radius: 24px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.iphone-stack {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.iphone-stack .iphone-frame {
    width: 72%;
    margin: 0 auto;
}

.iphone-stack .iphone-1 {
    position: relative;
    z-index: 3;
    transform: translateY(0) rotate(-4deg);
}

.iphone-stack .iphone-2 {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-55%, -50%) rotate(2deg);
    width: 68%;
}

.iphone-stack .iphone-3 {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    transform: translate(-45%, -50%) rotate(-2deg);
    width: 64%;
}

/* ==========================================================================
   2. Proof strip
   ========================================================================== */

.proof-strip {
    padding: 40px 0;
    background: var(--bg-secondary);
}

.proof-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
    list-style: none;
    justify-content: center;
}

.proof-list li {
    font-size: 16px;
    line-height: 24px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.proof-check {
    color: var(--accent);
    font-weight: 600;
}

/* ==========================================================================
   3. Comparison
   ========================================================================== */

.comparison {
    padding: var(--section-padding-mobile) 0;
}

.comparison h2 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--text-primary);
    text-align: center;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.comparison-grid .card h3 {
    font-size: 18px;
    line-height: 26px;
    font-weight: 600;
    margin-bottom: 16px;
}

.comparison-grid .card ul {
    list-style: none;
    font-size: 16px;
    line-height: 28px;
}

.comparison-grid .card--muted ul {
    color: var(--text-secondary);
}

.comparison-grid .card ul li {
    padding: 4px 0;
}

/* ==========================================================================
   4. App gallery
   ========================================================================== */

.app-gallery {
    padding: var(--section-padding-mobile) 0;
    background: var(--bg-secondary);
}

.app-gallery h2 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--text-primary);
    text-align: center;
}

.gallery-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.gallery-main .iphone-frame {
    max-width: 280px;
    margin: 0 auto;
}

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

.gallery-supporting .iphone-frame {
    max-width: 160px;
    margin: 0 auto;
}

.gallery-supporting .iphone-frame img,
.gallery-supporting .iphone-frame .img-placeholder {
    min-height: 280px;
    object-fit: cover;
}

/* ==========================================================================
   5. How it works - with inline app snippets
   ========================================================================== */

.how-it-works {
    padding: var(--section-padding-mobile) 0;
}

.how-it-works h2 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    margin-bottom: 56px;
    color: var(--text-primary);
    text-align: center;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.step {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
}

.step-visual {
    width: 100%;
    max-width: 140px;
}

.step-visual img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.app-snippet-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
}

.step-content {
    flex: 1;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    margin-bottom: 12px;
}

.step-content h3 {
    font-size: 22px;
    line-height: 30px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-content p {
    font-size: 17px;
    line-height: 28px;
    color: var(--text-secondary);
}

/* ==========================================================================
   6. Outcomes - with inline app snippets
   ========================================================================== */

.outcomes {
    padding: var(--section-padding-mobile) 0;
    background: var(--bg-secondary);
}

.outcomes h2 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    margin-bottom: 56px;
    color: var(--text-primary);
    text-align: center;
}

.outcome-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

.outcome {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: start;
}

.outcome-visual {
    width: 100px;
    flex-shrink: 0;
}

.outcome-visual img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.outcome-content h3 {
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.outcome-content p {
    font-size: 17px;
    line-height: 28px;
    color: var(--text-secondary);
}

/* ==========================================================================
   7. FAQ
   ========================================================================== */

.faq {
    padding: var(--section-padding-mobile) 0;
}

.faq h2 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--text-primary);
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item.card {
    padding: 28px 32px;
}

.faq-item dt {
    font-size: 18px;
    line-height: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.faq-item dd {
    font-size: 17px;
    line-height: 28px;
    color: var(--text-secondary);
}

/* ==========================================================================
   8. Final CTA
   ========================================================================== */

.final-cta {
    padding: var(--section-padding-mobile) 0;
    background: var(--bg-primary);
    color: var(--surface);
}

.final-cta h2 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.cta-subhead {
    font-size: 18px;
    line-height: 30px;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 40px;
    text-align: center;
}

.final-cta .cta-subhead {
    margin-bottom: 0;
}

.final-cta .app-store-cta--final {
    margin-top: 16px;
    gap: 8px;
}

.final-cta .signup-form {
    max-width: 640px;
    margin: 34px auto 0;
    gap: 10px;
    align-items: center;
}

.final-cta .trust-microcopy {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.final-cta .success-message {
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
}

/* ==========================================================================
   Sticky CTA (mobile)
   ========================================================================== */

.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 100;
}

.sticky-cta .cta-btn {
    display: block;
    width: 100%;
}

/* ==========================================================================
   Desktop
   ========================================================================== */

@media (min-width: 768px) {
    .container {
        padding: 0 var(--container-padding);
    }

    .hero {
        padding: var(--section-padding-desktop) 0;
    }

    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 80px;
    }

    .hero-headline {
        font-size: 48px;
        line-height: 56px;
        margin-bottom: 28px;
    }

    .hero-subhead {
        font-size: 19px;
        line-height: 32px;
        margin-bottom: 44px;
    }

    .signup-form {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .signup-form .trust-microcopy {
        flex-basis: 100%;
    }

    .signup-form input[type="email"] {
        flex: 1;
        min-width: 260px;
    }

    .hero-visual {
        justify-content: flex-end;
    }

    .iphone-stack {
        max-width: 380px;
        margin: 0;
        min-height: 480px;
    }

    .iphone-stack .iphone-frame {
        width: 75%;
    }

    .proof-strip {
        padding: 48px 0;
    }

    .comparison,
    .app-gallery,
    .how-it-works,
    .outcomes,
    .faq,
    .final-cta {
        padding: var(--section-padding-desktop) 0;
    }

    .comparison h2,
    .app-gallery h2,
    .how-it-works h2,
    .outcomes h2,
    .faq h2 {
        font-size: 40px;
        line-height: 48px;
        margin-bottom: 56px;
    }

    .gallery-layout {
        grid-template-columns: 1.2fr 1fr;
        gap: 48px;
        align-items: center;
    }

    .gallery-main .iphone-frame {
        max-width: 320px;
        margin: 0 auto;
    }

    .gallery-supporting {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .gallery-supporting .iphone-frame {
        max-width: 200px;
    }

    .step {
        grid-template-columns: 140px 1fr;
        gap: 40px;
    }

    .outcome-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }

    .outcome {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .outcome-visual {
        width: 120px;
    }

    .sticky-cta {
        display: none;
    }
}

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

    .gallery-supporting {
        grid-template-columns: 1fr;
    }
}
