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

body {
    font-family: var(--font-family-base);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll from absolute elements if any */
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul,
ol {
    list-style: none;
}

/* UTILITIES */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--spacing-4);
}

.section {
    padding-block: var(--spacing-8);
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: var(--spacing-2);
}

.gap-3 {
    gap: var(--spacing-3);
}

.gap-4 {
    gap: var(--spacing-4);
}

.grid {
    display: grid;
    gap: var(--spacing-4);
}

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

.text-left {
    text-align: left;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-2);
}

.display-large {
    font-size: clamp(32px, 5vw, 56px);
    letter-spacing: -1px;
    font-weight: 800;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-6);
}

.headline-medium {
    font-size: 24px;
    font-weight: 600;
}

.body-large {
    font-size: 18px;
    color: var(--color-muted-text);
    line-height: 1.7;
}

.body-medium {
    font-size: 16px;
    color: var(--color-muted-text);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn-primary {
    background-color: var(--color-primary);
    color: #FFFFFF;
    /* Forced white text */
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-store {
    display: inline-flex;
    align-items: center;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.btn-store svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

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

/* ANIMATIONS */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: opacity, transform;
    }

    .reveal-on-scroll.is-visible {
        opacity: 1;
        transform: translateY(0);
        padding-left: 0px;
        padding-right: 0px;
    }

    .reveal-stagger>* {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-stagger.is-visible>* {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-stagger.is-visible>*:nth-child(1) {
        transition-delay: 0.1s;
    }

    .reveal-stagger.is-visible>*:nth-child(2) {
        transition-delay: 0.2s;
    }

    .reveal-stagger.is-visible>*:nth-child(3) {
        transition-delay: 0.3s;
    }

    .reveal-stagger.is-visible>*:nth-child(4) {
        transition-delay: 0.4s;
    }

    .reveal-stagger.is-visible>*:nth-child(5) {
        transition-delay: 0.5s;
    }

    .reveal-stagger.is-visible>*:nth-child(6) {
        transition-delay: 0.6s;
    }
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding-block: var(--spacing-3);
    background: transparent;
    transition: background 0.3s, backdrop-filter 0.3s, padding 0.3s, box-shadow 0.3s;
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    z-index: 202;
    position: relative;
    padding: 0;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger Open Animation */
.hamburger-btn.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    inset: 0;
    background: #ffffff;
    /* Solid white background for better visibility */
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 200;
    display: flex;
    flex-direction: column;
    padding: 100px 32px 32px;
    transform: translateX(-100%);
    /* Slide from Left (Apple Style) */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    /* Enable vertical scrolling */
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-links {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-menu-links h4 {
    margin-bottom: 12px;
}

.mobile-menu-links ul li {
    margin-bottom: 12px;
    display: block;
}

.mobile-menu-links ul li a {
    font-size: 18px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
        order: -1;
        /* Ensure it's first if flex order is used, though HTML order governs */
    }

    .hidden-mobile {
        display: none !important;
    }

    /* Header customizations for mobile */
    .header .btn-store {
        padding: 6px 10px;
        /* Adjusted padding */
        border-radius: 8px;
        /* Restore radius */
    }

    /* Removed rule hiding span to show full text */
}

/* MARQUEE ANIMATION */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {

    /* Override marquee for manual/snap carousel */
    .testimonial-grid {
        display: flex;
        gap: 16px;
        animation: none;
        /* Disable marquee */
        width: 100%;
        /* Fit container */
        overflow-x: auto;
        /* Enable scroll */
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .section:has(.testimonial-grid) .container {
        overflow: visible;
        /* Allow overflow */
        padding-inline: var(--spacing-4);
    }

    .testimonial-grid::-webkit-scrollbar {
        display: none;
    }

    .testimonial-card {
        min-width: 100%;
        /* Show one card at a time */
        scroll-snap-align: center;
        flex-shrink: 0;
    }
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    z-index: 202;
    position: relative;
    padding: 0;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger Open Animation */
.hamburger-btn.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}



@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    .nav-link.hidden-mobile {
        display: none !important;
    }

    .hidden-desktop {
        display: none;
    }
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding-block: var(--spacing-2);
}

.header .btn-store {
    padding: 6px 12px;
    font-size: 12px;
    gap: 6px;
}

.header .btn-store svg {
    width: 16px;
    height: 16px;
}

.app-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin-bottom: var(--spacing-4);
    /* No shadow as requested */
}

.nav-link {
    font-weight: 500;
    font-size: 15px;
}

.nav-link:hover {
    opacity: 0.7;
}

/* HERO SECTION */
.hero {
    position: relative;
    padding-top: calc(var(--header-height) + var(--spacing-8));
    padding-bottom: 0;
    /* Content overflows */
    background: linear-gradient(180deg, var(--color-surface-2) 0%, #FFFFFF 100%);
    overflow: hidden;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding-bottom: var(--spacing-8);
}

.hero-phones {
    display: flex;
    justify-content: center;
    gap: var(--spacing-2);
    margin-top: var(--spacing-4);
    transform: translateY(60px);
    /* Overlap next section */
    position: relative;
    z-index: 2;
}

.phone-mockup {
    width: 300px;
    /* Larger */
    border-radius: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: #fff;
    border: 4px solid #000;
    /* Thinner */
    overflow: hidden;
    aspect-ratio: 9/19.5;
}

.phone-mockup {
    width: 260px;
    /* Reduced specific size for 3-up */
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: #fff;
    overflow: hidden;
    aspect-ratio: 9/19.5;
}

.phone-mockup.center {
    transform: translateY(-40px);
    z-index: 3;
}

/* ZIG ZAG / ABOUT SECTIONS */
.feature-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-6);
    align-items: center;
    margin-bottom: var(--spacing-8);
    overflow: hidden;
    /* Prevent circles from causing horizontal scroll */
}

@media (min-width: 900px) {
    .feature-row {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-8);
    }

    .feature-row.reverse .feature-visual {
        order: 2;
    }

    .feature-row.reverse .feature-text {
        order: 1;
    }
}

.feature-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.feature-visual::before {
    content: '';
    position: absolute;
    width: 400px;
    /* Fixed width for consistency */
    height: 400px;
    /* Same as width to maintain circle */
    max-width: 150vw;
    /* Allow it to be larger than viewport */
    max-height: 150vw;
    /* Maintain square aspect ratio */
    aspect-ratio: 1 / 1;
    /* Force perfect circle */
    background: var(--color-surface-2);
    border-radius: 50%;
    z-index: -1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Center the circle */
    opacity: 0.5;
}

.feature-text {
    padding: var(--spacing-4);
}

/* STATS SECTION */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-4);
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: var(--spacing-2);
}

