/* FONT-FACE DECLARATIONS */
@font-face {
    font-family: 'LibreBaskerville-Regular';
    src: url('LibreBaskerville-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'LibreBaskerville-Bold';
    src: url('LibreBaskerville-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'LibreBaskerville-Italic';
    src: url('LibreBaskerville-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Inter-Regular';
    src: url('Inter-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Inter-SemiBold';
    src: url('Inter-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}


/* THEME COLORS */
:root {
    --primary: #109DF0;
    --primary-light: #e6f4fd;
    --secondary: #7a8c99;
    --accent: #9253E0;
    --background: #eeece5;
    --white: #FFFFFF;
    --black: #000000;
    --text-dark: #27241F;
    --text-light: #FFFFFF;
    --text-subtle: #a8a29e;
    --surface: #f0f0f0;
    --disabled: #cccccc;
    --light-gray: #5C6B73;
    --gray: #5C6B73;
    --dark-gray: #5C6B73;
    --error: #D32F2F;
    --error-light: #fdecea;
    --error-background: #FFEBEE;
    --success: #2E7D32;
    --success-dark: #1b4b1e;
    --success-light: #dcfce7;
    --warning: #FFA000;
    --divider: #e6e0d9;
    --text-muted: #8e8e8e;
    --google-blue: #4285F4;
}

/* General Reset & Base Styles */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter-Regular', sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    height: 100%;
    display: flex;
    flex-direction: column;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Navigation */
header {
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0 20px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header-container {
    display: none;
}

nav {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end; /* Right align the navigation */
    align-items: center;
    height: 80px; /* Increased height */
    padding-right: 20px; /* Add some padding from the edge */
}

.logo img {
    height: 24px; /* Adjust as needed */
    width: auto;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 10px 15px;
    display: block;
    border-bottom: 2px solid transparent;
    font-family: 'Inter-SemiBold';
    font-size: 16px;
}

nav ul li a.active,
nav ul li a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Main Content Area */
main {
    flex-grow: 1;
    padding-top: 80px; /* Account for fixed header */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center tab content */
    box-sizing: border-box;
    overflow: visible; /* Allow scrolling */
}

.tab-content {
    display: none; /* Hidden by default */
    width: 100%;
    max-width: 800px; /* Max width for content sections */
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block; /* Shown when active */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header Logo */
#meez-logo-header {
    display: none; /* Hide the duplicate header logo */
}

/* Main Meez Logo */
#meez-logo {
    display: block;
    margin: 80px auto 20px auto; /* Reduced top margin from 124px to 80px */
    width: 300px; /* Wider for rectangular logo */
    height: 80px; /* Much shorter height for rectangular logo */
    object-fit: contain; /* Maintains aspect ratio */
}

/* Home Section Specifics */
.input-container {
    text-align: center;
    padding: 20px 20px 40px 20px;
    display: block; /* Changed from flex to block */
    padding-top: 0; /* Remove top padding since logo now has margin-top */
    box-sizing: border-box;
}

#email-form {
    display: flex;
    width: 500px; /* Fixed width instead of 100% */
    max-width: 90%; /* Responsive fallback */
    margin: 0 auto 20px auto; /* Center the form */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

#email-input {
    flex-grow: 1;
    padding: 15px 20px;
    font-size: 16px; /* from bodyText */
    font-family: 'Inter-Regular', sans-serif;
    border: 1px solid var(--light-gray);
    border-right: none;
    border-radius: 8px 0 0 8px;
    outline: none;
    background-color: var(--white);
    color: var(--text-dark);
}

#email-input::placeholder {
    color: var(--dark-gray);
}

#email-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(16, 157, 240, 0.25);
}

#email-form button {
    padding: 15px 25px;
    font-size: 16px; /* from bodyStrongText */
    font-family: 'Inter-SemiBold', sans-serif;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    transition: background-color 0.2s ease;
}

#email-form button:hover {
    background-color: #0d8bd9; /* Darker shade of primary blue */
}

#email-form button:disabled {
    background-color: var(--disabled);
    cursor: not-allowed;
    opacity: 0.6;
}

#email-input:disabled {
    background-color: var(--disabled);
    cursor: not-allowed;
    opacity: 0.6;
}

#thank-you-message {
    text-align: center;
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: var(--success-light);
    border: 1px solid var(--success);
    border-radius: 8px;
    color: var(--success-dark);
    font-family: 'Inter-Regular', sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.tagline-container {
    text-align: center;
    padding-bottom: 5px; /* Further reduced padding */
    margin-top: 24px; /* Move tagline and everything below it down by 24px */
}

