/* =========================================
   1. VARIABLES & SETTINGS
   ========================================= */
:root {
    /* Colors - Palette defined for "Latte", "Cream", "Beige" */
    --color-bg: #FDFcF8;
    /* Soft Off-White/Cream */
    --color-text-main: #2A2826;
    /* Soft Black/Charcoal */
    --color-text-muted: #6B665F;
    /* Muted Earthy Brown */
    --color-accent-latte: #C7B299;
    /* Latte */
    --color-glass-border: rgba(255, 255, 255, 0.4);
    --color-glass-bg: rgba(253, 252, 248, 0.7);

    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;

    /* Spacing & Layout - Golden Ratio Bases */
    --spacing-unit: 8px;
    --spacing-sm: calc(var(--spacing-unit) * 2);
    /* 16px */
    --spacing-md: calc(var(--spacing-unit) * 5);
    /* 40px */
    --spacing-lg: calc(var(--spacing-unit) * 10);
    /* 80px */
    --spacing-xl: calc(var(--spacing-unit) * 15);
    /* 120px */

    /* Animation defaults */
    --anim-ease: cubic-bezier(0.25, 1, 0.5, 1);
    /* Soft "Whisper" ease */
    --anim-duration: 0.8s;
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* =========================================
   3. TYPOGRAPHY (High-Fashion)
   ========================================= */
h1,
h2,
h3,
.serif {
    font-family: var(--font-serif);
    font-weight: 400;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-md);
}

.hero-title .italic {
    font-style: italic;
    font-weight: 400;
}

.section-title {
    font-size: 2.5rem;
    letter-spacing: 0.05em;
    font-weight: 300;
}

.btn-text,
.nav-links a {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.75rem;
    /* 12px */
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* =========================================
   4. COMPONENTS & UTILITIES
   ========================================= */
/* Noise Texture */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Glassmorphism Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0 40px;
    /* Removed vertical padding completely */
    z-index: 100;
    background: var(--color-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-glass-border);
    transition: padding 0.3s ease;
    height: 100px;
    /* Explicit navbar height */
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 100%;
    /* Fill the container height */
    width: auto;
    /* Maintain aspect ratio */
    max-width: none;
    display: block;
    object-fit: contain;
    transform: scale(2);
    /* Reduced zoom further for natural balance */
    transform-origin: left center;
    mix-blend-mode: multiply;
    /* Keep transparency fix */
    margin-left: 0;
    /* Reset margin as scale is smaller */
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

/* refined nav link animations */
.nav-links a {
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--color-text-main);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* refined primary button animations */
/* refined primary button animations (Hero & Cart) - Option 3 Modified: Solid Latte + Dark Line Draw */
.btn-primary {
    padding: 14px 32px;
    background-color: var(--color-accent-latte);
    /* Latte Base (Beige) */
    color: #fff;
    /* White text */
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;

    /* Drawing Borders using Gradients (Dark Charcoal for contrast) */
    background-repeat: no-repeat;
    background-image:
        linear-gradient(var(--color-text-main), var(--color-text-main)),
        /* Top */
        linear-gradient(var(--color-text-main), var(--color-text-main)),
        /* Right */
        linear-gradient(var(--color-text-main), var(--color-text-main)),
        /* Bottom */
        linear-gradient(var(--color-text-main), var(--color-text-main));
    /* Left */

    background-size: 0% 1px, 1px 0%, 0% 1px, 1px 0%;
    background-position: top left, top right, bottom right, bottom left;
    transition: background-size 0.5s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
    /* Removed letter-spacing transition to prevent "buggy" jitter */
}

/* Remove old pseudo-elements */
.btn-primary::before {
    display: none;
}

.btn-primary:hover {
    background-size: 100% 1px, 1px 100%, 100% 1px, 1px 100%;
    /* Removed letter-spacing expansion so the borders draw smoothly on a stable box */
}

/* Specific Override for Navigation Button (Keep size but restore animation) */
.glass-nav .btn-primary {
    padding: 12px 24px;
}


/* =========================================
   5. LAYOUT: HERO SECTION (60/40 Split)
   ========================================= */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    /* Nav height */
}

.hero-content {
    width: 60%;
    padding: 0 10%;
    z-index: 2;
}

