/**
 * LemonCatch Landing Page Styles
 * Beautiful, modern design with lemon theme
 * Author: LemonCatch Technologies
 */

:root {
    --font-heading-name: 'Playfair Display';
    --font-body-name: 'DM Sans';
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --letter-spacing-heading: -0.02em;
    --letter-spacing-body: 0px;
    --space-base: 1rem;
    --radius-small: 100px;
    --radius-large: 28px;
    --border-width: 1.5px;
    --shadow-color: 26 24 16;
    --shadow-offset-x: 0px;
    --shadow-offset-y: 8px;
    --shadow-blur: 24px;
    --shadow-spread: 0px;
    --shadow-opacity: 0.08;
    --shadow-custom: 0 8px 24px rgba(26, 24, 16, 0.08);
    --shadow-custom-hover: 0 12px 40px rgba(232, 217, 48, 0.2);

    /* Color Palette */
    --color-cream: #FDFAF0;
    --color-charcoal: #1A1810;
    --color-yellow: #E8D930;
    --color-primary: #E8D930;
    --primary-color: #E8D930;
    --color-primary-light: #F7E967;
    --color-sage: #7A9E7E;
    --color-card: #F5F0DC;
    --color-muted: #4A4740;
}

/* ===================================================================
   GLOBAL STYLES
   =================================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: var(--color-cream);
    color: var(--color-charcoal);
}

/* ===================================================================
   PAPER TEXTURE OVERLAY
   =================================================================== */

.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    pointer-events: none;
    z-index: 9999;
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
}

/* ===================================================================
   TYPOGRAPHY CLASSES
   =================================================================== */

.font-heading {
    font-family: var(--font-heading);
}

.font-body {
    font-family: var(--font-body);
}

/* ===================================================================
   NAVIGATION STYLES
   =================================================================== */

.nav-link {
    position: relative;
    color: var(--color-charcoal);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    padding-bottom: 2px;
    transition: color 250ms ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-yellow);
    transition: width 250ms ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--color-charcoal);
}

/* ===================================================================
   MOBILE MENU
   =================================================================== */