.main-tagline {
    font-family: 'Inter-SemiBold';
    font-size: 48px; /* Much larger */
    color: var(--text-dark);
    margin-bottom: 5px; /* Minimal spacing */
    line-height: 52px; /* Adjusted for larger text */
    max-width: 800px; /* Very wide to ensure text fits naturally */
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 52px;
    background-color: var(--text-dark);
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.sub-tagline {
    font-family: 'Inter-Regular';
    font-size: 36px; /* Increased by 12px from 24px */
    color: var(--text-dark);
    opacity: 0.7;
    max-width: 400px; /* Increased for larger text */
    margin: 53px auto 15px auto; /* Increased top margin by 48px (5px + 48px = 53px) */
}

.grocery-list-header {
    text-align: left;
    margin-bottom: 40px;
    padding: 25px 30px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.08),
        0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}





.grocery-list-subtitle {
    font-family: 'Inter-Regular', sans-serif;
    font-size: 16px;
    color: var(--text-subtle);
    margin: 0;
    opacity: 0.8;
    font-weight: 400;
    letter-spacing: 0.2px;
    text-transform: lowercase;
}

.shopping-cart-icon {
    display: none; /* Remove the icon for handwritten style */
}

.features-text {
    font-family: 'Inter-Regular';
    font-size: 22px; /* Bigger font */
    color: var(--text-dark);
    opacity: 0.8;
    max-width: 800px; /* Back to original */
    margin: 96px auto 192px auto; /* 96px margin below heading, 192px margin below the last checklist item */
    text-align: left; /* Left align the text within the centered container */
    line-height: 1.8;
    position: relative; /* For typewriter cursor positioning */
}

.feature-bullet {
    margin-bottom: 16px; /* Increased spacing between bullets */
    position: relative;
    display: flex;
    align-items: center;
    min-height: 28px; /* Increased height for better spacing */
    padding-left: 150px; /* Move checkboxes more to the right */
    max-width: 600px; /* Constrain width for better centering */
    margin-left: auto;
    margin-right: auto;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--secondary);
    border-radius: 4px;
    background: transparent;
    margin-right: 16px;
    opacity: 0; /* Start hidden */
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent checkbox from shrinking */
    cursor: pointer;
    position: relative;
}

.checkbox.visible {
    opacity: 1;
}

.checkbox:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 157, 240, 0.1);
}

.bullet-text {
    flex: 1;
    line-height: 1.8; /* Increased line height for better spacing */
    opacity: 0; /* Start hidden */
    font-family: 'Inter-SemiBold', sans-serif;
    font-size: 20px;
    color: var(--text-dark);
}

.bullet-text.visible {
    opacity: 1;
}

.checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
    position: relative;
    box-shadow: 0 2px 8px rgba(16, 157, 240, 0.3);
}

.checkbox.checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}



/* Chef's handwriting cursor */
.chef-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em; /* Match the line height of the text */
    background: linear-gradient(to bottom, var(--primary), var(--primary-light));
    margin-left: 3px;
    border-radius: 1px;
    animation: chef-blink 1.2s infinite;
    box-shadow: 0 0 4px rgba(16, 157, 240, 0.3);
    vertical-align: text-bottom; /* Align with text baseline */
}

.home-cooks-tagline {
    font-family: 'Inter-Regular', sans-serif;
    font-size: 16px;
    text-align: center;
    color: var(--text-dark);
    line-height: 26px;
    margin: 24px auto 36px auto; /* 36px margin below the tagline */
    max-width: 600px;
    opacity: 0; /* Start hidden for animation */
}

@keyframes chef-blink {
    0%, 50% { opacity: 1; transform: scaleY(1); }
    51%, 100% { opacity: 0.3; transform: scaleY(0.8); }
}


/* QR Code Container - Assuming this is still needed */
#qr-code-container {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
}

#qr-code-img {
    max-width: 200px;
    height: auto;
    margin-top: 10px;
    border: 1px solid #eee;
}

/* "What is this?" Section */
.whatisthis-container {
    padding: 40px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.whatisthis-container h2,
.whatisthis-container h3 {
    font-family: 'Inter-SemiBold', sans-serif;
    font-size: 32px; /* Same size for all headings */
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.2;
}

.whatisthis-container h3 {
    margin-top: 40px; /* Extra spacing for h3 */
}

.whatisthis-container p,
.whatisthis-container ol {
    font-family: 'Inter-Regular', sans-serif;
    font-size: 20px; /* bodyText */
    color: var(--text-dark);
}

.whatisthis-container ol {
    padding-left: 20px;
}

.whatisthis-container ol li {
    margin-bottom: 10px;
    font-family: 'Inter-Regular', sans-serif; /* Same font as paragraph text */
}

.whatisthis-container a {
    color: var(--primary);
    text-decoration: none;
    font-family: 'Inter-SemiBold';
}

.whatisthis-container a:hover {
    text-decoration: underline;
}

.whatisthis-container em {
    font-family: 'Inter-Regular';
    font-style: italic;
}

/* Loading Steps Animation */
#loading-steps {
    margin: 30px auto 0; /* Center the block */
    width: 420px; /* Fixed width for the container */
    max-width: 100%; /* Responsive guard for small screens */
    display: none; /* Controlled by JS */
    padding-left: 42px; /* Nudge content to the right */
    box-sizing: border-box; /* Keep width consistent */
}

