/* ============================================================
 * Zyntio – Landing Page Styles
 * ============================================================
 * Custom styles that complement Tailwind CSS utility classes.
 * Organised by component / section.
 * ============================================================ */


/* ──────────────────────────────────────────────────────────────
 * 1. BASE / RESET
 * ────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: 'DM Sans', sans-serif;
}

:root {
  color-scheme: dark;
}


/* ──────────────────────────────────────────────────────────────
 * 2. CUSTOM SCROLLBAR
 * ────────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #09241c;
}

::-webkit-scrollbar-thumb {
  background: #279970;
  border-radius: 3px;
}


/* ──────────────────────────────────────────────────────────────
 * 3. BRAND TEXT GRADIENT
 *    Used on hero headline, CTA heading, and similar accents.
 * ────────────────────────────────────────────────────────────── */

.text-gradient {
  background: linear-gradient(135deg, #48b488 0%, #7dcfac 50%, #a8e6cb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ──────────────────────────────────────────────────────────────
 * 4. GRID BACKGROUND
 *    Subtle dot-grid pattern used behind the hero section.
 * ────────────────────────────────────────────────────────────── */

.grid-bg {
  background-image:
    linear-gradient(rgba(72, 180, 136, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 180, 136, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}


/* ──────────────────────────────────────────────────────────────
 * 5. GLOW CARD
 *    Hover-lift effect with a subtle brand-coloured glow.
 * ────────────────────────────────────────────────────────────── */

.glow-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.glow-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 40px -6px rgba(72, 180, 136, 0.22);
}


/* ──────────────────────────────────────────────────────────────
 * 6. TYPEWRITER CURSOR
 *    Blinking pipe character appended to the hero typewriter.
 * ────────────────────────────────────────────────────────────── */

.tw-cursor::after {
  content: '|';
  color: #48b488;
  animation: blink 0.8s step-end infinite;
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}


/* ──────────────────────────────────────────────────────────────
 * 7. SCROLL-REVEAL
 *    Elements enter with a fade-up; class is toggled by IO so
 *    the animation replays when scrolling back into view.
 * ────────────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* Staggered delay helpers (100 ms increments) */
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }


/* ──────────────────────────────────────────────────────────────
 * 8. FLOATING BADGES (Hero)
 *    Gentle up-down float applied to the "14 h saved" and
 *    "Workflow ran just now" badges.
 * ────────────────────────────────────────────────────────────── */

@keyframes floatA {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@keyframes floatB {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.float-a { animation: floatA 4s ease-in-out infinite; }
.float-b { animation: floatB 5s ease-in-out 0.8s infinite; }


/* ──────────────────────────────────────────────────────────────
 * 9. PULSE DOT
 *    Expanding ring animation for live-status indicators.
 * ────────────────────────────────────────────────────────────── */

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0   rgba(72, 180, 136, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(72, 180, 136, 0); }
  100% { box-shadow: 0 0 0 0   rgba(72, 180, 136, 0); }
}

.pulse-dot {
  animation: pulseRing 2s ease-out infinite;
}


/* ──────────────────────────────────────────────────────────────
 * 10. CTA SECTION – Animated gradient mesh + glowing orbs
 * ────────────────────────────────────────────────────────────── */

@keyframes meshMove {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

.cta-mesh {
  background: linear-gradient(
    135deg,
    #09241c 0%,
    #0f3d2a 20%,
    #124031 40%,
    #1a6b4a 55%,
    #0f3d2a 70%,
    #09241c 100%
  );
  background-size: 300% 300%;
  animation: meshMove 10s ease infinite;
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.1); }
}

.cta-orb {
  animation: orbPulse 5s ease-in-out infinite;
}


/* ──────────────────────────────────────────────────────────────
 * 11. HERO BADGE – Shine sweep
 *     A subtle diagonal highlight that sweeps across the
 *     "Now in public beta" badge.
 * ────────────────────────────────────────────────────────────── */

@keyframes shineSweep {
  0%        { left: -80%; }
  60%, 100% { left: 120%; }
}

.shine-badge {
  position: relative;
  overflow: hidden;
}

.shine-badge::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 50%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.14),
    transparent
  );
  animation: shineSweep 3.5s ease-in-out infinite;
}


/* ──────────────────────────────────────────────────────────────
 * 12. SWIPER PAGINATION – Brand-coloured bullets
 * ────────────────────────────────────────────────────────────── */

.swiper-pagination-bullet {
  background: #279970 !important;
  opacity: 0.4;
}

.swiper-pagination-bullet-active {
  opacity: 1 !important;
}


/* ──────────────────────────────────────────────────────────────
 * 13. NAVBAR
 *     Transparent by default; gains a frosted-glass background
 *     + bottom border after scrolling past 20 px.
 * ────────────────────────────────────────────────────────────── */

#navbar {
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    backdrop-filter 0.3s ease;
}

#navbar.scrolled {
  background-color: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(55, 65, 81, 0.5);
}


/* ──────────────────────────────────────────────────────────────
 * 14. OFFCANVAS MOBILE MENU
 *     Slides in from the right. Overlay darkens the page behind.
 * ────────────────────────────────────────────────────────────── */

/* Dark overlay behind the panel */
#mobile-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* The panel itself */
#mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Decorative background inside the mobile menu */
.offcanvas-glow {
  background: radial-gradient(
    ellipse 120% 60% at 80% -20%,
    rgba(39, 153, 112, 0.22),
    transparent
  );
}

.offcanvas-grid {
  background-image:
    linear-gradient(rgba(72, 180, 136, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 180, 136, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}


/* ──────────────────────────────────────────────────────────────
 * 15. FAQ ACCORDION
 *     Hover highlights the entire item (header + body together)
 *     so they don't feel disconnected.
 * ────────────────────────────────────────────────────────────── */

.faq-item {
  transition: background-color 0.2s ease;
}

.faq-item:hover {
  background-color: rgba(31, 41, 55, 0.5);
}

.faq-btn {
  padding: 1.25rem;
}

.faq-body {
  padding: 0 1.25rem 1.25rem;
}


/* ──────────────────────────────────────────────────────────────
 * 16. SCROLL-TO-TOP BUTTON
 *     Hidden by default; fades in after scrolling 400 px.
 *     Hidden when offcanvas menu is open (via JS class).
 * ────────────────────────────────────────────────────────────── */

#scroll-top.is-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}
