/* SimpleFlex marketing site — custom layer on top of Tailwind v4 (browser build) */

html { scroll-behavior: smooth; }
/* Figtree renders optically smaller than the old Sora — lift the root size ~6% so the
   whole type scale (rem-based) regains its presence without touching per-element sizes. */
html { font-size: 106.25%; }

/* ---- Typography: Figtree for headings, hero copy and the wordmark (2026-07-10) ----
   .font-display is compiled to Sora in the prebuilt tailwind.css — this override (site.css
   loads later) rebinds every heading to Figtree without a Tailwind rebuild. Hero sections
   (.mesh-bg) cascade Figtree into ALL their text, per design decision. */
.font-display { font-family: "Figtree", "Sora", system-ui, sans-serif; font-weight: 800; letter-spacing: -.01em; }
.mesh-bg { font-family: "Figtree", "Inter", system-ui, sans-serif; }

/* ---- Brand wordmark (logotype shown next to the colourful mark) ---- */
.brand-wordmark {
    font-family: "Figtree", system-ui, sans-serif;
    text-transform: uppercase;
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .08em;
}

/* ---- Scroll reveal ---- */
[data-animate] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
    transition-delay: var(--d, 0s);
}
[data-animate].in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    [data-animate] { opacity: 1; transform: none; transition: none; }
}

/* ---- Dark hero mesh background ---- */
.mesh-bg { position: relative; overflow: hidden; isolation: isolate; }
.mesh-bg::before,
.mesh-bg::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 9999px;
    filter: blur(90px);
    pointer-events: none;
}
.mesh-bg::before {
    width: 640px; height: 640px;
    left: -160px; top: -240px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, .30), transparent 65%);
}
.mesh-bg::after {
    width: 560px; height: 560px;
    right: -140px; bottom: -260px;
    background: radial-gradient(circle at center, rgba(67, 56, 202, .24), transparent 65%);
}
.mesh-accent {
    position: absolute;
    z-index: -1;
    width: 420px; height: 420px;
    left: 50%; top: 30%;
    transform: translateX(-50%);
    border-radius: 9999px;
    filter: blur(110px);
    background: radial-gradient(circle at center, rgba(16, 185, 129, .14), transparent 70%);
    pointer-events: none;
}

/* ---- Dark-section texture: aurora beams + film grain (class name kept for markup compat) ---- */
.grid-pattern {
    background:
        radial-gradient(ellipse 75% 55% at 50% -12%, rgba(99, 102, 241, .18), transparent 62%),
        radial-gradient(ellipse 40% 38% at 86% 18%, rgba(129, 140, 248, .07), transparent 70%),
        linear-gradient(112deg, transparent 40%, rgba(165, 180, 252, .055) 47%, rgba(129, 140, 248, .03) 50%, transparent 58%);
}
.grid-pattern::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: .05;
    pointer-events: none;
}

/* ---- Glass card (on dark) ---- */
.glass {
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .17);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ---- Gradient text ---- */
.text-gradient {
    background: linear-gradient(120deg, #c7d2fe 0%, #818cf8 45%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---- Primary CTA glow ---- */
.btn-glow { box-shadow: 0 8px 40px -10px rgba(79, 70, 229, .65); }
.btn-glow:hover { box-shadow: 0 10px 48px -8px rgba(79, 70, 229, .8); }

/* ---- Mock app window: light, like the actual admin UI ---- */
.mock-window {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, .2);
    background: #fff;
    box-shadow: 0 30px 80px -20px rgba(2, 8, 23, .8);
    overflow: hidden;
}
.mock-topbar {
    display: flex; align-items: center; gap: .4rem;
    padding: .65rem .9rem;
    border-bottom: 1px solid rgb(241 245 249);
    background: rgb(248 250 252);
}
.mock-dot { width: .6rem; height: .6rem; border-radius: 9999px; }

/* light variant used on light sections */
.mock-window-light {
    border-radius: 1rem;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    box-shadow: 0 24px 60px -24px rgba(15, 23, 42, .25);
    overflow: hidden;
}
.mock-topbar-light {
    display: flex; align-items: center; gap: .4rem;
    padding: .6rem .9rem;
    border-bottom: 1px solid rgb(241 245 249);
    background: rgb(248 250 252);
}

/* ---- Pulsing status dot ---- */
.pulse-dot { position: relative; }
.pulse-dot::after {
    content: "";
    position: absolute; inset: -4px;
    border-radius: 9999px;
    border: 2px solid currentColor;
    opacity: .5;
    animation: pulse-ring 2s cubic-bezier(.2, .6, .4, 1) infinite;
}
@keyframes pulse-ring {
    0% { transform: scale(.6); opacity: .6; }
    80%, 100% { transform: scale(1.4); opacity: 0; }
}

/* ---- Floating hero ornaments ---- */
.float-slow { animation: float-y 7s ease-in-out infinite; }
.float-slower { animation: float-y 9s ease-in-out 1.2s infinite; }
@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ---- Sticky mobile CTA bar ---- */
#mobile-cta {
    transform: translateY(120%);
    transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
#mobile-cta.visible { transform: translateY(0); }

/* ---- SVG flow lines: drawn when scrolled into view ---- */
.draw-path {
    stroke-dasharray: var(--len, 600);
    stroke-dashoffset: var(--len, 600);
    transition: stroke-dashoffset 1.6s cubic-bezier(.4, 0, .2, 1) var(--d, 0s);
}
.in-view .draw-path, .draw-path.in-view { stroke-dashoffset: 0; }
.flow-dash { stroke-dasharray: 6 8; animation: flow-dash 1.2s linear infinite; }
@keyframes flow-dash { to { stroke-dashoffset: -14; } }
@media (prefers-reduced-motion: reduce) {
    .flow-dash { animation: none; }
    .draw-path { stroke-dashoffset: 0; transition: none; }
}

/* ---- 3D tilt on hero visual ---- */
.tilt-wrap { perspective: 1200px; }
.tilt { transform-style: preserve-3d; transition: transform .25s ease-out; will-change: transform; }

/* ---- Hover lift for cards ---- */
.lift { transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s cubic-bezier(.16, 1, .3, 1); }
.lift:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -20px rgba(15, 23, 42, .25); }

/* ---- Animated progress bar fills ---- */
.bar-fill { width: 0; transition: width 1.1s cubic-bezier(.4, 0, .2, 1) var(--d, .2s); }
.in-view .bar-fill { width: var(--w, 60%); }

/* ---- Week-grid cells: staggered pop-in on reveal (per-cell delay via --d) ---- */
.wg-cell { opacity: 0; transform: scale(.6); transition: opacity .35s ease var(--d, 0s), transform .35s cubic-bezier(.34, 1.56, .64, 1) var(--d, 0s); }
.in-view .wg-cell { opacity: 1; transform: scale(1); }
@media (prefers-reduced-motion: reduce) { .wg-cell { opacity: 1; transform: none; transition: none; } }

/* ---- Exit-intent modal entrance ---- */
#exit-intent > div { animation: exit-pop .32s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes exit-pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---- Marquee for integration logos ---- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent); mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent); }
.marquee-track { display: flex; gap: 2.5rem; width: max-content; animation: marquee 28s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
