/* ========================================
   CSS Reset & Base Styles
   ======================================== */

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

:root {
    /* Brand Colors - Updated from design spec */
    --color-sage-green: #b8b587;
    --color-orange: #d18927;
    --color-off-white: #fff9ed;
    --color-dark-brown: #4d3525;
    --color-white: #ffffff;

    /* Typography */
    --font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Animation */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--color-white);
    background-color: var(--color-dark-brown);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ========================================
   Accessibility
   ======================================== */

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background-color: var(--color-orange);
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 1000;
    border-radius: 0 0 8px 0;
    transition: top var(--transition-fast);
}

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

/* Focus Indicators */
button:focus-visible,
a:focus-visible,
.step-indicator:focus-visible {
    outline: 3px solid var(--color-orange);
    outline-offset: 3px;
}

/* Remove outline for mouse users */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   Fixed Background
   ======================================== */

.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 768px) {
    .hero-background {
        width: 155%;
        height: 120vh;
        top: -10%;
        left: -27%;
    }

    .hero-background img {
        transform: scale(1, 1) rotate(15deg) translate(0%, 0%);
    }
}

/* ========================================
   Hero Section (Above the Fold)
   ======================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: var(--spacing-md);
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    padding-right: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: 'League Gothic', sans-serif;
    font-size: 6.5rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 0.2em;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-orange);
    margin-bottom: calc(var(--spacing-xl) + var(--spacing-lg));
    margin-top: calc(var(--spacing-lg) * -1);
    line-height: 1.4;
}

.hero-body-text {
    font-size: 1.25rem;
    color: var(--color-white);
    line-height: 1.4;
    margin-bottom: var(--spacing-md);
    margin-right: var(--spacing-sm);
    margin-left: var(--spacing-sm);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

.hero-footer-text {
    font-size: 1rem;
    color: var(--color-white);
    line-height: 1.6;
    margin-top: var(--spacing-md);
}

.hero-footer-text strong {
    text-decoration: underline;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    font-family: 'League Gothic', sans-serif;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border: 1px solid var(--color-white);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background-color: var(--color-orange);
    color: var(--color-white);
    border: 3px solid var(--color-white);
}

.btn-primary:hover {
    background-color: #b87320;
    border-color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(209, 137, 39, 0.4);
}

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

.btn-large {
    padding: 1.5rem 3rem;
    font-size: 1.75rem;
}

/* Frosted Glass Effect for How It Works Button */
#howItWorksBtn {
    background-color: rgba(255, 255, 255, 0);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#howItWorksBtn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   How It Works Section (Below the Fold)
   ======================================== */

.how-it-works-section {
    min-height: 100vh;
    padding: 0 var(--spacing-md);
    background-color: transparent;
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.how-it-works-container {
    max-width: 600px;
    position: relative;
    overflow: hidden;
    border: 1px white solid;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-radius: 12px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    color: var(--color-white);
    letter-spacing: 0.05em;
    /* margin-left: var(--spacing-sm);
    margin-right: var(--spacing-sm); */
    margin-bottom: var(--spacing-lg);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.2);
}

/* Step Indicators */
.step-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
}

.step-indicator {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--color-white);
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.step-indicator.active {
    background-color: var(--color-sage-green);
    border-color: var(--color-off-white);
}

.step-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
}

.step-line {
    width: 80px;
    height: 0;
    border-top: 2px dashed var(--color-white);
}

/* Step Content */
.step-content {
    display: none;
    text-align: center;
    animation: fadeIn var(--transition-slow);
    position: relative;
    /* margin-bottom: var(--spacing-md); */
}

.step-content.active {
    display: block;
}

.step-content:not(.active) {
    display: none !important;
    visibility: hidden;
}

.step-title {
    font-size: 3rem;
    font-weight: 400;
    color: var(--color-sage-green);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-family: 'League Gothic', sans-serif;
}

.step-cards-container {
    min-height: 200px;
    width: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
    position: relative;
    overflow: hidden;
}