.step-item {
    display: flex; /* Use flex to align check and text */
    align-items: center;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInStep 0.5s ease-out forwards;
}

@keyframes fadeInStep {
    to {
        opacity: 1;
    }
}

.step-check {
    width: 28px; /* Increased from 24px */
    height: 28px; /* Increased from 24px */
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    margin-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-weight: bold;
    flex-shrink: 0;
    transition: all 0.3s ease-in-out;
}

.step-check.done {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.step-check.done::before {
    content: '✓';
}

.step-text {
    text-align: left; /* Keep text inside the item left-aligned */
}

.step-text .label {
    font-family: 'Inter-SemiBold', sans-serif;
    font-size: 18px; /* Increased from 16px */
    color: var(--text-dark);
    line-height: 1.2;
}

.step-text .subtext {
    font-family: 'Inter-Regular', sans-serif;
    font-size: 15px; /* Increased from 14px */
    color: var(--gray);
    padding-top: 4px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    nav {
        flex-direction: row;
        height: 60px;
        padding: 10px 20px;
    }

    main {
        padding-top: 80px;
    }

    .whatisthis-container {
        padding: 20px;
    }

    /* Fix checklist on tablets */
    .feature-bullet {
        padding-left: 50px; /* Reduce padding on tablets */
        max-width: 90%;
    }

    .features-text {
        margin: 60px auto 120px auto; /* Reduce margins on tablets */
        max-width: 90%;
    }

    .main-tagline {
        font-size: 36px;
        line-height: 40px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 20px;
        height: 60px;
    }

    nav ul {
        display: block; /* Show navigation on mobile */
        margin: 0;
        padding: 0;
        list-style: none;
    }

    nav ul li {
        margin: 0;
        padding: 0;
    }

    nav ul li a {
        font-size: 14px; /* Smaller text for mobile */
        padding: 8px 12px;
        display: block;
    }

    main {
        padding-top: 60px;
    }

    .input-container {
        padding: 20px;
        padding-top: 20px;
        min-height: auto; /* Remove fixed height */
    }

    /* Fix logo size on mobile */
    #meez-logo {
        width: 150px;
        height: 60px;
        margin: 30px auto 15px auto;
    }

    /* Fix main tagline on mobile */
    .main-tagline {
        font-size: 24px;
        line-height: 28px;
        max-width: 95%;
        margin-bottom: 10px;
    }

    /* Fix checklist on mobile - this is the main issue! */
    .feature-bullet {
        padding-left: 20px; /* Back to original mobile padding */
        max-width: 95%;
        margin-bottom: 12px;
        display: flex;
        align-items: center; /* Center align since it's always 1 line */
    }

    .checkbox {
        flex-shrink: 0;
        margin-right: 10px;
        width: 16px; /* Smaller checkbox on mobile */
        height: 16px; /* Smaller checkbox on mobile */
    }

    .checkbox.checked::after {
        font-size: 12px; /* Smaller checkmark on mobile */
    }

    .bullet-text {
        font-size: 12px; /* Even smaller font on mobile */
        line-height: 1.4; /* Tighter line height for smaller text */
        flex: 1;
    }

    .features-text {
        margin: 30px auto 60px auto; /* Even smaller margins on mobile */
        max-width: 95%;
        font-size: 16px; /* Smaller font on mobile */
    }

    /* Fix email form on mobile */
    #email-form {
        margin: 0 auto 20px auto;
        width: 95%;
        position: relative; /* Ensure stable positioning */
    }

    #email-input {
        font-size: 12px; /* Even smaller text to fit better on mobile */
        padding: 12px 16px;
    }

    #email-form button {
        font-size: 12px; /* Even smaller text to fit better on mobile */
        padding: 12px 16px;
        white-space: nowrap; /* Prevent text wrapping */
    }

    /* Fix headings on mobile */
    .whatisthis-container h2,
    .whatisthis-container h3 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .whatisthis-container h3 {
        margin-top: 30px;
    }

    .whatisthis-container p,
    .whatisthis-container ol {
        font-size: 16px;
        line-height: 1.5;
    }

    .home-cooks-tagline {
        font-size: 14px;
        line-height: 20px;
        margin: 20px auto 36px auto; /* 36px margin below on mobile too */
    }
}

/* Footer Styles */
footer {
    background-color: var(--white);
    border-top: 1px solid #e0e0e0;
    padding: 20px 0;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.footer-container a {
    color: var(--text-dark);
    text-decoration: none;
    font-family: 'Inter-Regular', sans-serif;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.footer-container a:hover {
    opacity: 1;
    color: var(--primary);
}

.footer-separator {
    color: var(--text-dark);
    opacity: 0.3;
    margin: 0 10px;
    font-size: 14px;
} 