/* ============================================================
   AGENCY NAME — CUSTOM STYLESHEET
   ============================================================

   Table of Contents
   -----------------
   01. Foundation
   02. Keyframes
   03. Reveal on Scroll
   04. Navigation (Sticky Header)
   05. Hero Card (Dark Atmospheric)
   06. Buttons
   07. Marquee
   08. FAQ Accordion
   09. Journey / Flow (Index Services)
   10. Glass Surfaces
   11. Statement Card (Pricing)
   12. Scalability Multiplier (Pricing)
   13. Roadmap Phases (About)
   14. Form Inputs
   15. Utilities
   16. Mobile Navigation

   ============================================================ */


/* ============================================================
   01. FOUNDATION
   ============================================================ */

.font-serif-display {
    font-family: 'Playfair Display', serif;
}

/* Prevent horizontal drag-scroll on iPad Safari.
   Body-only overflow-x:hidden is insufficient; html needs it too. */
html,
body {
    overflow-x: clip;
    width: 100%;
    position: relative;
}


/* ============================================================
   02. KEYFRAMES
   ============================================================ */

/* Page-load fade-in (simple, non-3D) */
@keyframes fadeInUp {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 3D fade-in-up — hero title, subtitle */
@keyframes fadeInUp3D {
    0%   { opacity: 0; transform: perspective(600px) translateY(60px) translateZ(-80px) scale(0.95); }
    100% { opacity: 1; transform: perspective(600px) translateY(0) translateZ(0) scale(1); }
}

/* 3D fade + scale — hero header, page headers */
@keyframes fadeScaleIn {
    0%   { opacity: 0; transform: perspective(600px) translateZ(-220px) scale(0.8); }
    100% { opacity: 1; transform: perspective(600px) translateZ(0) scale(1); }
}

/* Marquee scroll */
@keyframes marquee {
    0%   { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

/* Hero background breathing pulse */
@keyframes heroBackgroundPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.03); }
}

/* Hero orbital arcs — floating */
@keyframes floatArcTop {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(15px); }
}
@keyframes floatArcBottom {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-15px); }
}

/* Statement card — shine sweep */
@keyframes statementShine {
    0%   { left: -75%; opacity: 1; }
    100% { left: 125%; opacity: 0; }
}

/* Journey connector — flowing dot */
@keyframes flowDot {
    0%   { left: -6px; opacity: 0; }
    5%   { left: -6px; opacity: 1; }
    28%  { left: calc(100% - 6px); opacity: 1; }
    33%  { left: calc(100% - 6px); opacity: 0; }
    100% { left: calc(100% - 6px); opacity: 0; }
}

/* Same flow, vertical — for mobile journey connectors */
@keyframes flowDotV {
    0%   { top: -6px; opacity: 0; }
    5%   { top: -6px; opacity: 1; }
    28%  { top: calc(100% - 6px); opacity: 1; }
    33%  { top: calc(100% - 6px); opacity: 0; }
    100% { top: calc(100% - 6px); opacity: 0; }
}

/* Continuous optimization loop — dots down/up + pulse */
@keyframes loopDown {
    0%   { top: -1rem; opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { top: calc(100% + 0.75rem); opacity: 0; }
}
@keyframes loopUp {
    0%   { top: calc(100% + 0.75rem); opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { top: -1rem; opacity: 0; }
}
@keyframes loopPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(16,185,129,0); }
    50%      { box-shadow: 0 0 20px rgba(16,185,129,0.15); }
}

/* Generic spin — used by .spin-slow */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Scalability gear spin */
@keyframes gearSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Scalability cost counter — pop + blur transitions */
@keyframes resultPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.09); }
    100% { transform: scale(1); }
}
@keyframes resultBlurOut {
    from { opacity: 1; filter: blur(0); transform: scale(1); }
    to   { opacity: 0; filter: blur(8px); transform: scale(1.05); }
}
@keyframes resultBlurIn {
    from { opacity: 0; filter: blur(8px); transform: scale(0.95); }
    to   { opacity: 1; filter: blur(0); transform: scale(1); }
}

/* Scalability bubble — gentle float */
@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}