.hero-subtitle {
    margin-top: 20px;
    margin-bottom: 40px;
    /* Fix overlap with button */
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.hero-visual {
    position: absolute;
    right: 0;
    top: 0;
    width: 45%;
    /* Overlap slightly or push to edge */
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.parallax-image {
    width: 100%;
    height: 120%;
    /* For parallax movement */
    background-size: cover;
    background-position: center;
}

/* =========================================
   6. LAYOUT: 3x3 GRID SYSTEM
   ========================================= */
.grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* grid-template-rows: repeat(3, auto); - Defined by content */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.grid-cell {
    padding: var(--spacing-md);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 450px;
    /* Taller cells for premium feel */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    /* Fix for absolute children */
}

.mood-section .grid-cell {
    min-height: 600px;
    /* Luxurious grand height exclusively for the main image blocks */
}

/* =========================================
   7. ANIMATIONS: REVEAL & MASK
   ========================================= */
/* Block Reveal (for Titles) */
.block-reveal {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--anim-ease), transform 1s var(--anim-ease);
}

.block-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.block-reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.block-reveal:nth-child(3) {
    transition-delay: 0.4s;
}

/* Mask Reveal (for Images) */
.reveal-image {
    position: relative;
    overflow: hidden;
}

.reveal-image img {
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* ensures it stays centered as it stretches */
}

.reveal-image.active img {
    opacity: 1;
    transform: scale(1);
}

/* =========================================
   8. CONTENT SECTIONS
   ========================================= */
.section-padding {
    padding: var(--spacing-xl) 0;
}

.grid-3x3 {
    width: 100%;
    margin-top: var(--spacing-lg);
}

/* Floating Animation (Hero Product) */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-visual {
    position: absolute;
    right: 0;
    top: 0;
    width: 45%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    background: transparent;
    animation: float 6s ease-in-out infinite;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .glass-nav {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
        /* Simple mobile menu hide for now */
    }

    .hero-section {
        flex-direction: column;
        padding-top: 120px;
        text-align: center;
    }

    .hero-content {
        width: 100%;
        padding: 0 20px;
        margin-bottom: 40px;
    }

    .hero-visual {
        position: relative;
        width: 100%;
        height: 50vh;
        animation: none;
        /* Disable float on mobile for performance/layout stability */
    }

    .grid-3x3 {
        display: flex;
        flex-direction: column;
    }

    .grid-cell {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        min-height: auto;
        /* Reset massive heights on mobile */
    }

    .mood-section .grid-cell {
        min-height: auto;
        /* Ensure no luxury 500px gap exists on mobile text */
        padding: 40px 20px;
    }

    .mood-section .image-cell {
        min-height: 450px;
        /* Force staging height over .grid-cell's auto reset */
    }

    /* Stack Text -> Image on Mobile */
    .motor-text {
        order: 4;
    }

    .motor-img {
        order: 5;
    }

    .text-cell {
        padding: 40px 20px;
    }
}

.text-cell {
    grid-column: span 1;
    padding: 60px;
}

.image-cell {
    grid-column: span 2;
    background-color: #f0ede6;
    /* Placeholder color */
    position: relative;
    overflow: hidden;
    padding: 0;
    /* Fix: Remove padding for full-bleed images */
}

.image-cell>div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Remove problematic nested wrapper max-width that causes floating bugs */
/* Desktop Layout explicit ordering */
@media (min-width: 769px) {
    .motor-img {
        order: 4;
    }

    .motor-text {
        order: 5;
    }
}

/* =========================================
   9. PRODUCT & INVESTMENT SECTION
   ========================================= */
.product-card {
    transition: background-color 0.3s ease;
}

.product-card:hover {
    background-color: #fafbf6;
}

.product-thumb {
    margin-bottom: 20px;
    background: transparent;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-thumb img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.6s ease;
}

.product-card:hover .product-thumb img {
    transform: scale(1.05);
}

.investment-section {
    background-color: #F8F6F2;
    padding: 100px 10%;
}

.split-layout {
    display: flex;
    align-items: center;
    gap: 80px;
}

.visual-side {
    flex: 1;
    position: relative;
}

.visual-side img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

.floating-sheet {
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background: white;
    transform: perspective(1000px) rotateY(15deg) rotateX(2deg) rotateZ(2deg);
    transition: transform 0.5s ease;
}

/* Specifically tilt the first image (hero) to the left */
.hero-visual .floating-sheet {
    transform: perspective(1000px) rotateY(-15deg) rotateX(2deg) rotateZ(-2deg);
}

.content-side {
    flex: 1;
}

.investment-section .visual-side {
    align-self: flex-start;
    margin-top: 110px; /* Aligns the center of the image exactly between the 'Foglald le' text and the decorative line */
}

@media (max-width: 768px) {
    .investment-section .visual-side {
        align-self: center;
        margin-top: 0;
    }
}

.content-side .description {
    margin: 20px 0 40px;
    color: var(--color-text-muted);
}

.price-block {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.price-block .currency {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.price-block .amount {
    font-size: 2.5rem;
    font-family: var(--font-serif);
}

.features-list {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.features-list .check {
    color: var(--color-accent-latte);
    margin-right: 5px;
}

/* Magnetic Button Styles */
.magnetic-btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 2px;
    /* Slight roundness */
}

.magnetic-btn span {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.reviews-section {
    display: flex;
    flex-wrap: wrap;
    padding: var(--spacing-xl) 10%;
    gap: var(--spacing-md);
    background-color: #faf9f5;
}

.review-card {
    background: white;
    padding: var(--spacing-md);
    flex: 1 1 300px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.03);
    border-radius: 2px;
}

.review-quote {
    font-size: 1.1rem;
    font-family: var(--font-serif);
    font-style: italic;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-main);
}

.review-author {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-latte);
}

/* =========================================
   10. GDPR CHECKBOX & WAITLIST FEEDBACK
   ========================================= */

/* GDPR Consent Checkbox */
.gdpr-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.gdpr-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid var(--color-accent-latte);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    margin-top: 2px;
    transition: all 0.25s ease;
    position: relative;
}