.step-cards {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

/* Step 1 Card Slider */
#step1 .step-cards {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#step1 .card {
    position: absolute;
    opacity: 0;
    transform: translateX(100%);
    transition: none;
    left: 50%;
    margin-left: -200px; /* Half of card width (400px / 2) */
}

#step1 .card.active {
    opacity: 1;
    transform: translateX(0);
    animation: slideIn 0.25s ease-out;
}

#step1 .card.exiting {
    opacity: 0;
    transform: translateX(-100%);
    animation: slideOut 0.25s ease-out;
}

.card {
    background-color: var(--color-white);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-normal);
    will-change: transform, opacity;
    transform: translateZ(0); /* Force GPU acceleration */
    backface-visibility: hidden;
}

.card:hover {
    transform: scale(1.05);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-profile {
    border-radius: 12px;
    width: 360px;
    height: 180px;
}

.card-dish {
    width: 140px;
    height: 180px;
}

.step-description {
    font-size: 1.25rem;
    color: var(--color-white);
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-xs);
    min-height: 8rem;
    /* border: 1px solid var(--color-white); */
}

#step3 .step-cards-container {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}


/* ========================================
   Section Navigation Links
   ======================================== */

.next-section-link {
    position: absolute;
    bottom: var(--spacing-md);
    padding-bottom: var(--spacing-lg);
    /* left: 50%;
    transform: translateX(-50%); */
    color: var(--color-white);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    opacity: 0.7;
    transition: all var(--transition-normal);
    text-align: center;
    cursor: pointer;
    /* border: 1px solid var(--color-white); */
}

.next-section-link:hover {
    opacity: 1;
}

/* ========================================
   Section 4 & Section 5 (Full Height Sections)
   ======================================== */

.section-3-full,
.section-4-full,
.section-5-full {
    min-height: 100vh;
    padding: 0 var(--spacing-md);
    background-color: transparent;
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.section-full-container {
    max-width: 600px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px white solid;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: var(--spacing-sm);
    border-radius: 12px;
}

.section-description {
    font-size: 1.25rem;
    color: var(--color-white);
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
    /* border: 1px solid var(--color-white); */
}

.section-bullet-title {
    font-size: 3rem;
    font-weight: 400;
    color: var(--color-sage-green);
    font-family: 'League Gothic', sans-serif;
}

.section-bullet-text {
    font-size: 1.25rem;
    color: var(--color-white);
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-xs);
    padding-bottom: var(--spacing-md);
    /* border: 1px solid var(--color-white); */
}


/* ========================================
   Footer
   ======================================== */

.footer {
    background-color: rgba(77, 53, 37, 0.98);
    padding: var(--spacing-lg) var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--spacing-sm);
}

.footer-links {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--color-sage-green);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Animations
   ======================================== */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

/* Card Animations for Step 1 - Handled by JavaScript */

/* Card Animations for Step 2 */
#step2 .card {
    animation: fadeIn 0.8s ease-out;
}

#step2 .card:nth-child(1) {
    animation-delay: 0.4s;
    opacity: 0;
    animation-fill-mode: forwards;
}

#step2 .card:nth-child(2) {
    animation-delay: 1.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

#step2 .card:nth-child(3) {
    animation-delay: 2.0s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Step 3 Animation */
#step3 .btn-primary {
    animation: fadeIn 1s ease-out;
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .hero-section {
        padding: 0 var(--spacing-md) var(--spacing-lg);
        justify-content: center;
        align-items: flex-end;
    }

    .hero-content {
        padding-right: 0;
    }

    .hero-title {
        font-size: 5rem;
        margin-bottom: var(--spacing-xs);
    }

    .hero-subtitle {
        font-size: 1.75rem;
        margin-bottom: var(--spacing-lg);
        margin-top: calc(var(--spacing-sm) * -1);
    }

    .hero-body-text {
        font-size: 1.125rem;
    }

    .hero-buttons {
        margin-bottom: var(--spacing-md);
    }

    .btn {
        font-size: 1.25rem;
    }

    .how-it-works-section,
    .section-3-full,
    .section-4-full,
    .section-5-full {
        padding: 0 var(--spacing-md);
        justify-content: center;
        align-items: center;
    }

    .how-it-works-container {
        padding-right: 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-md);
    }

    .step-indicators {
        margin-bottom: var(--spacing-lg);
    }

    .step-title,
    .section-bullet-title {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }

    .step-cards-container {
        min-height: 180px;
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }

    .step-cards {
        flex-direction: row;
        gap: var(--spacing-sm);
    }

    .card-profile {
        width: 280px;
        height: 140px;
    }

    #step1 .card {
        margin-left: -140px; /* Half of tablet card width (280px / 2) */
    }

    .card-dish {
        width: 120px;
        height: 140px;
    }
}

