/*
 * Mise Landing Page Styles
 * Based on Mise iOS App Design System v2 - Bloom Theme
 * Colors, typography, and spacing match the native app
 */

/* ============================================
   CSS Variables - Bloom Design System
   ============================================ */
:root {
    /* Bloom Green (Primary Brand - Verdant) */
    --bloom-green-light: #E5F0E0;
    --bloom-green-mid: #7BA96B;
    --bloom-green-base: #4F7B53;
    --bloom-green-deep: #253822;
    --bloom-green-hover: #3C6142;

    /* Bloom Blue (Secondary - Sky) */
    --bloom-blue-light: #D4E8F3;
    --bloom-blue-mid: #7CB7D6;
    --bloom-blue-deep: #1F3E56;

    /* Bloom Coral (Tertiary - Warm Accent) */
    --bloom-coral-light: #F9D9CA;
    --bloom-coral-mid: #E6765B;
    --bloom-coral-deep: #812F24;

    /* Bloom Yellow (Accent - Sun) */
    --bloom-yellow-light: #FFF6D1;
    --bloom-yellow-mid: #F8D77B;
    --bloom-yellow-deep: #B9892E;

    /* Bloom Cream (Surface - Natural) */
    --bloom-cream-light: #FFFDF8;
    --bloom-cream-mid: #FAF4E8;
    --bloom-cream-deep: #E8DAC5;

    /* Bloom Neutral (Text & Grounding) */
    --bloom-neutral-white: #FFFFFF;
    --bloom-neutral-text-primary: #2A2A2A;
    --bloom-neutral-text-muted: #6D6B64;
    --bloom-neutral-dark-olive: #1E261B;

    /* Semantic Colors */
    --color-primary: var(--bloom-green-base);
    --color-primary-hover: var(--bloom-green-hover);
    --color-secondary: var(--bloom-blue-mid);
    --color-accent: var(--bloom-coral-mid);
    --color-background: var(--bloom-cream-mid);
    --color-surface: var(--bloom-cream-light);
    --color-text: var(--bloom-neutral-text-primary);
    --color-text-muted: var(--bloom-neutral-text-muted);

    /* Typography - Matching iOS App */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes - Based on Typography.swift */
    --font-size-h1: 48px;
    --font-size-h2: 40px;
    --font-size-h3: 32px;
    --font-size-h4: 22px;
    --font-size-h5: 18px;
    --font-size-h6: 16px;
    --font-size-body1: 16px;
    --font-size-body2: 14px;
    --font-size-body3: 12px;

    /* Line Heights */
    --line-height-h1: 60px;
    --line-height-h2: 50px;
    --line-height-h3: 42px;
    --line-height-body: 1.6;

    /* Spacing - Based on Spacing.swift (8pt grid) */
    --space-xxs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    --space-xxxl: 64px;

    /* Border Radius - Based on Radius.swift */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

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

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

body {
    font-family: var(--font-body);
    font-size: var(--font-size-body1);
    line-height: var(--line-height-body);
    color: var(--color-text);
    background-color: var(--color-surface);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 300;
    color: var(--bloom-neutral-dark-olive);
}

h1 {
    font-size: var(--font-size-h1);
    line-height: var(--line-height-h1);
}

h2 {
    font-size: var(--font-size-h2);
    line-height: var(--line-height-h2);
}

h3 {
    font-size: var(--font-size-h3);
    line-height: var(--line-height-h3);
}

p {
    color: var(--color-text-muted);
}

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

section {
    padding: var(--space-xxxl) 0;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-body);
    font-size: var(--font-size-body1);
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--bloom-neutral-white);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--bloom-green-light);
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-h5);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: var(--font-size-h3);
    font-weight: 400;
    color: var(--bloom-neutral-white);
}

.nav-cta {
    padding: var(--space-xs) var(--space-md);
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--bloom-neutral-white);
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: all var(--transition-base);
}

.nav-cta:hover {
    background-color: var(--bloom-neutral-white);
    color: var(--color-primary);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--bloom-green-base) 0%, var(--bloom-green-mid) 100%);
    color: var(--bloom-neutral-white);
    padding-bottom: 0;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    padding: var(--space-xxl) 0;
}

.hero-title {
    font-size: clamp(40px, 8vw, 72px);
    line-height: 1.1;
    color: var(--bloom-neutral-white);
    margin-bottom: var(--space-lg);
    font-weight: 300;
}

.hero-subtitle {
    font-size: var(--font-size-h5);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-xxl);
}

.hero-cta .btn-primary {
    background-color: var(--bloom-neutral-white);
    color: var(--color-primary);
    border-color: var(--bloom-neutral-white);
}

.hero-cta .btn-primary:hover {
    background-color: var(--bloom-cream-mid);
    border-color: var(--bloom-cream-mid);
}

.hero-cta .btn-secondary {
    color: var(--bloom-neutral-white);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-cta .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--bloom-neutral-white);
}

/* Phone Mockup */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    padding-bottom: var(--space-xl);
}

/* Floating Food Icons */
.floating-food-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.food-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.15);
    animation: floatIcon 6s ease-in-out infinite;
}

.food-icon-1 {
    top: 5%;
    left: 8%;
    animation-delay: 0s;
}

.food-icon-2 {
    top: 15%;
    right: 5%;
    animation-delay: 0.8s;
}

.food-icon-3 {
    top: 45%;
    left: 3%;
    animation-delay: 1.6s;
}

.food-icon-4 {
    top: 40%;
    right: 2%;
    animation-delay: 0.4s;
}

.food-icon-5 {
    bottom: 25%;
    right: 8%;
    animation-delay: 1.2s;
}