.gdpr-checkbox input[type="checkbox"]:checked {
    background: var(--color-accent-latte);
    border-color: var(--color-accent-latte);
}

.gdpr-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.gdpr-checkbox input[type="checkbox"]:focus {
    outline: 2px solid rgba(199, 178, 153, 0.4);
    outline-offset: 2px;
}

.gdpr-checkbox a {
    color: var(--color-accent-latte);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.gdpr-checkbox a:hover {
    color: var(--color-text-main);
}

/* Waitlist Success Message */
.waitlist-success {
    background: linear-gradient(135deg, rgba(199, 178, 153, 0.1), rgba(199, 178, 153, 0.05));
    border: 1px solid rgba(199, 178, 153, 0.3);
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    margin-top: 30px;
    animation: fadeInUp 0.6s var(--anim-ease);
}

.waitlist-success .success-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-accent-latte);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.waitlist-success h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--color-text-main);
}

.waitlist-success p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Waitlist Error Message */
.waitlist-error {
    background: rgba(200, 80, 80, 0.08);
    border: 1px solid rgba(200, 80, 80, 0.25);
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #a04040;
    line-height: 1.5;
    animation: fadeInUp 0.4s ease;
}

/* =========================================
   11. PRIVACY POLICY PAGE
   ========================================= */
.privacy-section {
    padding-top: 160px;
    padding-bottom: var(--spacing-xl);
}

.privacy-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 30px;
}

.privacy-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 50px;
    text-transform: uppercase;
}

.privacy-block {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.privacy-block:last-of-type {
    border-bottom: none;
}

.privacy-block h2 {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    margin-bottom: 16px;
    color: var(--color-text-main);
}

.privacy-block p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    font-weight: 300;
}

.privacy-block ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.privacy-block ul li {
    font-size: 0.93rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    font-weight: 300;
    padding-left: 20px;
    position: relative;
}

.privacy-block ul li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--color-accent-latte);
}

.privacy-block a {
    color: var(--color-accent-latte);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.privacy-block a:hover {
    color: var(--color-text-main);
}

.naih-box {
    background: rgba(0, 0, 0, 0.02);
    border-left: 3px solid var(--color-accent-latte);
    padding: 20px 25px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
}

.naih-box p {
    margin-bottom: 4px;
    font-size: 0.9rem;
}

/* =========================================
   12. FOOTER
   ========================================= */
footer {
    background-color: #F3F1ED;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 30px 0;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.footer-links a:hover {
    color: var(--color-text-main);
}

.footer-separator {
    color: rgba(0, 0, 0, 0.15);
    font-size: 0.8rem;
}

/* Responsive: Privacy page & Bottom Sections */
@media (max-width: 768px) {
    .privacy-section {
        padding-top: 130px;
    }

    .privacy-container {
        padding: 0 20px;
    }

    /* ---- INVESTMENT / WAITLIST SECTION FIX ---- */
    .investment-section {
        padding: 60px 20px;
    }

    .split-layout {
        flex-direction: column;
        gap: 30px;
    }

    /* Remove 3D tilt on mobile – it causes visual bugs on narrow screens */
    .floating-sheet {
        transform: none !important;
        box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    }

    /* Section titles: smaller on mobile */
    .investment-section .section-title {
        font-size: 1.8rem;
    }

    .content-side .description {
        margin: 15px 0 25px;
        font-size: 0.95rem;
    }

    /* ---- WAITLIST FORM: Stack vertically ---- */
    .waitlist-form div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .waitlist-form input[type="email"] {
        width: 100% !important;
        padding: 14px 16px !important;
        font-size: 0.95rem !important;
    }

    .waitlist-form button[type="submit"] {
        width: 100% !important;
        padding: 14px 20px !important;
        text-align: center;
    }

    /* ---- GDPR Checkbox ---- */
    .gdpr-checkbox {
        font-size: 0.78rem;
    }

    /* ---- FEATURES LIST: Stack vertically ---- */
    .features-list {
        flex-direction: column;
        gap: 8px;
        margin-top: 20px;
    }

    /* ---- FOUNDER SECTION FIX ---- */
    .founder-section {
        padding: 40px 0;
    }

    .founder-container {
        padding: 20px 20px !important;
    }

    .founder-section .section-title {
        font-size: 1.6rem !important;
        margin-bottom: 25px !important;
    }

    .founder-section p {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }

    /* ---- FOOTER FIX: Safe area for notched iPhones ---- */
    footer {
        padding: 25px 20px;
        padding-bottom: calc(25px + env(safe-area-inset-bottom, 0px));
    }

    .footer-content {
        padding: 0;
    }

    .footer-links {
        gap: 10px;
        font-size: 0.75rem;
    }
}