.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--color-cream);
    z-index: 1000;
    /* Higher z-index to ensure it's on top */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mobile-menu.open {
    display: flex;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.mobile-menu a {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: var(--color-charcoal);
    text-decoration: none;
    font-style: italic;
    transition: color 300ms ease;
}

.mobile-menu a:hover {
    color: var(--color-yellow);
}

/* ===================================================================
   TEXT DECORATIONS & EFFECTS
   =================================================================== */

.zest-underline {
    position: relative;
    display: inline-block;
}

.zest-underline svg {
    position: absolute;
    bottom: -12px;
    left: -5%;
    width: 110%;
    height: 20px;
    z-index: -1;
    pointer-events: none;
}

.parallax-lemon {
    animation: float 8s ease-in-out infinite;
}

/* ===================================================================
   IMAGE STYLES
   =================================================================== */

.pill-image {
    border-radius: 200px;
    overflow: hidden;
}

.blob-image-1 {
    border-radius: 80px 160px 80px 160px;
    overflow: hidden;
}

.blob-image-2 {
    border-radius: 160px 80px 160px 80px;
    overflow: hidden;
}

/* Hero Video Card */
.hero-video-card {
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.hero-video-card:hover {
    transform: rotate(-1deg) scale(1.04) !important;
    box-shadow: 0 20px 48px rgba(26, 24, 16, 0.28) !important;
}

.hero-video-card video {
    display: block;
    width: 100%;
    object-fit: cover;
}

/* ===================================================================
   MARQUEE ANIMATION — Modern Design
   =================================================================== */

/* Modern Marquee Section */
.marquee-section {
    background: #1A1810;
    padding: 0;
    overflow: hidden;
    border-top: 1px solid rgba(232, 217, 48, 0.12);
    border-bottom: 1px solid rgba(232, 217, 48, 0.12);
}

.marquee-inner {
    height: 60px;
    display: flex;
    align-items: center;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

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

.marquee-items {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 16px;
}

.marquee-item {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: rgba(253, 250, 240, 0.72);
    white-space: nowrap;
    padding: 0 18px;
    letter-spacing: 0.02em;
}

.marquee-item em {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 14px;
    color: #FDFAF0;
    font-weight: 500;
}

.marquee-sep {
    font-size: 18px;
    color: #E8D930;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.5;
}

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

/* Legacy marquee (kept for compatibility) */
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}

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

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

/* ===================================================================
   FEATURE CARDS
   =================================================================== */

.feature-card {
    transition: transform 250ms ease, box-shadow 250ms ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(232, 217, 48, 0.2);
}

.feature-card:hover .feature-icon-container {
    animation: spin-once 0.3s ease-out;
}

.feature-icon-container {
    transition: transform 300ms ease;
}

/* ===================================================================
   SECTION 4: PROVERB CARD
   =================================================================== */

.proverb-card {
    min-height: 100%;
}

.proverb-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 26px;
    padding: 12px 0 8px;
}

.proverb-card-quote {
    font-family: var(--font-heading);
    font-size: clamp(28px, 2.7vw, 40px);
    font-style: italic;
    color: var(--color-cream);
    line-height: 1.35;
    margin: 0;
    max-width: 420px;
}

.proverb-card-divider {
    width: 100%;
    max-width: 320px;
    height: 1px;
    background: rgba(232, 217, 48, 0.2);
}

.proverb-card-translation {
    font-family: var(--font-body);
    font-size: clamp(17px, 1.35vw, 20px);
    font-weight: 300;
    color: rgba(253, 250, 240, 0.72);
    line-height: 1.7;
    font-style: italic;
    margin: 0;
    max-width: 360px;
}

/* ===================================================================
   BUTTONS & CTA
   =================================================================== */

.cta-primary {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}

.cta-primary:hover {
    transform: scale(1.01);
    animation: bounce-scale 0.2s ease-in-out;
    box-shadow: 0 8px 24px rgba(26, 24, 16, 0.15);
}

.cta-primary .lemon-emoji {
    display: inline-block;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s ease;
    margin-left: 0;
    width: 0;
}

.cta-primary:hover .lemon-emoji {
    opacity: 1;
    transform: translateX(0);
    margin-left: 8px;
    width: auto;
}

.store-btn {
    transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
    cursor: pointer;
}

.store-btn:hover {
    background: rgba(253, 250, 240, 0.15) !important;
    border-color: rgba(253, 250, 240, 0.4) !important;
    transform: translateY(-2px);
}

.approach-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-charcoal);
    text-decoration: none;
    padding-bottom: 1px;
    border-bottom: 1.5px solid transparent;
    transition: border-color 200ms ease, gap 200ms ease, color 200ms ease;
}

.approach-link:hover {
    border-bottom-color: var(--color-yellow);
    gap: 10px;
    color: var(--color-charcoal);
}

/* ===================================================================
   LOGO ANIMATION
   =================================================================== */

.logo-container {
    cursor: pointer;
    transition: transform 300ms ease;
}

.logo-container:hover .logo-icon {
    animation: wobble 0.4s ease-in-out;
}

.logo-container:hover {
    transform: scale(1.02);
}

/* ===================================================================
   SCROLL REVEAL ANIMATIONS
   =================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

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

/* ===================================================================
   SECTION DIVIDERS
   =================================================================== */

.citrus-divider {
    height: 6px;
    background-color: var(--color-yellow);
    width: 100%;
    position: relative;
}

.citrus-stamp-divider {
    height: 48px;
    width: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='12' stroke='%23E8D930' stroke-width='1.5' stroke-opacity='0.5'/%3E%3Cpath d='M20 8V32M8 20H32M11.5 11.5L28.5 28.5M11.5 28.5L28.5 11.5' stroke='%23E8D930' stroke-width='1.5' stroke-opacity='0.5'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: center;
    opacity: 1;
    margin: 0;
    background-color: #F5F0DC;
}

/* ===================================================================
   FOOTER STYLES
   =================================================================== */

.footer-link {
    color: rgba(253, 250, 240, 0.65);
    text-decoration: none;
    transition: color 150ms ease;
    line-height: 2.2;
    font-size: 14px;
    font-weight: 300;
    display: block;
}

.footer-link:hover {
    color: #FDFAF0;
}

.social-icon {
    color: rgba(253, 250, 240, 0.5);
    transition: color 200ms ease;
    cursor: pointer;
}