@media (max-width: 600px) {
    .stats-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding: 16px;
        scroll-padding: 16px;
        /* Hide scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .stats-grid::-webkit-scrollbar {
        display: none;
    }

    .stat-item {
        min-width: 200px;
        scroll-snap-align: center;
        background: var(--color-surface-2);
        padding: 24px;
        border-radius: 20px;
        flex-shrink: 0;
    }
}

/* TESTIMONIALS */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-4);
}

.testimonial-card {
    background: var(--color-surface-2);
    padding: var(--spacing-4);
    border-radius: var(--border-radius);
    display: flex;
    gap: var(--spacing-3);
    align-items: flex-start;
}

.avatar {
    width: 150px;
    height: 50px;
    border-radius: 50%;
    background: #ccc;
    object-fit: cover;
}

/* FAQ ACCORDION */
.accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.accordion-item {
    border-bottom: 1px solid var(--color-border);
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: var(--spacing-3) 0;
    font-weight: 600;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-bottom: 0;
}

.accordion-body.open {
    padding-bottom: var(--spacing-3);
}

.icon-plus {
    font-size: 24px;
    transition: transform 0.3s;
}

.accordion-header[aria-expanded="true"] .icon-plus {
    transform: rotate(45deg);
}

/* DOWNLOAD / APP SHOWCASE */
.app-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-6);
    align-items: center;
}

@media (min-width: 900px) {
    .app-showcase {
        grid-template-columns: 1fr 1fr;
    }
}

/* NEWSLETTER */
.newsletter-section {
    background: var(--color-accent);
    /* Branding color */
    color: white;
    padding: var(--spacing-8) var(--spacing-4);
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: var(--spacing-8);
}

.newsletter-form {
    display: flex;
    gap: var(--spacing-2);
    justify-content: center;
    margin-top: var(--spacing-4);
    flex-wrap: wrap;
}

.newsletter-input {
    padding: 12px 20px;
    border-radius: 50px;
    border: none;
    min-width: 250px;
    font-size: 16px;
}

/* FOOTER */
.footer {
    background: #000;
    color: #fff;
    padding: var(--spacing-8) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-6);
}

@media (max-width: 768px) {
    .footer {
        display: none;
    }

    .feature-row,
    .feature-row.reverse {
        display: flex;
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .feature-visual {
        order: -1;
        /* Image always first on mobile */
    }

    .feature-visual::before {
        width: 300px;
        /* Smaller circle for mobile */
        height: 300px;
        /* Maintain perfect circle */
    }

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

.footer-col h4 {
    color: #fff;
    margin-bottom: var(--spacing-3);
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #888;
}

.footer-col a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    margin-top: var(--spacing-6);
    padding-top: var(--spacing-4);
    border-top: 1px solid #333;
    color: #666;
    font-size: 14px;
}

/* LEGAL PAGES */
.legal-page-body {
    padding-top: var(--header-height);
}

.legal-content {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content p,
.legal-content li {
    margin-bottom: 1rem;
    color: var(--color-on-surface-variant);
    line-height: 1.6;
}

.legal-content ul {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .footer {
        display: none;
    }

    .feature-row,
    .feature-row.reverse {
        display: flex;
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .feature-visual {
        order: -1;
        /* Image always first on mobile */
    }

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