/* 
   ==========================================================================
   CSS Variables & Design System
   ========================================================================== 
*/
:root {
    /* Colors */
    --bg-color: #f3f3f3;
    --text-primary: #000000;
    --text-secondary: rgba(0, 0, 0, 0.8);
    --text-tertiary: rgba(0, 0, 0, 0.6);
    --accent-color: #f9bb51;
    --accent-hover: #e6a73d;
    --input-bg: #ffffff;
    --input-text: #545337;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Work Sans', sans-serif;
    
    /* Borders & Shadows */
    --border-radius: 8px;
    --shadow-sm: 0px 4px 4px 0px rgba(0, 0, 0, 0.05);
    --shadow-md: 0px 8px 16px 0px rgba(0, 0, 0, 0.08);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent body scroll, use column scroll */
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-body);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 
   ==========================================================================
   Layout — matches Figma frame 1440×900
   ========================================================================== 
*/
.page-container {
    position: relative;
    height: 100vh;
    overflow: hidden; 
    display: flex;
    flex-direction: row; /* Desktop 2-column layout */
}

/* Columns */
.left-column {
    flex: 1;
    width: 50%;
    height: 100%;
    overflow-y: auto; /* Scrollable left side */
    display: flex;
    flex-direction: column;
}

.right-column {
    flex: 1;
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden; /* Elegantly clip the overflowing dog image */
}

/* Header & Logo */
.header {
    padding: 40px 64px 0;
    z-index: 10;
    animation: fadeDown 0.8s ease-out;
}

.logo {
    width: 112px;
    height: 112px;
    object-fit: contain;
}

/* 
   ==========================================================================
   Main Content
   ========================================================================== 
*/
.main-content {
    padding: 93px 64px 0; /* 245px total from top (40 + 112 + 93) */
    width: 100%;
    max-width: 755px; /* 64px + 691px */
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 48px;
    flex: 1; /* Pushes features to bottom if screen is tall enough */
    animation: fadeUp 1s ease-out 0.2s both;
}