/* ============================================================
   03. REVEAL ON SCROLL
   ============================================================
   All reveal-* classes start hidden, then get .visible added
   by the IntersectionObserver in main.js.
   ============================================================ */

/* Page-load fade-in (simple) */
.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

/* 3D fade-in-up — hero title and subtitle */
.animate-fade-in-up-3d {
    animation: fadeInUp3D 1.0s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

/* 3D fade + scale — hero header chrome */
.animate-fade-scale-in {
    animation: fadeScaleIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    will-change: transform, opacity;
    transform-origin: center;
}

/* Reveal: 3D fade-up (default) */
.reveal-3d-up {
    opacity: 0;
    transform: perspective(600px) translateY(60px) translateZ(-80px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-3d-up.visible {
    opacity: 1;
    transform: perspective(600px) translateY(0) translateZ(0) scale(1);
}

/* Reveal: 3D fade-up slower — for section headers */
.reveal-3d-up-slower {
    opacity: 0;
    transform: perspective(600px) translateY(40px) translateZ(-50px) scale(0.97);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-3d-up-slower.visible {
    opacity: 1;
    transform: perspective(600px) translateY(0) translateZ(0) scale(1);
}

/* Reveal: 3D fade-scale — for cards */
.reveal-3d-scale {
    opacity: 0;
    transform: perspective(600px) translateZ(-80px) scale(0.95);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-3d-scale.visible {
    opacity: 1;
    transform: perspective(600px) translateZ(0) scale(1);
}

/* Reveal: 3D fade-scale soft — for larger card groups */
.reveal-3d-scale-soft {
    opacity: 0;
    transform: perspective(600px) translateZ(-50px) scale(0.97);
    transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-3d-scale-soft.visible {
    opacity: 1;
    transform: perspective(600px) translateZ(0) scale(1);
}

/* Reveal: 3D fade from right — reserved for future use */
.reveal-3d-right {
    opacity: 0;
    transform: perspective(600px) translateX(80px) translateZ(-80px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-3d-right.visible {
    opacity: 1;
    transform: perspective(600px) translateX(0) translateZ(0) scale(1);
}
.reveal-3d-right-soft {
    opacity: 0;
    transform: perspective(600px) translateX(60px) translateZ(-120px) scale(0.9);
    transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-3d-right-soft.visible {
    opacity: 1;
    transform: perspective(600px) translateX(0) translateZ(0) scale(1);
}

/* Reveal: fade only — for mega cards (no scale, avoids eye fatigue) */
.reveal-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Legacy: simple reveal (still queried by main.js) */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================================
   04. NAVIGATION (STICKY HEADER)
   ============================================================ */

.sticky-header-animate {
    transform: translateY(-100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0.4s;
}
.sticky-header-animate.visible {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0s;
}

/* Hide sticky header on mobile and tablet portrait */
@media (max-width: 1023px) {
    #sticky-header {
        display: none !important;
    }
}

/* Staggered child reveal */
#sticky-header .sticky-anim {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
#sticky-header.visible .sticky-anim-first { transition-delay: 0.25s; }
#sticky-header.visible .sticky-anim-mid   { transition-delay: 0.32s; }
#sticky-header.visible .sticky-anim-last  { transition-delay: 0.4s; }
#sticky-header.visible .sticky-anim {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================================
   05. HERO CARD (DARK ATMOSPHERIC)
   ============================================================ */

.hero-card-dark {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 25% 45%, rgba(109, 138, 176, 0.7), transparent 40%),
        radial-gradient(circle at 75% 85%, rgba(176, 21, 53, 0.35), transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(109, 138, 176, 0.5), transparent 45%),
        linear-gradient(135deg, #5c7694 0%, #6d8ab0 50%, #5c7694 100%);
}

/* Animated background layer */
.hero-bg-layer {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 25% 45%, rgba(109, 138, 176, 0.7), transparent 40%),
        radial-gradient(circle at 75% 85%, rgba(176, 21, 53, 0.35), transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(109, 138, 176, 0.5), transparent 45%),
        linear-gradient(135deg, #5c7694 0%, #6d8ab0 50%, #5c7694 100%);
    animation: heroBackgroundPulse 12s ease-in-out infinite;
    will-change: transform;
}

/* Orbital arc — top-left */
.hero-card-dark::before {
    content: '';
    position: absolute;
    width: 650px;
    height: 650px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: -220px;
    left: -220px;
    pointer-events: none;
    animation: floatArcTop 5s ease-in-out infinite;
    z-index: 0;
}

/* Orbital arc — bottom-right */
.hero-card-dark::after {
    content: '';
    position: absolute;
    width: 850px;
    height: 850px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    bottom: -350px;
    right: -350px;
    pointer-events: none;
    animation: floatArcBottom 6s ease-in-out infinite;
    z-index: 0;
}

/* Hero content sits above decorative layers.
   Excludes bg layer (below content) and mobile menu (absolutely positioned). */
.hero-card-dark > *:not(.hero-bg-layer):not(.mobile-menu) {
    position: relative;
    z-index: 1;
}


/* ============================================================
   06. BUTTONS
   ============================================================ */

/* Primary CTA — brand red gradient */
.btn-contrast {
    display: inline-block;
    background: linear-gradient(135deg, #b01535, #8f0f2b);
    color: #ffffff;
    font-weight: 500;
    padding: 0.75rem 1.75rem;
    border-radius: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-align: center;
    white-space: nowrap;
}
@media (hover: hover) {
    .btn-contrast:hover {
        background: linear-gradient(135deg, #c01e45, #b01535);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(176, 21, 53, 0.35);
    }
}
.btn-contrast:active {
    transform: scale(0.96);
    background: linear-gradient(135deg, #8f0f2b, #6d0a20);
    box-shadow: 0 2px 8px rgba(176, 21, 53, 0.25);
}

/* Small variant */
.btn-contrast-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
}

/* Pricing card CTA — outline variant for Foundation / Custom Build cards */
.btn-pricing-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #f8f9fb;
    color: #b01535;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    box-shadow: inset 0 0 0 1px rgba(176, 21, 53, 0.3);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}
@media (hover: hover) {
    .btn-pricing-outline:hover {
        background: #fef2f4;
        transform: translateY(-2px);
        box-shadow: inset 0 0 0 1px rgba(176, 21, 53, 0.6), 0 8px 20px rgba(176, 21, 53, 0.15);
    }
}
.btn-pricing-outline:active {
    transform: scale(0.96);
    background: #fce7eb;
    box-shadow: 0 2px 6px rgba(176, 21, 53, 0.15);
}
.btn-pricing-outline:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #b01535;
}

/* Touch hardening for buttons on iOS/iPadOS */
.btn-contrast,
.btn-contrast-sm,
.btn-cta-outline-light,
.btn-pricing-outline {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

/* Outline CTA — for dark backgrounds */
.btn-cta-outline-light {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
    color: #ffffff;
    font-weight: 500;
    padding: 0.75rem 1.75rem;
    border-radius: 0.75rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    text-align: center;
}
@media (hover: hover) {
    .btn-cta-outline-light:hover {
        background: rgba(255,255,255,0.15);
        border-color: rgba(255,255,255,0.5);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(255,255,255,0.2);
    }
}
.btn-cta-outline-light:active {
    background: rgba(255,255,255,0.22);
    transform: scale(0.96);
}

/* Keyboard focus ring */
.btn-contrast:focus-visible,
.btn-contrast-sm:focus-visible,
.btn-cta-outline-light:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #b01535;
    transform: translateY(-2px);
}


/* ============================================================
   07. MARQUEE
   ============================================================ */

.animate-marquee {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}
.animate-marquee > span {
    transition: color 0.2s ease;
}
@media (hover: hover) {
    .animate-marquee:hover {
        animation-play-state: paused;
    }
    .animate-marquee:hover > span:not(.text-slate-300) {
        color: #0f172a;
    }
}


/* ============================================================
   08. FAQ ACCORDION
   ============================================================ */

.faq-answer {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.45s ease,
                padding 0.45s ease,
                visibility 0s linear 0.55s;
}
.faq-item.active .faq-answer {
    max-height: 1000px;
    visibility: visible;
    opacity: 1;
    padding-top: 12px;
    padding-bottom: 1.5rem;
    transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.45s ease,
                padding 0.45s ease,
                visibility 0s linear 0s;
}
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-icon { transition: transform 0.45s ease; }

/* Focus ring — uses :has() when supported, falls back to inner outline */
.faq-trigger:focus-visible {
    outline: 2px solid #b01535;
    outline-offset: -4px;
}
@supports selector(:has(*)) {
    .faq-trigger:focus-visible {
        outline: none;
    }
    .faq-item:has(.faq-trigger:focus-visible) {
        outline: 2px solid #b01535;
        outline-offset: 2px;
    }
}

/* ============================================================
   09. JOURNEY / FLOW (INDEX SERVICES SECTION)
   ============================================================ */

/* Journey connector — horizontal on desktop, vertical on mobile */
.journey-connector {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.connector-line {
    position: relative;
    flex-shrink: 0;
    overflow: visible;
}
.connector-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #b01535;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(176,21,53,0.9);
    will-change: top;
}

/* Desktop: horizontal */
@media (min-width: 1024px) {
    .journey-connector {
        width: 4rem;
        flex-shrink: 0;
    }
    .connector-line {
        width: calc(100% + 2rem);
        margin-left: -1rem;
        height: 2px;
        background: linear-gradient(to right, rgba(0,0,0,0.06), rgba(176,21,53,0.6), rgba(0,0,0,0.06));
    }
    .connector-dot {
        top: 50%;
        left: -6px;
        transform: translateY(-50%);
        opacity: 0;
        animation: flowDot 6.6s linear infinite;
        animation-play-state: paused;
    }
}

/* Mobile + tablet: vertical, scroll-driven dot */
@media (max-width: 1023px) {
    .journey-connector {
        width: 100%;
        height: 3.5rem;
        padding: 0;
    }
    .connector-line {
        width: 2px;
        height: calc(100% + 2rem);
        margin-top: -1rem;
        background: linear-gradient(to bottom, rgba(0,0,0,0.06), rgba(176,21,53,0.6), rgba(0,0,0,0.06));
        transform: translateZ(0);
    }
    .connector-dot {
        display: none;
    }
}

/* Tablet only — longer journey connector lines */
@media (min-width: 768px) and (max-width: 1023px) {
    .journey-connector {
        height: 5.5rem;
    }
}

.journey-card {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: none;
}
@media (hover: hover) {
    .journey-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    }
}

/* Continuous optimization loop */
.expansion-loop {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 9999px;
    background: #ffffff;
    animation: loopPulse 3s ease-in-out infinite;
}
.loop-connector-pair {
    display: flex;
    gap: 20px;
    justify-content: center;
}
.vertical-loop-connector {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 2px;
    height: 3.5rem;
    background: rgba(0,0,0,0.08);
    overflow: visible;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
/* Extend line upward — hidden under Managed Retainer card */
.vertical-loop-connector::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 1rem;
    top: -1rem;
    left: 0;
    background: rgba(0,0,0,0.08);
}
/* Extend line downward — hidden under Continuous Optimization pill */
.vertical-loop-connector::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 1rem;
    bottom: -1rem;
    left: 0;
    background: rgba(0,0,0,0.08);
}
.loop-dot {
    position: absolute;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 9999px;
    box-shadow: 0 0 10px rgba(52,211,153,0.9);
    transform: translateX(-50%);
}
.loop-dot.down { animation: loopDown 2.2s ease-in-out infinite; }
.loop-dot.up   { animation: loopUp 2.2s ease-in-out infinite; }

.spin-slow {
    display: inline-block;
    animation: spin 3s linear infinite;
}

/* Stagger journey connector dots so one dot travels through all connectors */
.journey-connector:nth-child(2) .connector-dot { animation-delay: 0s; }
.journey-connector:nth-child(4) .connector-dot { animation-delay: 2.2s; }
.journey-connector:nth-child(6) .connector-dot { animation-delay: 4.4s; }

/* Start dot animations when the services section enters the viewport */
#services.journey-started .connector-dot {
    animation-play-state: running;
}

/* ============================================================
   10. GLASS SURFACES
   ============================================================ */

.glass-box,
.glass-card,
.glass-panel {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 8px 32px rgba(0,0,0,0.05);
}


/* ============================================================
   11. STATEMENT CARD (PRICING)
   ============================================================ */

.statement-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.18), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(176, 21, 53, 0.22), transparent 50%),
        linear-gradient(135deg, #1e293b 0%, #0f172a 60%, #1e293b 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
}

/* Shine beam — sweeps left-to-right when .shine-active is added */
.statement-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 35%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0.06) 65%,
        transparent 100%
    );
    transform: rotate(25deg);
    pointer-events: none;
    opacity: 0;
    z-index: 1;
}
.statement-card.shine-active::after {
    animation: statementShine 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Content sits above the shine */
.statement-card > * {
    position: relative;
    z-index: 2;
}


/* ============================================================
   12. SCALABILITY MULTIPLIER (PRICING)
   ============================================================ */

/* Cascading 3-column grid with staggered offsets */
.cascade-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4.5rem;
}
@media (min-width: 768px) {
    .cascade-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2.5rem;
        align-items: start;
    }
    .cascade-step-1 { margin-top: 0; }
    .cascade-step-2 { margin-top: 2.75rem; }
    .cascade-step-3 { margin-top: 5.5rem; }
    .cascade-item.glass-card { min-height: 14rem; }
}

/* Card reveal — blur-in "coming into focus" effect */
.cascade-item {
    opacity: 0;
    transform: translateY(70px);
    filter: blur(6px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.cascade-item.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}
@media (hover: hover) {
    .cascade-item.visible:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    }
}

/* Glass card base — used by cascade cards */
.glass-card {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.05);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
}