.food-icon-6 {
    bottom: 15%;
    left: 5%;
    animation-delay: 2s;
}

.food-icon-7 {
    top: 8%;
    left: 22%;
    animation-delay: 2.4s;
}

.food-icon-8 {
    bottom: 30%;
    right: 20%;
    animation-delay: 2.8s;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

.phone-mockup {
    position: relative;
    width: 340px;
    height: 680px;
    background: var(--bloom-neutral-dark-olive);
    border-radius: 44px;
    padding: 14px;
    box-shadow: var(--shadow-lg), 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Camera notch removed for cleaner video display */

.app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
}

.app-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    background: var(--bloom-cream-mid);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--bloom-cream-mid) 0%, var(--bloom-cream-deep) 100%);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-weight: 500;
}

.placeholder-note {
    font-size: var(--font-size-body3);
    margin-top: var(--space-xs);
    opacity: 0.7;
}

/* Hide placeholder when image loads */
.app-screenshot:not([src=""]):not([src="app-screenshot.png"]) + .image-placeholder {
    display: none;
}

.hero-wave {
    position: relative;
    margin-top: -1px;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================
   Features Section
   ============================================ */
.features {
    background-color: var(--color-background);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-md);
}

.section-subtitle {
    text-align: center;
    font-size: var(--font-size-h5);
    max-width: 500px;
    margin: 0 auto var(--space-xxl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-xl);
}

.feature-card {
    background: var(--color-surface);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

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

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--bloom-green-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.feature-title {
    font-size: var(--font-size-h4);
    margin-bottom: var(--space-sm);
}

.feature-description {
    font-size: var(--font-size-body2);
    line-height: 1.7;
}

/* ============================================
   How It Works Section
   ============================================ */
.how-it-works {
    background: var(--color-surface);
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 250px;
    max-width: 320px;
    text-align: center;
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: var(--bloom-neutral-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: var(--font-size-h3);
    margin: 0 auto var(--space-md);
}

.step-title {
    font-size: var(--font-size-h4);
    margin-bottom: var(--space-sm);
}

.step-description {
    font-size: var(--font-size-body2);
}

.step-connector {
    width: 60px;
    height: 2px;
    background: var(--bloom-cream-deep);
    margin-top: 28px;
    display: none;
}

@media (min-width: 900px) {
    .step-connector {
        display: block;
    }
}

/* ============================================
   Social Proof Section
   ============================================ */
.social-proof {
    background: var(--bloom-green-light);
}

.testimonials {
    max-width: 700px;
    margin: 0 auto var(--space-xxl);
}

.testimonial {
    text-align: center;
}

.testimonial-text {
    font-family: var(--font-heading);
    font-size: var(--font-size-h4);
    font-style: italic;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.testimonial-author {
    font-size: var(--font-size-body2);
    color: var(--color-text-muted);
}

.stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xxl);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--font-size-h2);
    color: var(--color-primary);
    margin-bottom: var(--space-xxs);
}

.stat-label {
    font-size: var(--font-size-body2);
    color: var(--color-text-muted);
}

/* ============================================
   Signup Section
   ============================================ */
.signup {
    background: linear-gradient(180deg, var(--color-background) 0%, var(--bloom-cream-deep) 100%);
}

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

.signup-form-container {
    margin: var(--space-xl) 0;
}

.early-access-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: var(--space-sm);
}

.form-row:last-of-type {
    margin-bottom: 0;
}

.form-row-names {
    gap: var(--space-sm);
}

.form-row-names .form-input {
    flex: 1;
    min-width: 140px;
}

.form-input {
    flex: 1;
    min-width: 250px;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-body);
    font-size: var(--font-size-body1);
    border: 2px solid var(--bloom-cream-deep);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    color: var(--color-text);
    outline: none;
    transition: all var(--transition-base);
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--bloom-green-light);
}

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

.btn-submit {
    padding: var(--space-md) var(--space-xl);
    white-space: nowrap;
}

.form-success {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bloom-green-light);
    border-radius: var(--radius-lg);
    max-width: 500px;
    margin: 0 auto;
}

.form-success p {
    color: var(--bloom-green-deep);
    font-weight: 600;
    margin: 0;
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
    }

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

.privacy-note {
    font-size: var(--font-size-body3);
    color: var(--color-text-muted);
    margin-top: var(--space-md);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bloom-neutral-dark-olive);
    color: var(--bloom-neutral-white);
    padding: var(--space-xxl) 0 var(--space-lg);
}

.footer .logo-text {
    font-size: var(--font-size-h4);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--space-xs);
    font-size: var(--font-size-body2);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--bloom-neutral-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-lg);
    text-align: center;
}

.footer-bottom p {
    font-size: var(--font-size-body3);
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    :root {
        --font-size-h1: 36px;
        --font-size-h2: 32px;
        --font-size-h3: 26px;
        --font-size-h4: 20px;
    }

    section {
        padding: var(--space-xxl) 0;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: var(--font-size-body1);
    }

    .phone-mockup {
        width: 280px;
        height: 560px;
    }

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

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step-connector {
        display: none;
    }

    .stats {
        gap: var(--space-xl);
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta .btn {
        width: 100%;
    }
}

/* ============================================
   FAQ Section
   ============================================ */
.faq {
    background: var(--color-surface);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-background);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
}

.faq-question {
    font-size: var(--font-size-h5);
    margin-bottom: var(--space-sm);
    color: var(--bloom-neutral-dark-olive);
}

.faq-answer {
    font-size: var(--font-size-body2);
    line-height: 1.7;
    color: var(--color-text-muted);
}

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

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

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.feature-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
