/* Font Declarations */
@font-face {
    font-family: 'Figtree';
    src: url('fonts/Figtree/Figtree-SemiBold.woff2') format('woff2'),
         url('fonts/Figtree/Figtree-VariableFont_wght.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Antarctican Mono';
    src: url('fonts/Antarctican/AntarcticanMono-Book.woff2') format('woff2'),
         url('fonts/Antarctican/AntarcticanMono-Book.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Antarctican Mono', monospace, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #F9F6E8 url('backdrops/Natural Background_small.webp') center center / cover no-repeat fixed;
    color: #000;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
    width: 100%;
    max-width: 100vw;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60vh;  /* Vignette covers top 60% of viewport */
    background: linear-gradient(
        to bottom, 
        rgba(249, 246, 232, 0.9) 0%,
        rgba(249, 246, 232, 0.7) 30%,
        rgba(249, 246, 232, 0.4) 60%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 0;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 24px 0 24px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header/Brand */
.brand {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    cursor: default;
}

.brand-logo {
    height: 64px;
    width: auto;
    transition: transform 0.3s ease;
}

.brand:hover .brand-logo {
    transform: scale(1.05);
}

.brand-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.brand-name {
    font-family: 'Figtree', sans-serif;
    font-size: 24px;
    font-weight: 600;
}

.tagline {
    font-family: 'Antarctican Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 64px;
    margin-bottom: 32px;
}

/* Content Grid - switches to horizontal on desktop */
.content-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;  /* Reduced gap on mobile for tighter layout */
    align-items: center;  /* Center children on mobile */
}

/* Text Section */
.text-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;  /* Left-aligned text on mobile */
    text-align: left;         /* Left-aligned text content on mobile */
}

.problem-statement {
    font-family: 'Figtree', sans-serif;
    font-size: clamp(44px, 10vw, 80px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.accent-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.accent-statement {
    font-family: 'Figtree', sans-serif;
    font-size: clamp(28px, 6vw, 52px);
    font-weight: 600;
    line-height: 1.2;
    background: linear-gradient(90deg, #FF6B6B 0%, #FFB366 25%, #FFA07A 50%, #FF6B6B 75%, #FF6B6B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 100%;
    flex-shrink: 0;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Rotating Feature Text */
.feature-carousel {
    position: relative;
    height: 48px;
    overflow: hidden;
    flex: 1;
    min-width: 250px;
    max-width: 100%;
}

.feature-item {
    font-family: 'Antarctican Mono', monospace;
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 400;
    line-height: 48px;
    letter-spacing: -0.01em;
    opacity: 0;
    position: absolute;
    width: 100%;
    left: 0;
    top: 48px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.feature-item.active {
    opacity: 1;
    top: 0;
}

.feature-item.exiting {
    opacity: 0;
    top: -48px;
}

/* Can Section */
.can-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    position: relative;
    overflow: visible;
    margin-top: -100px;  /* Slight overlap - animation creates the effect */
}

.can {
    width: 120px;  /* ← MOBILE SIZE: Change this number to adjust can size on phones */
    height: auto;
    max-width: 75%;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s ease, transform 1s ease;
    filter: drop-shadow(0 32px 64px rgba(0, 0, 0, 0.12)) 
            drop-shadow(0 12px 32px rgba(0, 0, 0, 0.08));
    position: relative;
    z-index: 10;  /* Ensures can appears above text */
}

.can.visible {
    opacity: 1;
    transform: translateY(0);
    animation: canFloat 4s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes canFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Email Form - Wrapper (Place at bottom of HTML) */
.email-form-wrapper {
    position: relative;
    padding-top: 60px;
    padding-bottom: 60px;
    min-height: 300px;
}

/* Unified: Sticky at bottom on all devices */
.email-form-container {
    /* 1. Positioning & Centering (No transform needed) */
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    margin: 0 auto; /* This centers it horizontally */
    z-index: 100;
    
    /* 2. Sizing */
    width: fit-content;
    max-width: 640px;
    
    /* 3. Premium Liquid Glass Effect */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0.05)
    );
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
    
    /* 4. Safari & Desktop Edge Fixes */
    overflow: hidden;
    /* These two lines stop the blur from bleeding outside the border-radius */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    /* Helps with rendering performance and sharpness */
    transform: translateZ(0); 
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Optional: Subtle reflection effect */
.email-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    pointer-events: none;
    z-index: -1;
}

/* When form reaches its natural position (Docked state) */
.email-form-container.docked {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    
    /* Maintain strict sizing in docked mode */
    width: calc(100% - 40px); 
    max-width: 640px;
    margin: 0 auto;
    
    transform: none;
}

/* Fallback for Firefox/Browsers without backdrop-filter */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .email-form-container {
        background: rgba(255, 255, 255, 0.95);
    }
}

/* Fallback for Firefox without backdrop-filter support */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .email-form-container {
        background: rgba(255, 255, 255, 0.85);
    }
}

.form-title {
    font-family: 'Figtree', sans-serif;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 16px 0;
}

.email-form {
    background: rgba(220, 220, 220, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 500px;
    margin: 0 auto;
}

.email-form:hover {
    transform: translateY(-2px);
    background: rgba(220, 220, 220, 0.45);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.15),
        0 10px 28px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.form-label {
    font-family: 'Antarctican Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0.7;
}

.email-input {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #FFFFFF;
    transition: all 0.2s ease;
    font-family: inherit;
    cursor: pointer;
}

.email-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.email-input.error {
    border-color: #DC2626;
    background: rgba(220, 38, 38, 0.02);
    animation: shake 0.4s ease;
}

.email-input.error:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.email-input.success {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.02);
}

.email-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.submit-btn {
    font-family: 'Antarctican Mono', monospace;
    width: 100%;
    padding: 16px 32px;
    background: #000;
    color: #FFF;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.submit-btn.loading {
    color: transparent;
    pointer-events: none;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FFF;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes ripple {
    to { transform: scale(2); opacity: 0; }
}

/* Focus visible for keyboard navigation */
.submit-btn:focus-visible,
.email-input:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.error-message {
    font-family: 'Antarctican Mono', monospace;
    font-size: 11px;
    color: #DC2626;
    margin-top: 4px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease;
}

.error-message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Desktop Layout */
@media (min-width: 768px) {
    .container {
        padding: 48px 64px 40px 64px;
    }

    .content-grid {
        flex-direction: row;
        align-items: center;
        gap: 80px;
    }

    .text-section {
        flex: 1.2;
        align-items: flex-start;  /* Left-align text on desktop */
        text-align: left;         /* Left-align text content on desktop */
    }

    .accent-row {
        flex-wrap: nowrap;  /* Don't wrap on desktop */
    }

    .feature-carousel {
        min-width: 300px;  /* More space on desktop */
    }

    .can-section {
        flex: 0.8;
        min-height: 500px;
        margin-top: 0;  /* Remove overlap on desktop - side by side layout */
    }

    .can {
        width: 160px;  /* ← TABLET SIZE (768px+): Adjust this for tablets/small desktops */
        max-width: 100%;
    }

    .email-form-wrapper {
        max-width: 640px;
        margin: 0 auto;
        padding-top: 80px;
        padding-bottom: 80px;
    }

    .email-form {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-end;
        padding: 24px;
        gap: 12px;
    }

    .form-title {
        width: 100%;
        margin-bottom: 12px;
    }

    .form-group {
        flex: 1;
    }

    .submit-btn {
        width: auto;
        padding: 16px 48px;
        white-space: nowrap;
    }
}

@media (min-width: 1200px) {
    .problem-statement {
        font-size: 88px;
    }

    .accent-statement {
        font-size: 56px;
    }

    .can {
        width: 190px;  /* ← DESKTOP SIZE (1200px+): Adjust this for large screens */
        max-width: 100%;
    }
}

/* Fade-in animation classes (to be applied via JS) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth entrance delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 24px;
    background: #000;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Antarctican Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    z-index: 10000;
    transition: top 0.2s ease;
}

.skip-to-content:focus {
    top: 24px;
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Hover effect on carousel - pause on hover */
.feature-carousel:hover .feature-item {
    animation-play-state: paused;
}

/* Scrolling Ingredients Banner */
.ingredients-banner {
    background: #2F3119;
    color: #F9F6E8;
    padding: 20px 0;
    overflow: hidden;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    will-change: transform;
}

/* Hide banner initially on mobile until scrolled */
@media (max-width: 767px) {
    .ingredients-banner {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .ingredients-banner.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-track {
    display: flex;
    width: fit-content;
    animation: marquee 40s linear infinite;
}

.banner-track:hover {
    animation-play-state: paused;
}

.banner-text {
    font-family: 'Antarctican Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-block;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Feature Pills Section */
.features-section {
    padding: 60px 24px 80px 24px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.features-header {
    font-family: 'Figtree', sans-serif;
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    color: #000;
}

.features-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    max-width: 500px;
    margin: 0 auto;
}

.feature-pill-btn {
    width: 100%;
    background: rgba(220, 220, 220, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 20px 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.feature-pill-btn:hover {
    transform: translateY(-4px);
    background: rgba(220, 220, 220, 0.45);
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.feature-pill-btn:active {
    transform: translateY(-2px);
}

.feature-pill-btn:focus-visible {
    outline: 2px solid #000;
    outline-offset: 4px;
}

.feature-title {
    font-family: 'Antarctican Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: #000;
    text-align: center;
}

@media (min-width: 768px) {
    .features-section {
        padding: 80px 64px 100px 64px;
    }

    .features-header {
        font-size: 40px;
        margin-bottom: 48px;
    }

    .features-container {
        flex-direction: row;
        gap: 20px;
        max-width: 900px;
    }

    .feature-pill-btn {
        padding: 24px 40px;
    }

    .feature-title {
        font-size: 15px;
    }
}

/* Feature Modals */
.feature-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px) brightness(1.1);
    -webkit-backdrop-filter: blur(16px) brightness(1.1);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    padding: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-modal.active {
    display: flex;
    opacity: 1;
}

.feature-modal-content {
    background: rgba(230, 230, 230, 0.4);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px 20px 0 0;
    padding: 48px 32px 40px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 
        0 -20px 60px rgba(0, 0, 0, 0.2),
        0 -8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
}

.feature-modal.active .feature-modal-content {
    transform: translateY(0);
}

.feature-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.4);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.feature-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.8);
}

.feature-modal-close:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.feature-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-modal-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.feature-modal-image img {
    width: 100%;
    height: auto;
    display: block;
}

.feature-modal-title {
    font-family: 'Figtree', sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: #000;
}

.feature-modal-subtitle {
    font-family: 'Antarctican Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 400;
    margin: -8px 0 0 0;
}

.feature-modal-text {
    font-family: 'Antarctican Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(0, 0, 0, 0.85);
    font-weight: 400;
    margin: 0;
}

/* Desktop Modal Styles */
@media (min-width: 768px) {
    .feature-modal {
        align-items: center;
        padding: 24px;
    }

    .feature-modal-content {
        border-radius: 20px;
        max-width: 600px;
        box-shadow: 
            0 30px 80px rgba(0, 0, 0, 0.2),
            0 12px 32px rgba(0, 0, 0, 0.1),
            inset 0 1px 1px rgba(255, 255, 255, 0.6);
    }

    .feature-modal-title {
        font-size: 32px;
    }

    .feature-modal-subtitle {
        font-size: 15px;
    }

    .feature-modal-text {
        font-size: 14px;
    }
}