/* Bubbles — tinted translucent, 3D via inset highlight */
.bubble { display: none; }

@media (min-width: 768px) {
    .bubble {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        position: absolute;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-radius: 9999px;
        padding: 0.85rem 1.5rem;
        font-size: 1.05rem;
        font-weight: 500;
        white-space: nowrap;
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
        pointer-events: none;
    }
    .bubble.show { opacity: 1; transform: translateY(0); }

    /* Bubble 1 — brand red (the problem) */
    .bubble-1 {
        top: -26px; right: -22px;
        color: #8f0f2b;
        background: radial-gradient(circle at 30% 25%, rgba(176,21,53,0.18) 0%, rgba(176,21,53,0.10) 55%, rgba(176,21,53,0.05) 100%);
        box-shadow: 0 8px 20px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.7);
    }
    /* Bubble 2 — slate (the mechanism) */
    .bubble-2 {
        bottom: -26px; left: -22px;
        color: #475569;
        background: radial-gradient(circle at 30% 25%, rgba(148,163,184,0.20) 0%, rgba(148,163,184,0.11) 55%, rgba(148,163,184,0.06) 100%);
        box-shadow: 0 8px 20px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.75);
    }
    /* Bubble 3 — emerald (the win) */
    .bubble-3 {
        top: -26px; left: -22px;
        color: #059669;
        background: radial-gradient(circle at 30% 25%, rgba(16,185,129,0.18) 0%, rgba(16,185,129,0.10) 55%, rgba(16,185,129,0.05) 100%);
        box-shadow: 0 8px 20px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.75);
    }
    .bubble.floating { animation: bubbleFloat 4.5s ease-in-out infinite; }
}

