/* ========================================
   ReadyGoCook Landing Page Styles
   ======================================== */

/* CSS Variables */
:root {
    /* Primary colors adjusted for WCAG AA contrast compliance */
    --primary: #E55A2B;
    --primary-dark: #D04610;
    --primary-light: #FF8F66;
    --secondary: #2D3748;
    --accent: #48BB78;
    --accent-light: #68D391;
    --background: #FFFAF5;
    --surface: #FFFFFF;
    --text: #1A202C;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --border: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-lg: 20px;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
}

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

.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-lg { padding: 16px 32px; font-size: 1.125rem; }

/* Badge */
.badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.badge-green {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 12px 0;
}

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

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

.logo-img {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

/* Footer logo slightly smaller */
.footer-brand .logo-img {
    width: 36px;
    height: 36px;
    max-width: 36px;
    max-height: 36px;
}

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

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

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: all 0.3s;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, var(--background) 0%, #FFF5EB 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 h1 {
    margin-bottom: 24px;
}

.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

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

.stat-icon {
    font-size: 1.25rem;
}

.stat-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Phone Mockup */
.phone-mockup {
    background: var(--secondary);
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-lg), 0 30px 60px rgba(0, 0, 0, 0.2);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.phone-mockup:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.phone-screen {
    background: var(--surface);
    border-radius: 32px;
    overflow: hidden;
    aspect-ratio: 9/16;
    max-height: 500px;
}

.app-preview {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.preview-header {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--primary);
}

.preview-recipe {
    background: linear-gradient(135deg, #FFF5EB 0%, #FFE4D6 100%);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.recipe-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.recipe-source {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.preview-list {
    flex: 1;
}

.list-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.preview-button {
    background: linear-gradient(135deg, var(--accent) 0%, #38A169 100%);
    color: white;
    text-align: center;
    padding: 14px;
    border-radius: var(--radius);
    font-weight: 600;
    margin-top: auto;
}

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

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

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-top: 12px;
}

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

.feature-card {
    background: var(--background);
    padding: 32px;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   How It Works
   ======================================== */
.how-it-works {
    padding: 100px 0;
    background: linear-gradient(180deg, #FFF5EB 0%, var(--background) 100%);
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    max-width: 280px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.step-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.step h3 {
    margin-bottom: 12px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--primary);
    margin-top: 60px;
}

/* ========================================
   Sources Section
   ======================================== */
.sources {
    padding: 100px 0;
    background: var(--surface);
}

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

.source-card {
    text-align: center;
    padding: 24px 16px;
    background: var(--background);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

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

.source-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.source-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.source-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   Integration Section
   ======================================== */
.integration {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--secondary) 0%, #1A202C 100%);
    color: white;
}

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

.integration-text h2 {
    margin-bottom: 20px;
}

.integration-text p {
    color: #A0AEC0;
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.integration-features {
    list-style: none;
}

.integration-features li {
    padding: 8px 0;
    color: #CBD5E0;
}

/* Cart Preview */
.cart-preview {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.cart-header {
    background: var(--accent);
    color: white;
    padding: 16px 20px;
    font-weight: 600;
}

.cart-items {
    padding: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--background);
    font-weight: 600;
}

.cart-button {
    background: var(--accent);
    color: white;
    text-align: center;
    padding: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ========================================
   FAQ Section
   ======================================== */
.faq {
    padding: 80px 0;
    background: var(--background);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.faq-item summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    margin-top: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 0;
}

/* ========================================
   Signup Section
   ======================================== */
.signup {
    padding: 100px 0;
    background: var(--background);
}

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

.signup-content h2 {
    margin-bottom: 16px;
}

.signup-content > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.signup-form {
    display: flex;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto 16px;
}

.signup-form input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.signup-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.signup-note {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--secondary);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand .logo-text {
    color: white;
}

.footer-brand p {
    color: #A0AEC0;
    margin-top: 12px;
}

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

.footer-column h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: #CBD5E0;
}

.footer-column a {
    display: block;
    color: #A0AEC0;
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid #4A5568;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    color: #718096;
    font-size: 0.875rem;
}

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

    .hero-content {
        order: 1;
    }

    .hero-image {
        order: 2;
        display: flex;
        justify-content: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .phone-mockup {
        transform: none;
        max-width: 280px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sources-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .integration-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .integration-visual {
        max-width: 400px;
        margin: 0 auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

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

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

    .step-arrow {
        transform: rotate(90deg);
        margin: 0;
    }

    .sources-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 60px;
    }

    .btn-lg {
        padding: 14px 24px;
        width: 100%;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .sources-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ========================================
   Accessibility
   ======================================== */
/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}