.social-icon:hover {
    color: var(--color-yellow);
}

/* ===================================================================
   ANIMATIONS & KEYFRAMES
   =================================================================== */

@keyframes wobble {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-8deg);
    }

    75% {
        transform: rotate(8deg);
    }
}

@keyframes bounce-scale {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }

    100% {
        transform: scale(1.01);
    }
}

@keyframes spin-once {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes float {

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

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.4);
        opacity: 0.7;
    }
}

/* ===================================================================
   RESPONSIVE DESIGN
   =================================================================== */

@media (max-width: 1024px) {
    .hero-headline {
        font-size: 52px !important;
    }

    div[style*="padding:0 48px"] {
        padding: 0 32px !important;
    }

    /* Prevent horizontal overflow on tablet widths */
    html,
    body {
        overflow-x: hidden;
    }
}

/* Reduce desktop container padding when viewport is narrower than container max-width
   This prevents the 48px side padding from causing horizontal overflow at widths
   like 1274px where the content + padding exceed the viewport. */
@media (max-width: 1280px) {
    div[style*="max-width:1280px;margin:0 auto;padding:0 48px;"] {
        padding: 0 24px !important;
        max-width: calc(100% - 48px) !important;
        box-sizing: border-box !important;
    }
}

/* Fix store buttons and download CTA column on narrower desktops/tablets (e.g. 1274px) */
@media (max-width: 1360px) {

    /* Give the right column (store buttons) a fixed width so buttons don't overflow */
    div[style*="display:grid;grid-template-columns:60% 40%"] {
        grid-template-columns: 1fr 360px !important;
        gap: 24px !important;
    }

    /* Ensure the right column content aligns to the end and has room */
    div[style*="display:flex;flex-direction:column;gap:16px;align-items:flex-end"] {
        align-items: flex-end !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
    }

    /* Constrain the store buttons so they wrap/scale instead of overflowing */
    .store-btn {
        max-width: 320px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    /* Ensure inner text can wrap and not push the button out */
    .store-btn>div {
        min-width: 0 !important;
        white-space: normal !important;
    }

    /* Slightly reduce container padding to gain space */
    div[style*="max-width:1280px;margin:0 auto;padding:0 48px;"] {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }
}

/* Tablet-specific fixes */
@media (min-width: 769px) and (max-width: 1024px) {

    /* Make sure the download grid reserves space for the store buttons */
    div[style*="display:grid;grid-template-columns:60% 40%"] {
        grid-template-columns: 1fr 320px !important;
        gap: 24px !important;
    }

    /* Constrain store buttons so they don't overflow the right column */
    div[style*="display:flex;flex-direction:column;gap:16px;align-items:flex-end"] {
        align-items: flex-end !important;
        padding-right: 12px !important;
    }

    .store-btn {
        width: auto !important;
        max-width: 280px !important;
        box-sizing: border-box !important;
    }

    /* Ensure store button inner content wraps nicely */
    .store-btn>div {
        min-width: 0 !important;
    }

    /* Hide parallax elements that can cause overflow */
    .parallax-lemon {
        display: none !important;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    /* Fix navigation padding */
    nav div[style*="padding:0 48px"] {
        padding: 0 16px !important;
    }

    /* Keep the fixed header from growing when the tagline wraps */
    nav>div {
        align-items: center !important;
        padding-top: 0 !important;
        min-height: 64px !important;
        height: 64px !important;
    }

    .logo-container {
        max-width: calc(100vw - 92px);
    }

    .logo-container .md\:hidden {
        display: block !important;
        max-width: calc(100vw - 118px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 10px !important;
        line-height: 1.15 !important;
        padding-left: 30px !important;
        color: #4A4740 !important;
    }

    /* Hero section responsive fixes */
    .hero-headline {
        font-size: 44px !important;
    }

    .hero-sub {
        font-size: 16px !important;
    }

    /* Fix hero layout - stack vertically */
    section>div>div[style*="grid-template-columns:52%"] {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        text-align: center;
    }

    /* Hide right column floating cards on mobile - they cause overflow */
    .pill-image {
        width: 280px !important;
        height: 380px !important;
        margin: 0 auto !important;
    }

    /* Mobile hero section specific fixes */
    section[style*="padding-top:72px"] {
        overflow: hidden !important;
    }

    /* Hero container fix */
    div[style*="min-height:calc(100vh - 172px)"] {
        min-height: auto !important;
        padding: 24px 0 !important;
    }

    /* Hero right column - completely redesigned for mobile */
    div[style*="position:relative;display:flex;justify-content:center;align-items:center;padding:40px 20px"] {
        padding: 20px 0 !important;
        justify-content: center !important;
    }

    /* Mobile-optimized pill image */
    .pill-image {
        width: 280px !important;
        height: 380px !important;
        margin: 0 auto !important;
        position: relative !important;
    }

    /* Hero badge - smaller and better positioned */
    div[style*="position:absolute;top:24px;right:24px;width:72px;height:72px"] {
        width: 56px !important;
        height: 56px !important;
        top: 12px !important;
        right: 12px !important;
    }

    /* Hero badge text - smaller */
    div[style*="font-size:18px;font-weight:700"] {
        font-size: 14px !important;
    }

    div[style*="font-size:20px;font-weight:700"] {
        font-size: 16px !important;
    }

    /* Grid overrides for mobile */
    div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 48px !important;
        text-align: center;
    }

    section#about>div>div[style*="grid-template-columns:45% 55%"] {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        text-align: center;
    }

    /* Features grid - single column */
    div[style*="grid-template-columns:repeat(3,1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Testimonials - single column */
    div[style*="grid-template-columns:repeat(3,1fr)"][style*="align-items:start"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Download section - stack vertically */
    div[style*="grid-template-columns:60%"] {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        text-align: center;
    }

    /* Remove transforms on mobile */
    div[style*="transform:translateY(-24px)"] {
        transform: none !important;
    }

    /* Padding adjustments */
    div[style*="padding:0 48px"] {
        padding: 0 16px !important;
    }

    /* Section padding - reduce for mobile */
    section[style*="padding:120px 0"] {
        padding: 60px 0 !important;
    }

    section[style*="padding:80px 48px 100px"] {
        padding: 40px 16px 60px !important;
    }

    section[style*="padding:100px 0"] {
        padding: 60px 0 !important;
    }

    /* Hero specific padding fix */
    div[style*="padding:80px 48px 100px"] {
        padding: 40px 16px 60px !important;
    }

    /* Text size adjustments */
    .marquee-track span {
        font-size: 14px !important;
    }

    /* Headings responsive */
    h1[style*="font-size:68px"] {
        font-size: 40px !important;
        line-height: 1.12 !important;
    }

    h1[style*="font-size:68px;font-weight:700"] {
        font-size: 40px !important;
        line-height: 1.12 !important;
    }

    h1[style*="font-size:68px;font-weight:400"] {
        font-size: 40px !important;
        line-height: 1.12 !important;
    }

    h1[style*="font-size:72px"] {
        font-size: 44px !important;
        line-height: 1.1 !important;
    }

    h2[style*="font-size:52px"] {
        font-size: 36px !important;
        line-height: 1.2 !important;
    }

    h2[style*="font-size:48px"] {
        font-size: 32px !important;
        line-height: 1.2 !important;
    }

    h2[style*="font-size:56px"] {
        font-size: 38px !important;
        line-height: 1.2 !important;
    }

    /* Button adjustments */
    div[style*="display:flex;gap:16px;flex-wrap:wrap"] {
        justify-content: center !important;
    }

    /* Mobile menu adjustments */
    .mobile-menu a {
        font-size: 24px;
    }

    .mobile-menu {
        gap: 24px;
    }

    /* Store buttons container */
    div[style*="display:flex;flex-direction:column;gap:16px;align-items:flex-end"] {
        align-items: center !important;
    }

    /* Approach section image sizing */
    .blob-image-1,
    .blob-image-2 {
        height: 300px !important;
        margin-bottom: 32px !important;
    }

    /* Fix overflow issues */
    .parallax-lemon {
        display: none !important;
    }

    /* Mobile hero video card positioning */
    .hero-video-card {
        display: block !important;
        width: 130px !important;
        left: 0px !important;
        bottom: 15px !important;
    }

    .hero-video-card video {
        height: 105px !important;
    }

    /* Trust line - center on mobile */
    div[style*="margin-top:48px;display:flex;align-items:center;gap:12px"] {
        justify-content: center !important;
        margin-top: 32px !important;
    }

    /* Marquee modern - fix on mobile */
    .marquee-item {
        font-size: 12px !important;
        padding: 0 12px !important;
    }

    /* Feature cards - better mobile spacing */
    .feature-card {
        text-align: center;
    }

    /* Fix testimonial cards width on mobile */
    div[style*="background:#F5F0DC;border-radius:28px"],
    div[style*="background:#1A1810;border-radius:28px"] {
        margin-bottom: 20px;
    }

    /* Footer stacks cleanly on mobile */
    footer>div {
        padding: 0 16px !important;
    }

    footer>div>div[style*="display:grid"][style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
        margin-bottom: 32px !important;
    }

    footer>div>div[style*="border-top:1px solid rgba(253,250,240,0.08)"] {
        flex-direction: column !important;
        text-align: center;
        gap: 8px !important;
    }

    footer .social-icon {
        justify-content: center;
    }

    /* Ensure footer fills viewport and doesn't leave a gap on the right */
    footer {
        width: 100% !important;
        left: 0 !important;
        box-sizing: border-box !important;
        padding-left: 40px !important;
        padding-right: 40px !important;
    }

    footer>div {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Collapse footer columns to a single column and remove grid constraints */
    footer>div>div[style*="display:grid"] {
        display: block !important;
        width: 100% !important;
    }

    /* Prevent any child from exceeding viewport width */
    footer,
    footer * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {

    /* Extra small screens - phones in portrait */
    .hero-headline {
        font-size: 32px !important;
    }

    /* Even tighter padding on small phones */
    div[style*="padding:0 24px"],
    div[style*="padding:0 16px"] {
        padding: 0 12px !important;
    }

    nav div[style*="padding:0 48px"] {
        padding: 0 12px !important;
    }

    .logo-container {
        max-width: calc(100vw - 86px);
    }

    .logo-container .md\:hidden {
        max-width: calc(100vw - 112px);
        font-size: 9px !important;
        letter-spacing: 0 !important;
    }

    /* Smaller headings for tiny screens */
    h1[style*="font-size:68px"] {
        font-size: 34px !important;
    }

    h1[style*="font-size:72px"] {
        font-size: 36px !important;
    }

    h2[style*="font-size:52px"] {
        font-size: 28px !important;
    }

    h2[style*="font-size:48px"] {
        font-size: 26px !important;
    }

    h2[style*="font-size:56px"] {
        font-size: 30px !important;
    }

    /* Pill image even smaller */
    .pill-image {
        width: 240px !important;
        height: 320px !important;
    }

    /* Reduce section padding further */
    section[style*="padding:60px 0"] {
        padding: 40px 0 !important;
    }

    /* Smaller mobile menu */
    .mobile-menu a {
        font-size: 20px;
    }

    /* Smaller feature cards padding */
    .feature-card {
        padding: 24px 20px !important;
    }

    /* Store buttons stack better */
    .store-btn {
        width: 200px !important;
    }

    /* Narrow footer spacing for very small screens */
    footer>div>div[style*="display:grid"][style*="grid-template-columns"] {
        gap: 20px !important;
    }

    /* Reduce badge size */
    div[style*="width:72px;height:72px"] {
        width: 60px !important;
        height: 60px !important;
        top: 16px !important;
        right: 16px !important;
    }

    /* Smaller trust avatars */
    img[style*="width:32px;height:32px"] {
        width: 28px !important;
        height: 28px !important;
    }
}

/* ===================================================================
   MOBILE-SPECIFIC UTILITIES & FIXES
   =================================================================== */

/* Mobile-safe container - only apply overflow hidden on mobile */
.mobile-safe {
    position: relative;
}

/* Only prevent horizontal scroll on mobile devices */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .mobile-safe {
        max-width: 100vw;
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
    }
}

/* Better mobile touch targets */
@media (max-width: 768px) {

    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Improve readability on mobile */
    p[style*="font-size:18px"] {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    p[style*="font-size:17px"] {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    /* Better mobile spacing for CTAs */
    a[style*="padding:16px 32px"] {
        padding: 14px 24px !important;
        font-size: 14px !important;
    }

    /* Mobile navigation improvements */
    nav {
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        height: 64px !important;
        /* Smaller nav on mobile */
    }

    /* Better mobile hamburger button */
    button[onclick="toggleMenu()"] {
        padding: 8px !important;
        margin-right: 4px !important;
    }

    /* Navigation container mobile adjustments */
    nav>div {
        height: 64px !important;
        padding: 0 16px !important;
    }

    /* Fix logo on mobile */
    .logo-container span {
        font-size: 18px !important;
    }

    /* Improve mobile menu */
    .mobile-menu {
        padding: 32px 24px !important;
    }

    /* Better mobile card layouts */
    div[style*="border-radius:28px"] {
        border-radius: 20px !important;
    }

    /* Mobile testimonial improvements */
    blockquote[style*="font-size:20px"] {
        font-size: 18px !important;
        line-height: 1.4 !important;
    }

    /* Mobile-safe images */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Hide complex decorative elements that cause overflow */
    .parallax-lemon,
    div[style*="position:absolute;bottom:10%"],
    div[style*="position:absolute;right:0;top:0;width:600px"] {
        display: none !important;
    }

    /* Better mobile footer/download section */
    section[style*="background:#1A1810"] div[style*="display:flex;flex-direction:column"] {
        gap: 12px !important;
    }
}

/* Tablet layout: keep cards readable and prevent clipping between 742px and 1368px */
@media (min-width: 742px) and (max-width: 1368px) {
    body {
        overflow-x: hidden;
    }

    /* Use lighter horizontal padding so the layout breathes on tablet widths */
    div[style*="max-width:1280px;margin:0 auto;padding:0 48px;"] {
        padding-left: 24px !important;
        padding-right: 24px !important;
        box-sizing: border-box !important;
    }

    /* Hero download CTA should stack so the store buttons never get cut off */
    div[style*="display:grid;grid-template-columns:60% 40%;gap:64px;align-items:center;"] {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        text-align: center;
    }

    div[style*="display:flex;flex-direction:column;gap:16px;align-items:flex-end"] {
        align-items: center !important;
        padding-right: 0 !important;
    }

    .store-btn {
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
    }

    .store-btn>div {
        min-width: 0 !important;
    }

    /* Stack card-based sections to avoid side clipping */
    section#about div[style*="grid-template-columns:45% 55%"] {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        text-align: center;
    }

    div[style*="grid-template-columns:1fr 1fr;gap:80px;align-items:center;margin-bottom:96px;"] {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        margin-bottom: 64px !important;
        text-align: center;
    }

    div[style*="grid-template-columns:1fr 1fr;gap:80px;align-items:center;"] {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        text-align: center;
    }

    div[style*="grid-template-columns:repeat(3,1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    div[style*="grid-template-columns:repeat(3,1fr)"][style*="align-items:start"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    div[style*="grid-template-columns:60% 40%"] {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        text-align: center;
    }

    /* Footer should stack in tablet view so columns don't get squeezed */
    footer>div>div[style*="display:grid"] {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }

    footer>div>div[style*="border-top:1px solid rgba(253,250,240,0.08)"] {
        flex-direction: column !important;
        text-align: center;
        gap: 8px !important;
    }
}

.hidden {
    display: none;
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }

    .md\:inline-flex {
        display: inline-flex;
    }

    .md\:hidden {
        display: none;
    }
}

/* ===================================================================
   ACCESSIBILITY
   =================================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .marquee-track {
        animation: none;
    }

    .paper-texture {
        display: none;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--color-yellow);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .paper-texture {
        display: none;
    }

    .nav-link::after {
        height: 3px;
    }
}

/* ===================================================================
   MOBILE MENU OVERLAY STYLES
   =================================================================== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-cream);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    transform: translateZ(0);
    will-change: opacity, visibility;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu a {
    font-family: var(--font-heading);
    font-size: 26px;
    font-style: italic;
    color: var(--color-charcoal);
    text-decoration: none;
    transition: color 150ms ease, transform 150ms ease;
}

.mobile-menu a:hover {
    color: #C8A800;
    transform: scale(1.04);
}

.mobile-menu-open {
    overflow: hidden !important;
}