/* Human icon row — animated person loop */
.human-icon-row {
    display: grid;
    grid-template-columns: repeat(5, auto);
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.75rem;
    margin: 1.25rem 0;
}
.human-icon {
    display: inline-block;
    width: 2.5rem;
    height: 2.5rem;
    color: #818cf8;
    line-height: 1;
    opacity: 0;
    transform: translateY(6px) scale(0.9);
    transition: opacity 2.4s cubic-bezier(0.16,1,0.3,1),
                transform 2.4s cubic-bezier(0.16,1,0.3,1);
}
.human-icon.visible { opacity: 1; transform: translateY(0) scale(1); }
.human-icon.leaving { opacity: 0; transform: translateY(-6px) scale(0.9); }

/* Gear spinner — automation card */
.gear-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.25rem 0;
}
.gear-spin { display: inline-block; animation: gearSpin 3.4s linear infinite; }
.gear-svg {
    width: 2.5rem;
    height: 2.5rem;
    color: #f87171;
    filter: drop-shadow(0 0 12px rgba(248,113,113,0.5));
}

/* Cost counter — result card */
.cost-counter {
    font-size: 3rem;
    line-height: 1;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.75rem 0;
    transition: transform 0.3s ease;
}
.cost-counter.pop       { animation: resultPop 0.4s ease; }
.cost-counter.resetting { animation: resultBlurOut 0.45s ease forwards; }
.cost-counter.appearing { animation: resultBlurIn 0.45s ease forwards; }