/* Mobile (376px - 767px) */
@media (max-width: 767px) {
    .hero-section {
        padding: 0 var(--spacing-sm) var(--spacing-md);
        justify-content: center;
        align-items: flex-end;
    }

    .hero-content {
        text-align: center;
        padding-right: 0;
    }

    .hero-title {
        font-size: 5rem;
        letter-spacing: 0.1em;
        margin-bottom: var(--spacing-xs);
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
        margin-top: calc(var(--spacing-md) * -1);
    }

    .hero-body-text {
        font-size: 1.125rem;
    }

    .hero-buttons {
        flex-direction: row;
        gap: var(--spacing-sm);
        width: 100%;
        justify-content: center;
        margin-bottom: var(--spacing-md);
    }

    .btn {
        flex: 1;
        padding: 0.875rem 0.75rem;
        font-size: 1.125rem;
        white-space: nowrap;
    }

    .hero-footer-text {
        font-size: 1rem;
    }

    .how-it-works-section,
    .section-3-full,
    .section-4-full,
    .section-5-full {
        padding: 0 var(--spacing-sm);
        justify-content: center;
        align-items: center;
    }

    .how-it-works-container {
        padding-right: 0;
    }

    .section-title {
        font-size: 1.0rem;
        margin-bottom: var(--spacing-sm);
    }

    .step-indicators {
        gap: var(--spacing-xs);
        margin-bottom: var(--spacing-xs);
    }

    .step-indicator {
        width: 50px;
        height: 50px;
    }

    .step-number {
        font-size: 1.25rem;
    }

    .step-line {
        width: 40px;
    }

    .step-title,
    .section-bullet-title {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .step-cards-container {
        min-height: 120px;
        width: 100%;
        margin-bottom: var(--spacing-xs);
    }

    .step-cards {
        flex-direction: row;
        gap: var(--spacing-md);
    }

    .card-profile {
        width: 100%;
        max-width: 200px;
        height: 100px;
    }

    #step1 .card {
        margin-left: -100px; /* Half of mobile card width (200px / 2) */
    }

    .card-dish {
        width: 100%;
        max-width: 93px;
        height: 120px;
    }

    .step-description,
    .section-description,
    .section-bullet-text {
        font-size: 1rem;
    }

    #step3 .btn-large {
        padding: 1rem 2rem;
        font-size: 1.25rem;
    }

    .footer-links {
        flex-direction: row;
        gap: var(--spacing-xs);
    }

    .footer-separator {
        display: block;
    }

    .next-section-link {
        bottom: var(--spacing-sm);
        font-size: 0.875rem;
    }
}

/* Small Mobile (< 376px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 4.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-body-text {
        font-size: 1rem;
    }

    .hero-footer-text {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.0rem;
    }

    .step-cards {
        flex-direction: row;
        gap: var(--spacing-sm);
    }

    .step-title,
    .section-bullet-title {
        font-size: 2rem;
    }

    .step-description,
    .section-description,
    .section-bullet-text {
        font-size: 1rem;
    }

    .card-dish {
        width: 100%;
        max-width: 93px;
        height: 120px;
    }
}

/* ========================================
   Reduced Motion Accessibility
   ======================================== */

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

    /* Disable card slider animations */
    #step1 .card.active,
    #step1 .card.exiting {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
