/* ========================================
   Pancake Landing Page - Shared Styles
   ======================================== */

/* --- Base Typography --- */
body {
    font-family: 'Nunito', sans-serif;
    background-color: #FFFFFF;
}
h1, h2, h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* --- SVG Optimization --- */
.svg-crisp {
    image-rendering: optimizeSpeed;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    shape-rendering: geometricPrecision;
    will-change: transform;
}
@media (max-width: 768px) {
    .svg-crisp {
        transform: translateZ(0);
        backface-visibility: hidden;
    }
}

/* --- Parallax Background --- */
.parallax-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}
.parallax-bg {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 400%;
    will-change: transform;
    transform: translateZ(0);
}
.parallax-bg--pattern {
    background-image: url('../images/images/newpatternbackground.svg');
    background-size: 960px 540px;
    background-repeat: repeat;
    opacity: 0.45;
}
.parallax-bg--mesh {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(39, 155, 117, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(52, 199, 147, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(245, 166, 35, 0.03) 0%, transparent 50%),
        linear-gradient(180deg, #F0FDF4 0%, #FFFFFF 40%, #FFFFFF 100%);
    opacity: 1;
    height: 100%;
    top: 0;
}
@media (max-width: 768px) {
    .parallax-bg--pattern {
        background-size: 480px 270px;
    }
}
body > * {
    position: relative;
    z-index: 1;
}

/* --- Scroll-Reveal Entrance Animation --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
/* Staggered children */
.scroll-reveal.revealed .stagger-child {
    opacity: 1;
    transform: translateY(0);
}
.stagger-child {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.stagger-child:nth-child(1) { transition-delay: 0ms; }
.stagger-child:nth-child(2) { transition-delay: 120ms; }
.stagger-child:nth-child(3) { transition-delay: 240ms; }
.stagger-child:nth-child(4) { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .stagger-child {
        opacity: 1;
        transform: none;
        transition: none;
    }
    #text-track > div {
        opacity: 1;
        transition: none;
    }
}

/* --- CTA Buttons --- */
.cta-primary {
    background: linear-gradient(135deg, #279B75 0%, #34C793 100%);
    box-shadow: 0 4px 15px rgba(39, 155, 117, 0.3);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    color: white;
    font-weight: 700;
    border-radius: 0.75rem;
    cursor: pointer;
    border: none;
}
.cta-primary:hover {
    box-shadow: 0 6px 25px rgba(39, 155, 117, 0.5);
    transform: translateY(-1px);
}
.cta-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(39, 155, 117, 0.3);
}

.cta-secondary {
    position: relative;
    color: #279B75;
    font-weight: 600;
    transition: color 0.2s ease;
    display: inline-block;
}
.cta-secondary::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #279B75;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cta-secondary:hover::after {
    width: 100%;
}

.cta-nav {
    background: linear-gradient(135deg, #279B75 0%, #34C793 100%);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}
.cta-nav:hover {
    box-shadow: 0 4px 15px rgba(39, 155, 117, 0.4);
    transform: translateY(-1px);
}

/* --- Card Hover Effects --- */
.feature-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* --- FAQ Accordion --- */
.faq-item {
    border-bottom: 1px solid #E5E7EB;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    transition: color 0.2s ease;
}
.faq-question:hover {
    color: #279B75;
}
.faq-question svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}
.faq-question[aria-expanded="true"] svg {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
}
.faq-answer.open {
    opacity: 1;
}

/* --- Carousel Arrows --- */
.carousel-arrow {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms, transform 200ms;
}
.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}
.carousel-arrow:focus {
    outline: none;
    box-shadow: 0 0 0 2px white;
}
.carousel-arrow svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: white;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Carousel Text Fade --- */
#text-track {
    will-change: transform;
}
#text-track > div {
    opacity: 0;
    transition: opacity 0.4s ease-in-out 0.15s;
}
#text-track > div.carousel-slide-active {
    opacity: 1;
}

/* --- Form Anti-Bot --- */
.form-field-group {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    z-index: -1;
    pointer-events: none;
}

/* --- Pancake Stacking Animation --- */
.pancake-stack-container {
    position: relative;
    width: 200px;
    height: 230px;
}
@media (min-width: 640px) {
    .pancake-stack-container {
        width: 260px;
        height: 300px;
    }
}
@media (min-width: 1024px) {
    .pancake-stack-container {
        width: 320px;
        height: 370px;
    }
}
.pancake-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(-80px) scale(0.8);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}
.pancake-layer.animate {
    animation: pancakeDrop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes pancakeDrop {
    0% { opacity: 0; transform: translateY(-80px) scale(0.8); }
    40% { opacity: 1; }
    65% { transform: translateY(6px) scale(1.01); }
    82% { transform: translateY(-2px) scale(0.995); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.pancake-stack-float {
    animation: gentleFloat 4s ease-in-out infinite;
}
.tagline-hidden {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}
.tagline-visible {
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    .pancake-layer {
        opacity: 1;
        transform: none;
        animation: none !important;
    }
    .pancake-stack-float {
        animation: none !important;
    }
    .tagline-hidden {
        opacity: 1;
        transition: none;
    }
}

/* --- Dark Mode (Pancake Pro) --- */
body, .dark-transition {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
body.dark {
    background-color: #1C1C1E;
}
body.dark .parallax-bg {
    opacity: 0.06 !important;
}
body.dark nav {
    background-color: rgba(44, 44, 46, 0.9) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}
body.dark .nav-brand { color: white; }
body.dark .nav-link { color: rgba(255, 255, 255, 0.7); }
body.dark .nav-link:hover { color: #279B75; }
body.dark .nav-link-active { color: #279B75; }
body.dark #mobile-menu-btn:hover { background-color: rgba(255, 255, 255, 0.1); }
body.dark .menu-icon { color: rgba(255, 255, 255, 0.7); }
body.dark #mobile-menu { background-color: rgba(44, 44, 46, 0.95); }
body.dark .mobile-link { color: rgba(255, 255, 255, 0.7); }
body.dark .mobile-link:hover { color: #279B75; background-color: rgba(255, 255, 255, 0.05); }
body.dark .mobile-link-active { color: #279B75; background-color: rgba(255, 255, 255, 0.05); }
body.dark .box-white { background-color: rgba(44, 44, 46, 0.9); }
body.dark .box-heading { color: white; }
body.dark .box-subheading { color: rgba(255, 255, 255, 0.9); }
body.dark .box-text { color: rgba(255, 255, 255, 0.7); }
body.dark .dark-footer { background-color: rgba(28, 28, 30, 0.95) !important; }
body.dark .dark-footer .footer-heading { color: rgba(255, 255, 255, 0.9); }
body.dark .dark-footer .footer-link { color: rgba(255, 255, 255, 0.5); }
body.dark .dark-footer .footer-link:hover { color: #34C793; }
body.dark .dark-footer .footer-border { border-color: rgba(255, 255, 255, 0.1); }
body.dark .dark-footer .footer-copy { color: rgba(255, 255, 255, 0.3); }
body.dark .social-icon-img { filter: invert(1); }
body.dark .social-icon-svg { color: white; }
body.dark #dark-mode-toggle { background-color: #3A3A3C; }
body.dark .cta-nav { background: linear-gradient(135deg, #34C793, #279B75); }

/* --- CTA Gradient --- */
.cta-gradient { background: linear-gradient(135deg, #1E7A5C 0%, #279B75 50%, #34C793 100%); }