.card-copy {
    color: #64748b;
    font-size: 1rem;
}


/* ============================================================
   13. ROADMAP PHASES (ABOUT PAGE)
   ============================================================ */

.roadmap-phase {
    position: relative;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(4px 0 8px rgba(0,0,0,0.15));
}
@media (hover: hover) {
    .roadmap-phase:hover {
        filter: drop-shadow(6px 14px 20px rgba(0,0,0,0.22));
    }
}

/* Layering — left phase overlaps onto the next */
.roadmap-phase-1 { z-index: 40; }
.roadmap-phase-2 { z-index: 30; }
.roadmap-phase-3 { z-index: 20; }


/* ============================================================
   14. FORM INPUTS
   ============================================================ */

/* Hide native number spinner — we use custom buttons */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Prevent iOS auto-zoom on form focus */
input[type="text"],
input[type="email"],
input[type="number"],
textarea {
    font-size: 16px;
}

/* ============================================================
   15. UTILITIES
   ============================================================ */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
@media (hover: hover) {
    .hover-lift:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    }
    .hover-lift:active {
        transform: scale(0.98);
    }
}

@media (hover: hover) {
    .group:hover .icon-box svg {
        transform: scale(1.15) rotate(-5deg);
    }
}

/* Uniform hero H1 height — reserves 3 lines at mobile, 2 lines at desktop */
.hero-title-uniform {
    display: grid;
    align-content: end;
    min-height: 8.5rem;
}
@media (min-width: 640px) {
    .hero-title-uniform { min-height: 7.5rem; }
}
@media (min-width: 768px) {
    .hero-title-uniform { min-height: 9.375rem; }
}