/* 
   ==========================================================================
   Typography & Hero Text
   ========================================================================== 
*/
.hero-text {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.headline {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 72px;
    line-height: 1.15;
    color: var(--text-primary);
    max-width: 629px;
}

.description {
    font-size: 28px;
    line-height: 1.15;
    color: var(--text-primary);
    opacity: 0.8;
}

.description strong {
    font-weight: 600;
}

.subscribe-text {
    font-size: 24px;
    line-height: 1.15;
    color: var(--text-tertiary);
}

/* 
   ==========================================================================
   Form — Multi-step Signup & Privacy Policy
   ========================================================================== 
*/
.signup-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signup-form {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px; /* Increased size */
    gap: 16px;
}

.input-step {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
    opacity: 1;
    transform: translateX(0);
}

.input-step.hidden {
    position: absolute;
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    visibility: hidden;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.form-input {
    background-color: var(--input-bg);
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    padding: 16px 28px; /* Increased padding */
    font-family: var(--font-body);
    font-size: 18px; /* Larger text */
    color: var(--input-text);
    width: 100%;
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: all var(--transition-fast);
}

.form-input::placeholder {
    color: #a0a090;
}

.form-input:focus {
    border-color: rgba(249, 187, 81, 0.4);
    box-shadow: 0 0 0 4px rgba(249, 187, 81, 0.1), var(--shadow-sm);
    transform: translateY(-1px);
}

.submit-btn {
    background-color: var(--accent-color);
    color: white;
    font-family: var(--font-body);
    font-size: 18px; /* Larger text */
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    padding: 16px 36px; /* Increased padding */
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

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

.submit-btn:active {
    transform: translateY(0);
}

.success-message {
    font-size: 18px;
    font-weight: 500;
    color: #4a7c59; /* A pleasing green */
    animation: fadeUp 0.5s ease-out;
    padding: 12px 0;
}

.privacy-policy {
    margin-top: 8px;
    margin-left: 2px;
    font-size: 14px;
    color: var(--text-tertiary);
    animation: fadeUp 1s ease-out 0.3s both;
}

.privacy-policy a {
    color: var(--text-tertiary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.privacy-policy a:hover {
    color: var(--text-primary);
}

/* 
   ==========================================================================
   Features
   ========================================================================== 
*/
.features {
    padding: 64px 64px 89px; /* Bottom padding keeps it off the very edge */
    display: flex;
    gap: 28px;
    align-items: flex-start;
    z-index: 10;
    animation: fadeUp 1s ease-out 0.4s both;
}

.feature-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

.feature-item:hover {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.feature-text {
    font-size: 16px;
    color: var(--text-tertiary);
}

/* 
   ==========================================================================
   Slider
   ========================================================================== 
*/
.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: var(--bg-color);
}

.slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dot.active {
    background-color: #ffffff;
    transform: scale(1.2);
}

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

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 
   ==========================================================================
   Responsive Design
   ========================================================================== 
*/
@media (max-width: 1024px) {
    html, body {
        height: auto;
        min-height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch; /* Restore momentum scrolling on iOS */
    }

    .page-container {
        height: auto;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    /* Stack columns vertically */
    .left-column, .right-column {
        width: 100%;
        height: auto;
        overflow: visible;
        flex: none;
    }

    .left-column {
        display: flex;
        flex-direction: column;
    }

    .main-content {
        position: relative;
        top: auto;
        left: auto;
        width: auto;
        padding: 180px 5% 40px;
        flex: 1; /* Pushes features and dog down if screen is tall */
    }

    .header {
        left: 5%;
    }

    .features {
        position: relative;
        bottom: auto;
        left: auto;
        padding: 0 5% 40px;
    }

    .headline {
        font-size: 3.5rem;
    }

    .description {
        font-size: 1.5rem;
    }

    .slider-container {
        height: 100%;
        animation: fadeUp 1s ease-out 0.4s both;
    }
}

@media (max-width: 768px) {
    .page-container {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        /* Removed overflow-x: hidden here as it can sometimes cause nested scroll clipping */
    }

    /* Removed Glass Overlay */

    /* Wrap content animations */
    .header, .main-content, .features {
        opacity: 0;
        animation: contentFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards !important;
    }
    
    @keyframes contentFadeIn {
        0% { opacity: 0; transform: translateY(20px); }
        100% { opacity: 1; transform: translateY(0); }
    }

    /* Disable individual desktop animations so they don't clash */
    .logo, .headline, .description, .subscribe-text, .signup-form, .feature-item, .privacy-policy {
        animation: none !important;
        transform: none !important;
        opacity: 1;
    }

    .header {
        position: relative;
        top: auto;
        left: auto;
        padding: 28px 5% 0;
        display: flex;
        justify-content: center;
        z-index: 20;
    }

    .main-content {
        padding: 40px 5%;
        z-index: 20;
        align-items: center;
        text-align: center;
    }

    .hero-text {
        align-items: center;
    }

    .headline {
        font-size: 2.5rem;
        max-width: 100%;
        text-align: center;
    }

    .description {
        font-size: 1.25rem;
        text-align: center;
    }

    .subscribe-text {
        font-size: 1.1rem;
        text-align: center;
    }

    .signup-container {
        align-items: center;
    }

    .signup-form {
        max-width: 100%;
    }
    
    .input-step {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
    }

    .form-input {
        width: 100%;
        text-align: center;
    }

    .submit-btn {
        width: 100%;
    }

    .features {
        gap: 20px;
        flex-wrap: wrap;
        padding: 0 5% 60px; /* Extra bottom padding for scroll */
        justify-content: center;
        z-index: 20;
    }

    .feature-item {
        align-items: center;
        text-align: center;
    }

    /* Slider stacks below content naturally with 1:1 aspect ratio */
    .right-column {
        position: relative;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        z-index: 1;
        opacity: 0;
        animation: sliderReveal 1s ease-out 0.2s forwards;
    }

    @keyframes sliderReveal {
        0% { opacity: 0; transform: translateY(20px); }
        100% { opacity: 1; transform: translateY(0); }
    }
}