/* Subpage hero — consistent minimum height across all breakpoints */
.hero-content-full {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 1023px) {
    .hero-content-full {
        min-height: 24rem;
    }
}
@media (min-width: 1024px) {
    .hero-content-full {
        min-height: calc(100vh - 8rem);
    }
}

/* Mobile + tablet: tighten spacing between hero and the section below,
   so the next section peeks into the fold and the page doesn't feel empty */
@media (max-width: 1023px) {
    #hero + section {
        padding-top: 2rem;
    }
}

/* Touch-only press feedback for text links */
@media (hover: none) {
    a:active {
        opacity: 0.6;
    }
}

/* ============================================================
   16. MOBILE NAVIGATION
   ============================================================ */

/* Hide desktop hero CTA on mobile */
@media (max-width: 1023px) {
    .mobile-hide { display: none !important; }
    #hero .btn-contrast.btn-contrast-sm { display: none !important; }
}

/* Hamburger — sits in the hero header row */
.hamburger {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    color: #ffffff;
    position: relative;
    z-index: 50;
}
@media (max-width: 1023px) {
    .hamburger { display: flex; }
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Dropdown panel — absolutely positioned inside the hero card */
.mobile-menu {
    position: absolute;
    top: 3.75rem;
    left: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 1rem;
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-height: 0;
    z-index: 40;
    transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s ease,
                visibility 0s linear 0.55s;
}
.mobile-menu.open {
    max-height: 24rem;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s ease,
                visibility 0s linear 0s;
}

.mobile-menu-nav {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.mobile-menu-nav a {
    display: block;
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    color: #1e293b;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
}
@media (hover: hover) {
    .mobile-menu-nav a:hover {
        background: #f8f9fb;
    }
}
@media (hover: none) {
    .mobile-menu-nav a:active {
        color: #0f172a;
        background: transparent;
    }
}
