/* ============================================================
   DELEGO — Custom Design System & Animations
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --delego-deep-navy: #181A2F;
  --delego-navy: #181A2F;
  --delego-surface: #242E49;
  --delego-muted-blue: #37415C;
  --delego-slate: #37415C;
  --delego-coral: #FDA481;
  --delego-peach: #FDA481;
  --delego-red: #B4182D;
  --delego-burgundy: #54162B;

  --delego-white: #FFFFFF;
  --delego-text-light: rgba(255,255,255,0.92);
  --delego-text-muted: rgba(255,255,255,0.65);
  --delego-border-dark: rgba(255,255,255,0.10);

  --delego-radius: 0.75rem;
  --delego-radius-lg: 1rem;
  --delego-radius-xl: 1.5rem;
  --delego-transition: 280ms cubic-bezier(0.4, 0, 0.2, 1);
  --delego-shadow: 0 2px 8px rgba(0,0,0,0.18);
  --delego-shadow-md: 0 4px 16px rgba(0,0,0,0.22);
  --delego-shadow-lg: 0 8px 30px rgba(0,0,0,0.28);
  --delego-shadow-xl: 0 16px 50px rgba(0,0,0,0.32);

  /* --- Alias namespace used across component rules --- */
  --color-delego-deep-navy: #181A2F;
  --color-delego-navy: #181A2F;
  --color-delego-surface: #242E49;
  --color-delego-muted-blue: #37415C;
  --color-delego-slate: #37415C;
  --color-delego-coral: #FDA481;
  --color-delego-peach: #FDA481;
  --color-delego-red: #B4182D;
  --color-delego-burgundy: #54162B;
  --color-delego-white: #FFFFFF;
  --color-delego-text-light: rgba(255,255,255,0.92);
  --color-delego-text-muted: rgba(255,255,255,0.65);
  --color-delego-border-dark: rgba(255,255,255,0.10);

  /* --- Dark text (for light sections) --- */
  --delego-text-dark: #181A2F;
  --delego-text-dark-muted: #37415C;
  --color-delego-text-dark: #181A2F;
  --color-delego-text-dark-muted: #37415C;
  --color-delego-border-light: rgba(24,26,47,0.12);
}

/* --- Fixed DELEGO DaisyUI Theme --- */
/* Establishes ONE fixed theme: no toggle, no light/dark switching.
   Sections that need a light/neutral background opt in explicitly
   via the .section-light class defined below. */
[data-theme="delego"] {
  --color-base-100: #181A2F;
  --color-base-200: #242E49;
  --color-base-300: #37415C;
  --color-base-content: rgba(255,255,255,0.92);
  --color-primary: #FDA481;
  --color-primary-content: #181A2F;
  --color-secondary: #54162B;
  --color-secondary-content: #FFFFFF;
  --color-accent: #FDA481;
  --color-accent-content: #181A2F;
  --color-neutral: #242E49;
  --color-neutral-content: #FFFFFF;
  --color-info: #37415C;
  --color-info-content: #FFFFFF;
  --color-success: #10B981;
  --color-success-content: #FFFFFF;
  --color-warning: #F49400;
  --color-warning-content: #181A2F;
  --color-error: #B4182D;
  --color-error-content: #FFFFFF;
  --radius-selector: 0.75rem;
  --radius-field: 0.75rem;
  --radius-box: 1rem;
  --border: 1px;
  --depth: 0;
  --noise: 0;
}

/* ============================================================
   .section-accent — intentional accent section (burgundy)
   ============================================================ */
.section-accent {
  background:
    radial-gradient(circle at 85% 15%, rgba(253,164,129,0.14), transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(84,22,43,0.9), transparent 55%),
    var(--color-delego-burgundy);
  color: var(--color-delego-text-light);
}

.section-accent h1,
.section-accent h2,
.section-accent h3,
.section-accent h4 {
  color: var(--color-delego-white) !important;
}

.section-accent p,
.section-accent span {
  color: rgba(255,255,255,0.80) !important;
}

/* Neutralize the global opacity overrides inside accent sections */
.section-accent .opacity-80,
.section-accent .opacity-70,
.section-accent .opacity-60,
.section-accent .opacity-50,
.section-accent .opacity-40 {
  color: rgba(255,255,255,0.80) !important;
  opacity: 1 !important;
}

.section-accent .eyebrow-badge {
  background: rgba(253,164,129,0.16);
  color: var(--color-delego-peach) !important;
}

.section-accent .btn-primary {
  background: var(--color-delego-peach);
  color: var(--color-delego-burgundy);
}

.section-accent .btn-outline {
  border-color: rgba(255,255,255,0.45);
  color: var(--color-delego-white);
}

.section-accent .btn-outline:hover {
  background: var(--color-delego-white);
  color: var(--color-delego-burgundy);
}

/* --- Global Base --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  color: var(--delego-text-light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Navbar --- */
.navbar-glass {
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--delego-transition),
              border-color var(--delego-transition),
              box-shadow var(--delego-transition);
}

/* Fixed dark theme — show dark-bg logo, hide light-bg logo */
.logo-light { display: none; }
.logo-dark  { display: block; }

.navbar-glass.scrolled {
  background: var(--delego-navy);
  border-bottom-color: var(--delego-border-dark);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.nav-link {
  color: var(--color-delego-text-light);
  position: relative;
  font-family: "Poppins", "Roboto", sans-serif;
}

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

.nav-link.active {
  color: var(--delego-coral);
  font-weight: 600;
  background: rgba(253,164,129,0.08);
}

/* Ensure nav links are visible on scrolled navy navbar */
.navbar-glass.scrolled .nav-link {
  color: var(--color-delego-text-light);
}

.navbar-glass.scrolled .nav-link:hover {
  color: var(--color-delego-coral);
}

/* --- Mobile Menu --- */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24,30,47,0.8);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  z-index: 60;
  transform: translateX(100%);
  transition: transform 350ms cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.3);
}

.mobile-menu-drawer.active {
  transform: translateX(0);
}

.mobile-menu-drawer {
  background: var(--delego-navy);
  border-left: 1px solid var(--delego-border-dark);
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  /* clip (not hidden) keeps glows clipped but lets the sticky
     dashboard scroll animation work inside the hero */
  overflow: clip;
  background: var(--delego-navy);
}

/* Hero text must be visible on navy background */
.hero-section h1 {
  color: var(--color-delego-white);
}

.hero-section p {
  color: var(--color-delego-text-light);
}

/* Override opacity classes that make text unreadable on navy */
.hero-section .opacity-70,
.hero-section .opacity-60,
.hero-section .opacity-50 {
  color: var(--color-delego-text-light) !important;
  opacity: 1 !important;
}

/* Hero Background Decorations */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(24,30,47,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24,30,47,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, black 30%, transparent 70%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
}

.hero-glow-1 {
  top: -10%;
  right: 10%;
  background: radial-gradient(circle, rgba(253,164,129,0.55), transparent 70%);
}

.hero-glow-2 {
  bottom: -20%;
  left: 20%;
  background: radial-gradient(circle, rgba(84,22,43,0.8), transparent 70%);
  opacity: 0.6;
}



/* --- Hero Floating Cards --- */
.hero-cards-container {
  position: relative;
  width: 100%;
  height: 520px;
  perspective: 1200px;
}

@media (max-width: 1023px) {
  .hero-cards-container {
    height: 380px;
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (max-width: 639px) {
  .hero-cards-container {
    height: 320px;
    max-width: 100%;
  }
}

.hero-card {
  position: absolute;
  border-radius: var(--delego-radius-lg);
  background:
    linear-gradient(135deg, rgba(36,46,73,0.88), rgba(24,26,47,0.95));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.35),
    0 0 0 1px rgba(255,255,255,0.05),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 400ms ease;
  will-change: transform;
  backface-visibility: hidden;
}

.hero-card:hover {
  box-shadow:
    0 20px 56px rgba(0,0,0,0.45),
    0 0 0 1px rgba(253,164,129,0.25),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Hero card positioning */
.hero-card-1 {
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
}

.hero-card-2 {
  top: 15%;
  right: 10%;
  width: 200px;
}

.hero-card-3 {
  bottom: 20%;
  left: 5%;
  width: 220px;
}

.hero-card-4 {
  top: 10%;
  left: 5%;
  width: 180px;
}

.hero-card-5 {
  bottom: 10%;
  right: 5%;
  width: 180px;
}

/* Ensure cards don't overlap the main content area excessively */
@media (max-width: 1023px) {
  .hero-card-1 {
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
  }

  .hero-card-2 {
    top: 25%;
    right: 5%;
    width: 180px;
  }

  .hero-card-3 {
    bottom: 30%;
    left: 2%;
    width: 200px;
  }

  .hero-card-4 {
    top: 20%;
    left: 2%;
    width: 160px;
  }

  .hero-card-5 {
    bottom: 20%;
    right: 2%;
    width: 160px;
  }
}

@media (max-width: 639px) {
  .hero-card-1 {
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
  }

  .hero-card-2 {
    top: 35%;
    right: 3%;
    width: 150px;
  }

  .hero-card-3 {
    bottom: 40%;
    left: 1%;
    width: 170px;
  }

  .hero-card-4 {
    top: 30%;
    left: 1%;
    width: 140px;
  }

  .hero-card-5 {
    bottom: 35%;
    right: 1%;
    width: 140px;
  }
}

/* --- Hero Card Inner Styles --- */
.hero-card-inner {
  padding: 1rem;
  font-size: 0.8125rem;
}

.hero-card-inner .card-label {
  font-family: "Poppins", "Roboto", sans-serif;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  opacity: 0.5;
  margin-bottom: 0.375rem;
}

.hero-card-inner .card-title {
  font-family: "Raleway", "Poppins", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero-card-inner .card-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.hero-card-inner .card-change {
  font-size: 0.75rem;
  font-weight: 600;
}

.card-change.positive { color: #10B981; }
.card-change.negative { color: var(--delego-red); }

/* Mini chart bars */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
}

.mini-chart-bar {
  width: 6px;
  border-radius: 2px;
  background: var(--delego-coral);
  opacity: 0.7;
  transition: opacity 200ms;
}

.mini-chart-bar:nth-child(even) { opacity: 0.4; }

/* Workflow steps in card */
.workflow-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.75rem;
}

.workflow-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.workflow-step-line {
  width: 2px;
  height: 12px;
  margin-left: 3px;
  opacity: 0.2;
}

[data-theme="delego"] .workflow-step-line { background: var(--delego-text-muted); }

/* Chat bubble in hero card */
.chat-bubble-mini {
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.5;
  max-width: 90%;
}

.chat-bubble-mini.user {
  background: var(--delego-coral);
  color: var(--delego-navy);
  margin-left: auto;
  border-bottom-right-radius: 0.25rem;
}

[data-theme="delego"] .chat-bubble-mini.ai {
  background: var(--delego-surface);
  color: var(--delego-text-muted);
  border-bottom-left-radius: 0.25rem;
}

.chat-bubble-mini.ai {
  background: var(--delego-surface);
  color: var(--delego-text-muted);
  border-bottom-left-radius: 0.25rem;
}

/* --- Buttons --- */
.btn {
  color: var(--btn-fg, var(--color-base-content));
  background-color: var(--btn-bg);
  border-color: var(--btn-border);
  padding-inline: var(--btn-p);
  border-radius: var(--delego-radius);
}

.hero-section .btn {
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.hero-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--delego-shadow-lg);
}

/* ============================================================
   Card System — DELEGO Fixed Theme
   ============================================================ */

/* Service cards */
.service-card {
  border-radius: var(--delego-radius-lg);
  padding: 1.75rem;
  background:
    linear-gradient(180deg, rgba(253,164,129,0.06), transparent 55%),
    var(--color-delego-surface);
  border: 1px solid var(--color-delego-border-dark);
  box-shadow: var(--delego-shadow-md);
  transition: transform var(--delego-transition),
              box-shadow var(--delego-transition),
              border-color var(--delego-transition);
  cursor: default;
  position: relative;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(253,164,129,0.5), transparent);
  opacity: 0;
  transition: opacity var(--delego-transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--delego-shadow-xl);
  border-color: var(--color-delego-coral);
}

.service-card:hover::after {
  opacity: 1;
}

/* Service card text must be readable */
.service-card p,
.service-card h3,
.service-card h4,
.service-card span,
.service-card a {
  color: var(--color-delego-text-light) !important;
}

.service-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: var(--color-delego-coral);
  color: var(--color-delego-navy);
}

/* Feature cards */
.feature-card {
  border-radius: var(--delego-radius-lg);
  padding: 1.5rem;
  background:
    linear-gradient(180deg, rgba(253,164,129,0.05), transparent 55%),
    var(--color-delego-surface);
  border: 1px solid var(--color-delego-border-dark);
  box-shadow: var(--delego-shadow-md);
  transition: transform var(--delego-transition),
              box-shadow var(--delego-transition),
              border-color var(--delego-transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-delego-coral);
  box-shadow: var(--delego-shadow-xl);
}

/* Industry cards */
.industry-card {
  border-radius: var(--delego-radius-lg);
  padding: 2rem 1.5rem;
  background:
    linear-gradient(180deg, rgba(253,164,129,0.06), transparent 55%),
    var(--color-delego-surface);
  border: 1px solid var(--color-delego-border-dark);
  text-align: center;
  transition: transform var(--delego-transition),
              box-shadow var(--delego-transition),
              border-color var(--delego-transition);
  position: relative;
}

.industry-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 2rem;
  right: 2rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-delego-coral), transparent);
  opacity: 0;
  transition: opacity var(--delego-transition);
}

.industry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--delego-shadow-xl);
  border-color: var(--color-delego-coral);
}

.industry-card:hover::after {
  opacity: 0.8;
}

.industry-card .industry-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: var(--color-delego-coral);
  color: var(--color-delego-navy);
}

/* Workflow nodes */
.workflow-node {
  border-radius: var(--delego-radius);
  padding: 1rem 1.5rem;
  background: var(--color-delego-surface);
  border: 1px solid var(--color-delego-border-dark);
  box-shadow: var(--delego-shadow);
  text-align: center;
  font-weight: 500;
  font-size: 0.875rem;
}

.workflow-node:hover {
  transform: scale(1.03);
  box-shadow: var(--delego-shadow-md);
}

/* Timeline steps */
.timeline-step-number {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-weight: 700;
  font-size: 1.125rem;
  transition: transform 300ms ease, box-shadow 300ms ease;
  background: var(--color-delego-surface);
  color: var(--color-delego-white);
  border: 2px solid var(--color-delego-border-dark);
  box-shadow: var(--delego-shadow);
}

.timeline-step-number:hover {
  transform: scale(1.1);
  box-shadow: var(--delego-shadow-lg);
}

/* Notification rows */
.notif-row {
  border-radius: var(--delego-radius);
  padding: 0.75rem 1rem;
  background: rgba(253,164,129,0.10);
  border: 1px solid rgba(253,164,129,0.30);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notif-row .text {
  color: var(--color-delego-coral);
}

/* Badges */
.badge {
  border-radius: var(--delego-radius);
  font-weight: 500;
  font-size: 0.75rem;
}

.badge-primary {
  background: var(--color-delego-coral);
  color: var(--color-delego-navy);
}

.badge-success {
  background: rgba(16,185,129,0.15);
  color: var(--color-delego-text-light);
}

.badge-info {
  background: rgba(59,130,246,0.15);
  color: var(--color-delego-text-light);
}

.badge-warning {
  background: rgba(244,146,0,0.15);
  color: var(--color-delego-text-light);
}

.badge-secondary {
  background: rgba(107,114,128,0.15);
  color: var(--color-delego-text-light);
}

.badge-accent {
  background: var(--color-delego-coral);
  color: var(--color-delego-navy);
}

/* ============================================================
   Card Text Readability
   ============================================================ */

/* Ensure all card text is readable */
.service-card p,
.service-card h3,
.service-card h4,
.service-card span,
.industry-card p,
.industry-card h3,
.workflow-node p,
.timeline-step-number,
.notif-row .text,
.badge {
  color: var(--color-delego-text-light) !important;
}

/* Override low opacity in cards */
.service-card .opacity-60,
.service-card .opacity-50,
.service-card .opacity-40,
.industry-card .opacity-60,
.industry-card .opacity-50,
.workflow-node .opacity-60,
.workflow-node .opacity-50 {
  color: var(--color-delego-text-light) !important;
  opacity: 1 !important;
}

.hero-section .btn:active {
  transform: translateY(0) scale(0.98);
}

.hero-section .btn:focus-visible {
  outline: 2px solid oklch(from var(--color-primary) l c h / 0.45);
  outline-offset: 3px;
}

/* --- Section Eyebrow Badge --- */
.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Service card icon wrapper uses coral accent */
.service-card .icon-wrap {
  background: var(--delego-coral);
  color: var(--delego-navy);
}

/* --- Service / Feature Cards --- */
.service-card {
  border-radius: var(--delego-radius-lg);
  padding: 1.75rem;
  background:
    linear-gradient(180deg, rgba(253,164,129,0.06), transparent 55%),
    var(--color-delego-surface);
  border: 1px solid var(--color-delego-border-dark);
  box-shadow: var(--delego-shadow-md);
  transition: transform var(--delego-transition),
              box-shadow var(--delego-transition),
              border-color var(--delego-transition);
  cursor: default;
  position: relative;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(253,164,129,0.5), transparent);
  opacity: 0;
  transition: opacity var(--delego-transition);
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--delego-shadow-xl);
  border-color: var(--delego-coral);
}

.service-card:hover::after {
  opacity: 1;
}

/* Service card text must be readable */
.service-card p {
  color: var(--color-delego-text-light) !important;
}

.service-card h3 {
  color: var(--color-delego-text-light) !important;
}

.service-card span {
  color: var(--color-delego-text-light) !important;
}

/* ============================================================
   Text Readability Overrides — DELEGO Fixed Theme
   ============================================================ */

/* Ensure text is readable on navy/surface backgrounds */
.opacity-70,
.opacity-60,
.opacity-50,
.opacity-40 {
  color: var(--color-delego-text-light) !important;
  opacity: 1 !important;
}

/* On peach background, ensure dark text */
.bg-peach,
.bg-delego-peach {
  color: var(--color-delego-navy) !important;
}

/* Navbar links */
.nav-link {
  color: var(--color-delego-text-light);
}

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

/* Buttons */
.btn-primary {
  background: var(--color-delego-coral);
  color: var(--color-delego-navy);
}

.btn-primary:hover {
  background: var(--color-delego-red);
  color: var(--color-delego-navy);
}

.btn-secondary {
  background: var(--color-delego-surface);
  color: var(--color-delego-text-light);
  border-color: var(--color-delego-border-dark);
}

.btn-outline {
  border-color: var(--color-delego-coral);
  color: var(--color-delego-coral);
}

.btn-outline:hover {
  background: var(--color-delego-coral);
  color: var(--color-delego-navy);
}

/* Unified Poppins for all buttons + interactive labels */
.btn,
.faq-trigger,
.card-arrow {
  font-family: "Poppins", "Roboto", sans-serif;
}

/* Form inputs */
.form-input-custom input,
.form-input-custom select,
.form-input-custom textarea {
  background: var(--color-delego-surface);
  border-color: var(--color-delego-border-dark);
  color: var(--color-delego-text-light);
}

.form-input-custom input:focus,
.form-input-custom select:focus,
.form-input-custom textarea:focus {
  border-color: var(--color-delego-coral);
  box-shadow: 0 0 0 3px rgba(253,164,129,0.1);
}

/* Error state */
.form-input-custom.input-error {
  border-color: var(--color-delego-red) !important;
}

.form-input-custom.input-error:focus {
  box-shadow: 0 0 0 3px rgba(180,24,45,0.12) !important;
}

/* Service card text */
.service-card p,
.service-card h3,
.service-card span {
  color: var(--color-delego-text-light) !important;
}

/* Footer text */
.footer-section,
.footer-section a,
.footer-section p,
.footer-section span {
  color: var(--color-delego-text-light) !important;
}

/* Logo marquee text */
.gradient-text {
  background: linear-gradient(135deg, var(--color-delego-coral), var(--color-delego-muted-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Workflow nodes */
.workflow-node {
  color: var(--color-delego-text-light);
}

/* Timeline steps */
.timeline-step-number {
  background: var(--color-delego-surface);
  color: var(--color-delego-white);
  border: 2px solid var(--color-delego-border-dark);
}

/* Feature tags */
.badge {
  border-radius: var(--delego-radius);
  font-family: "Poppins", "Roboto", sans-serif;
}

/* Divider */
.divider-border {
  border-color: var(--color-delego-border-dark) !important;
}

/* Hover states for Tailwind bg variants */
.hover\:bg-white,
.hover\:bg-gray-50,
.hover\:bg-gray-100,
.hover\:bg-gray-200,
.hover\:bg-gray-300,
.hover\:bg-base-100,
.hover\:bg-base-200,
.hover\:bg-base-300 {
  background: var(--color-delego-surface) !important;
  color: var(--color-delego-text-light) !important;
}

/* Focus rings */
.focus-visible\:outline-none:focus-visible {
  outline: 2px solid var(--color-delego-coral) !important;
  outline-offset: 3px !important;
}

.focus-visible\:ring-coral:focus-visible {
  ring-color: var(--color-delego-coral) !important;
  ring-offset-color: var(--color-delego-navy) !important;
  ring-width: 3px !important;
}

/* ============================================================
   Spacing and Visual Hierarchy — DELEGO Fixed Theme
   ============================================================ */

/* Section padding */
.section-padding {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 8rem;
    padding-bottom: 7rem;
  }
}

/* Container */
.delego-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Eyebrow badge */
.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-family: "Poppins", "Roboto", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

/* Ensure heading hierarchy is clear */
h1,
h2,
h3,
h4 {
  color: var(--color-delego-text-light) !important;
  font-family: "Raleway", "Poppins", sans-serif;
  margin-top: 0;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.35;
}

h4 {
  font-size: 1.125rem;
  line-height: 1.4;
  letter-spacing: 0;
}

/* Labels / eyebrow badges — tighter tracking */
.eyebrow-badge,
.badge {
  letter-spacing: 0.06em;
}

/* Body copy */
body {
  line-height: 1.7;
  font-weight: 400;
}

/* Paragraph rhythm */
.prose p {
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* CTA spacing */
.cta-section {
  padding: 4rem 2rem;
  border-radius: var(--delego-radius-xl);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-delego-burgundy), var(--color-delego-navy) 60%, var(--color-delego-surface));
  opacity: 1;
}

.cta-section .cta-glow {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(253,164,129,0.1);
  filter: blur(80px);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

/* Divider */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-delego-border-dark);
  margin: 3rem 0;
}

/* Trust strip */
.border-y {
  border-top-width: 1px;
  border-bottom-width: 1px;
}

/* Margin and padding utilities with DELEGO colors */
.mb-8 {
  margin-bottom: 2rem !important;
}

.mb-6 {
  margin-bottom: 1.5rem !important;
}

.mb-4 {
  margin-bottom: 1rem !important;
}

.mb-3 {
  margin-bottom: 0.75rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

.mt-8 {
  margin-top: 2rem !important;
}

.mt-6 {
  margin-top: 1.5rem !important;
}

.mt-4 {
  margin-top: 1rem !important;
}

/* Grid gaps */
.grid > :nth-child(n) {
  isolation: isolate;
}

/* Reduced motion for animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-card {
    animation: none !important;
  }

  .service-card:hover {
    transform: none;
  }

  .industry-card:hover {
    transform: none;
  }
}

/* Print */
@media print {
  .navbar-glass,
  .back-to-top,
  .mobile-menu-overlay,
  .mobile-menu-drawer {
    display: none !important;
  }
}

/* ============================================================
   Text Readability Overrides — DELEGO Fixed Theme
   ============================================================ */

/* Ensure text is readable on navy/surface backgrounds */
.opacity-70,
.opacity-60,
.opacity-50,
.opacity-40 {
  color: var(--color-delego-text-light) !important;
  opacity: 1 !important;
}

/* On peach background, ensure dark text */
.bg-peach,
.bg-delego-peach {
  color: var(--color-delego-navy) !important;
}

/* Navbar links */
.nav-link {
  color: var(--color-delego-text-light);
}

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

/* Buttons */
.btn-primary {
  background: var(--color-delego-coral);
  color: var(--color-delego-navy);
}

.btn-primary:hover {
  background: var(--color-delego-red);
  color: var(--color-delego-navy);
}

/* Form inputs */
.form-input-custom input,
.form-input-custom select,
.form-input-custom textarea {
  background: var(--color-delego-surface);
  border-color: var(--color-delego-border-dark);
  color: var(--color-delego-text-light);
}

.form-input-custom input:focus,
.form-input-custom select:focus,
.form-input-custom textarea:focus {
  border-color: var(--color-delego-coral);
  box-shadow: 0 0 0 3px rgba(253,164,129,0.1);
}

/* Error state */
.form-input-custom.input-error {
  border-color: var(--color-delego-red) !important;
}

.form-input-custom.input-error:focus {
  box-shadow: 0 0 0 3px rgba(180,24,45,0.12) !important;
}

/* Service card text */
.service-card p,
.service-card h3,
.service-card span {
  color: var(--color-delego-text-light) !important;
}

/* Footer text */
.footer-section,
.footer-section a,
.footer-section p,
.footer-section span {
  color: var(--color-delego-text-light) !important;
}

/* Logo marquee text */
.gradient-text {
  background: linear-gradient(135deg, var(--color-delego-coral), var(--color-delego-muted-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Workflow nodes */
.workflow-node {
  color: var(--color-delego-text-light);
}

/* Timeline steps */
.timeline-step-number {
  background: var(--color-delego-surface);
  color: var(--color-delego-white);
  border: 2px solid var(--color-delego-border-dark);
}

.service-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform 300ms ease;
}

.service-card:hover .icon-wrap {
  transform: translateY(-2px);
}

/* --- Dashboard Mockup --- */
.dashboard-mockup {
  border-radius: var(--delego-radius-xl);
  overflow: hidden;
  box-shadow: var(--delego-shadow-xl);
  background: var(--delego-surface);
  border: 1px solid var(--delego-border-dark);
}

.dashboard-topbar {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--delego-navy);
  border-bottom: 1px solid var(--delego-border-dark);
}

/* --- Workflow Section --- */
.workflow-connector {
  position: relative;
}

.workflow-connector::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    to bottom,
    var(--delego-coral) 0px,
    var(--delego-coral) 6px,
    transparent 6px,
    transparent 12px
  );
  animation: workflowFlow 2s linear infinite;
}

@keyframes workflowFlow {
  0%   { background-position: 0 0; }
  100% { background-position: 0 24px; }
}

.workflow-node {
  position: relative;
  z-index: 1;
  padding: 1rem 1.5rem;
  border-radius: var(--delego-radius);
  text-align: center;
  font-weight: 500;
  font-size: 0.875rem;
  background: var(--delego-surface);
  border: 1px solid var(--delego-border-dark);
  box-shadow: var(--delego-shadow);
  transition: transform var(--delego-transition),
              box-shadow var(--delego-transition);
}

.workflow-connector .workflow-node + .workflow-node {
  margin-top: 1.25rem;
}

.workflow-node:hover {
  transform: scale(1.03);
  box-shadow: var(--delego-shadow-md);
}

/* --- Timeline / How It Works --- */
.timeline-horizontal {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
}

.timeline-horizontal::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 40px;
  right: 40px;
  height: 2px;
}

.timeline-horizontal::before {
  background: linear-gradient(90deg, var(--delego-coral), var(--delego-muted-blue));
  opacity: 0.2;
}

.timeline-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.timeline-step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-weight: 700;
  font-size: 1.125rem;
  position: relative;
  z-index: 1;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.timeline-step-number {
  background: var(--delego-surface);
  color: var(--delego-white);
  border: 2px solid var(--delego-border-dark);
  box-shadow: var(--delego-shadow);
}

.timeline-step:hover .timeline-step-number {
  transform: scale(1.1);
  box-shadow: var(--delego-shadow-lg);
}

/* --- FAQ / Accordion --- */
.faq-item {
  border-radius: var(--delego-radius);
  overflow: hidden;
  border: 1px solid var(--delego-border-dark);
  transition: box-shadow 200ms ease;
}

.faq-item + .faq-item {
  margin-top: 0.75rem;
}

.faq-trigger {
  width: 100%;
  padding: 1.125rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9375rem;
  text-align: left;
  border: none;
  background: transparent;
  color: inherit;
  transition: background 200ms ease;
}

.faq-trigger:hover { background: rgba(0,0,0,0.02); }

.faq-trigger .faq-icon {
  transition: transform 250ms ease;
  flex-shrink: 0;
  opacity: 0.5;
}

.faq-item.active .faq-trigger .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms cubic-bezier(0.4, 0, 0.2, 1),
              padding 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-content {
  max-height: 300px;
}

.faq-content-inner {
  padding: 0 1.25rem 1.125rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  opacity: 0.7;
}

/* --- CTA Section --- */
.cta-section {
  position: relative;
  overflow: hidden;
  border-radius: var(--delego-radius-xl);
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--delego-navy), var(--delego-surface));
  opacity: 1;
}

.cta-section .cta-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(253,164,129,0.1);
  filter: blur(80px);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  transition: opacity 300ms ease, transform 300ms ease, visibility 300ms ease;
  cursor: pointer;
  border: none;
  color: var(--delego-white);
  background: var(--delego-coral);
  box-shadow: var(--delego-shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--delego-shadow-lg);
}

/* --- WhatsApp Floating Button (Home page) --- */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #ffffff;
  font-size: 28px;
  text-decoration: none;
  z-index: 55;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.25);
  animation: whatsapp-pulse 2.8s ease-in-out infinite;
  will-change: box-shadow;
}

.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.45);
  animation: none;
}

.whatsapp-float:focus-visible {
  outline: 2px solid rgba(37, 211, 102, 0.6);
  outline-offset: 3px;
}

@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.25); }
  50%      { box-shadow: 0 8px 30px rgba(37, 211, 102, 0.40); }
}

@media (max-width: 768px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    right: 18px;
    bottom: 20px;
    font-size: 25px;
  }
}

/* --- Scroll Reveal Animations (hidden state only applies when JS runs) --- */
.js-on .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.js-on .js-on .reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.js-on .reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }
.reveal-delay-5 { transition-delay: 500ms; }
.reveal-delay-6 { transition-delay: 600ms; }

/* --- Utility Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-fade-in  { animation: fadeIn 600ms ease forwards; }
.animate-slide-up { animation: slideUp 600ms ease forwards; }

/* --- Industry Card --- */
.industry-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--delego-radius-lg);
  transition: transform var(--delego-transition),
              box-shadow var(--delego-transition),
              border-color var(--delego-transition);
}

.industry-card {
  background: var(--delego-surface);
  border: 1px solid var(--delego-border-dark);
}

.industry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--delego-shadow-lg);
}

.industry-card .industry-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: transform 300ms ease;
}

.industry-card:hover .industry-icon {
  transform: scale(1.1);
}

/* --- Page Hero Banner (inner pages) --- */
.page-hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .page-hero {
    padding: 8rem 0 5rem;
  }
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(253,164,129,0.03), rgba(180,24,45,0.03));
}

/* --- Form Styles --- */
.form-input-custom {
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.form-input-custom input::placeholder,
.form-input-custom select::placeholder,
.form-input-custom textarea::placeholder {
  color: var(--delego-text-muted);
  font-size: 0.875rem;
}

.form-input-custom input:focus,
.form-input-custom select:focus,
.form-input-custom textarea:focus {
  outline: none;
  border-color: var(--delego-coral);
  box-shadow: 0 0 0 3px rgba(253,164,129,0.1);
}

/* Error state */
.form-input-custom.input-error {
  border-color: var(--delego-red);
}

.form-input-custom.input-error:focus {
  box-shadow: 0 0 0 3px rgba(180,24,45,0.12);
}

.footer-section a {
  transition: color 200ms ease, transform 200ms ease;
  display: inline-block;
}

.footer-section a:hover {
  color: var(--delego-coral);
  transform: translateX(2px);
}

/* --- Toast / Notification --- */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--delego-navy);
  color: var(--delego-white);
  padding: 0.875rem 1.5rem;
  border-radius: var(--delego-radius);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, transform 300ms ease, visibility 300ms ease;
  box-shadow: var(--delego-shadow-lg);
}

.toast-notification.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* --- Gradient Text --- */
.gradient-text {
  background: linear-gradient(135deg, var(--delego-coral), var(--delego-muted-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   STEP 11 — Responsive Rules (320px → 1920px)
   ============================================================ */

/* Prevent horizontal scroll globally */
html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* === Section padding: tighter on mobile === */
@media (max-width: 639px) {
  .section-padding {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  /* Hero cards: hide at very small widths to prevent overflow */
  .hero-cards-container {
    display: none;
  }

  .page-hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .page-hero p {
    font-size: 0.9375rem;
  }

  /* Stats row stacks on mobile */
  .stats-row {
    gap: 1.5rem;
  }

  .stats-row .stat-value {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  /* CTA section tighter */
  .section-accent {
    padding: 3rem 1rem;
  }

  /* Contact form and FAQ full width */
  .delego-container .grid.lg\:grid-cols-2,
  .delego-container .grid.md\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

/* === Tablet: 640px–1023px === */
@media (min-width: 640px) and (max-width: 1023px) {
  .section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .hero-cards-container {
    height: 380px;
    max-width: 480px;
    margin: 0 auto;
  }

  /* Service cards 2-column at tablet */
  .services-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* === Desktop: 1024px+ === */
@media (min-width: 1024px) {
  /* Service cards 3-column at desktop */
  .services-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === Large desktop: 1280px+ === */
@media (min-width: 1280px) {
  .delego-container {
    padding: 0 2rem;
  }
}

/* === Ultra-wide: 1440px+ (constraint) === */
@media (min-width: 1440px) {
  .delego-container {
    max-width: 1360px;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-card {
    animation: none !important;
  }
}

/* --- Print --- */
@media print {
  .navbar-glass,
  .back-to-top,
  .mobile-menu-overlay,
  .mobile-menu-drawer {
    display: none !important;
  }
}

/* ============================================================
   Logo Marquee — Trust Strip ("Powering smarter operations")
   Continuous LEFT → RIGHT, seamless infinite loop (CSS only).
   ============================================================ */
.logo-marquee {
  overflow: hidden;
  margin-top: 0.25rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.logo-marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: delego-logo-marquee 28s linear infinite;
}

.logo-set {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: var(--marquee-gap, 76px);
  padding-right: var(--marquee-gap, 76px);
}

.logo-set img {
  display: block;
  height: var(--marquee-logo-h, 34px);
  width: auto;
  max-width: none;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 200ms ease;
}

.logo-set img:hover {
  opacity: 1;
}

.logo-set img {
  opacity: 0.7;
}

.logo-set img:hover {
  opacity: 1;
}

/* translateX(-50%) → 0 slides content rightward: LEFT → RIGHT */
@keyframes delego-logo-marquee {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

@media (max-width: 1024px) {
  .logo-set {
    --marquee-gap: 60px;
    --marquee-logo-h: 30px;
  }
}

@media (max-width: 640px) {
  .logo-set {
    --marquee-gap: 44px;
    --marquee-logo-h: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-marquee {
    -webkit-mask-image: none;
            mask-image: none;
  }

  .logo-marquee-track {
    animation: none;
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Stable layout: show one copy of each logo only */
  .logo-set[aria-hidden="true"] {
    display: none;
  }

  .logo-set:first-child img:nth-child(n+7) {
    display: none;
  }
}

/* ============================================================
   Smart Notification Rows — theme-aware backgrounds
   (Feature card on Home: Email / WhatsApp / Slack rows)
   ============================================================ */
.notif-row {
  transition: background-color var(--delego-transition),
              border-color var(--delego-transition);
}

.notif-row {
  background: rgba(253,164,129,0.10);
  border: 1px solid rgba(253,164,129,0.30);
}

.notif-row .text {
  color: var(--delego-coral);
}

/* ============================================================
   Mock UI Polish — premium treatment for the inline workflow /
   dashboard / suggestion panels built in HTML (CSS mock visuals).
   ============================================================ */

/* Workflow row panels inside service/card mockups get a refined
   surface + subtle border instead of a flat Tailwind fill. */
.service-card [class*="bg-base-200"] {
  background-color: rgba(36,46,73,0.55) !important;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

/* Dark-surface marble text inside the mocked rows stays muted */
.service-card [class*="bg-base-200"] .text-xs,
.service-card [class*="bg-base-200"] .opacity-50,
.service-card [class*="bg-base-200"] .text-sm.level-2 {
  color: var(--color-delego-text-muted);
}

/* Connector arrows between workflow nodes → coral accent */
.service-card .flex.justify-center > [data-lucide] {
  color: var(--color-delego-coral);
  opacity: 0.55;
}

/* Icon chips (pastel bg-*-100) inside mockups get a subtle inner ring */
.service-card [class*="rounded-full"],
.service-card [class*="rounded-lg"] > i[data-lucide] {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

/* Completed workflow row (emerald) keeps premium tone on navy */
.service-card .bg-emerald-50 {
  background-color: rgba(16,185,129,0.12) !important;
  border-color: rgba(16,185,129,0.35) !important;
}

.service-card .bg-emerald-50 .text-emerald-700 {
  color: #6EE7B7 !important;
}

.service-card .bg-emerald-50 .text-emerald-600\/70 {
  color: rgba(110,231,183,0.75) !important;
}

/* Dashboard stat tiles inside mockups */
.dashboard-mockup [class*="bg-base-200"] {
  background-color: rgba(24,26,47,0.35);
  border: 1px solid rgba(255,255,255,0.07);
}

/* Smart notification rows keep their coral-tinted treatment */
.notif-row {
  background: rgba(253,164,129,0.10);
  border: 1px solid rgba(253,164,129,0.30);
}

/* ============================================================
   Navbar — safe-area & enlarged controls
   - env(safe-area-inset-top) keeps the fixed bar clear of
     notches / browser chrome on mobile (prevents cut-off).
   - Theme toggle & hamburger get 44px tap targets; unlayered
     rules override daisyUI's layered .btn-sm sizing.
   ============================================================ */
.navbar-glass {
  padding-top: env(safe-area-inset-top);
}

.theme-toggle,
#mobile-menu-btn {
  width: 2.75rem;
  height: 2.75rem;
}

/* ============================================================
   DELEGO HERO — PREMIUM 3D DASHBOARD COMPOSITION
   Right-side visual: one tilted 3D dashboard whose inner cards
   fly in staggered (daisyUI flying-components style).
   Z-index plan: bg glow 1 → dashboard 10
   ============================================================ */

/* --- Hero visual container --- */
.hero-visual {
  position: relative;
  height: auto;
  min-height: 0;
  perspective: 1600px;
  perspective-origin: 50% 40%;
}

/* ============================================================
   daisyUI-HERO SCROLL ANIMATION (desktop x1 1280px+)
   The hero becomes tall, the dashboard sticks to the viewport,
   and while scrolling the inner cards fly away and fade out —
   exactly like daisyui.com's mockup-window hero.
   ============================================================ */
@media (min-width: 1280px) {
  /* Hero hugs its content — no forced tall scroll area, so the problem
     section sits directly against the banner with zero gap. */
  .daisy-hero-scroll {
    min-height: auto;
    overflow: visible;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .daisy-hero-scroll .delego-container,
  .daisy-hero-scroll .grid {
    min-height: auto;
  }

  .daisy-hero-scroll .grid {
    align-items: start;
  }

  /* Pin the right dashboard column while scrolling through the tall hero.
     margin-top matches the left copy's padding-top (6rem) so the
     visual's top sits level with the paragraph's top. Sticky top keeps
     it just below the fixed navbar (4.5rem tall) while pinned. */
  .daisy-hero-scroll .order-2 {
    position: sticky;
    top: 5.75rem;
    margin-top: 6rem;
    margin-bottom: 0;
    align-self: start;
    height: auto;
  }

  .daisy-hero-scroll .order-1 {
    align-self: start;
    padding-top: 6rem;
  }

  /* When JS drives the flatten, the idle bob must pause */
  .daisy-hero-scroll .dashboard-main.ds-scrolling {
    animation: none;
    will-change: transform;
  }

  /* Cards must be free to fly outside the window frame while scrolling */
  .daisy-hero-scroll .dashboard-card {
    overflow: visible;
  }

  /* Once scrolled past the hero, hide the whole figure */
  .daisy-hero-scroll .order-2.ds-past {
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 0.4s;
  }
}

.hero-visual-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 2rem;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 38%, rgba(253,164,129,0.13), transparent 34%),
    radial-gradient(circle at 88% 82%, rgba(180,24,45,0.13), transparent 32%);
}

/* ============================================================
   STEP 2 — MAIN DASHBOARD
   ============================================================ */
.dashboard-main {
  position: relative;
  z-index: 10;
  width: min(680px, 100%);
  margin: 0 auto;
  transform-origin: 50% 0%;
  animation: dashboardFloat 11s ease-in-out infinite;
}

/* daisyUI signature resting tilt: rotateX(20deg) rotateZ(-20deg) skewY(8deg) */
@keyframes dashboardFloat {
  0%,100% {
    transform: rotateX(20deg) rotateZ(-20deg) skewY(8deg) translateY(0);
  }
  50% {
    transform: rotateX(20deg) rotateZ(-20deg) skewY(8deg) translateY(-10px);
  }
}

.dashboard-card {
  position: relative;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(55,65,92,0.55), rgba(24,26,47,0.96) 42%);
  background-color: var(--delego-navy);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    0 30px 70px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.04),
    inset 0 1px 0 rgba(255,255,255,0.10);
  overflow: hidden;
  padding: 0.9rem clamp(0.85rem, 1.6vw, 1.5rem) 1.1rem;
  transition: transform 350ms ease, box-shadow 350ms ease, border-color 350ms ease;
  animation: dashboardFade 1s ease-out backwards;
}

/* Window content fades in — stays in the same tilted 3D plane */
@keyframes dashboardFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.dashboard-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 4%;
  right: 4%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(253,164,129,0.9), transparent);
  pointer-events: none;
}

.dashboard-main:hover {
  animation-play-state: paused;
}

.dashboard-main:hover .dashboard-card {
  transform: scale(1.012);
  border-color: rgba(253,164,129,0.35);
  box-shadow:
    0 36px 76px rgba(0,0,0,0.55),
    0 0 0 1px rgba(253,164,129,0.12),
    inset 0 1px 0 rgba(255,255,255,0.14);
}

/* Top bar */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dash-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Window-chrome traffic lights (daisyUI mockup-window shape) */
.dash-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.dash-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-dot-red   { background: #B4182D; box-shadow: 0 0 6px rgba(180,24,45,0.5); }
.dash-dot-amber { background: #FDA481; box-shadow: 0 0 6px rgba(253,164,129,0.5); }
.dash-dot-green { background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,0.45); }

.dash-topbar-title {
  font-family: "Poppins", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--delego-text-light);
}

.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dash-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4ade80;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.25);
  padding: 0.22rem 0.55rem;
  border-radius: 9999px;
}

.dash-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: dashPulse 2s ease-in-out infinite;
}

.dash-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--delego-surface);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--delego-text-muted);
}

.dash-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  color: #181A2F;
  background: linear-gradient(135deg, #FDA481, #B4182D);
}

/* Body layout */
.dash-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-head {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.dash-greeting {
  font-size: 0.7rem;
  color: var(--delego-text-muted);
}

.dash-title {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #fff;
}

/* Stat cards */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.dash-stat {
  position: relative;
  background: linear-gradient(180deg, rgba(55,65,92,0.55), rgba(36,46,73,0.35));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}

.dash-stat::after {
  content: '';
  position: absolute;
  inset: auto -20% -12px -20%;
  height: 40px;
  background: radial-gradient(ellipse, rgba(253,164,129,0.25), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.dash-stat-label {
  font-family: "Poppins", sans-serif;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--delego-text-muted);
}

.dash-stat-value {
  font-family: "Raleway", sans-serif;
  font-size: clamp(0.85rem, 1.1vw, 1.1rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.dash-stat-trend {
  font-family: "Poppins", sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--delego-text-muted);
}

.dash-stat-trend.up {
  color: #34d399;
}

/* Main chart panel */
.dash-chart-panel {
  background: linear-gradient(180deg, rgba(55,65,92,0.4), rgba(24,26,47,0.2));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 0.6rem 0.7rem;
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.dash-panel-title {
  font-family: "Poppins", sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--delego-text-muted);
}

.dash-panel-badge {
  font-family: "Poppins", sans-serif;
  font-size: 0.58rem;
  color: #FDA481;
  background: rgba(253,164,129,0.1);
  border: 1px solid rgba(253,164,129,0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.dash-chart {
  width: 100%;
  height: 86px;
  display: block;
}

.dash-chart-grid {
  stroke: rgba(255,255,255,0.06);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.dash-chart-area {
  animation: dashFadeIn 1.4s ease 0.2s both;
}

@keyframes dashFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.dash-chart-line {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: dashLineDraw 2.2s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes dashLineDraw {
  to { stroke-dashoffset: 0; }
}

.dash-chart-dot {
  animation: dashPulse 2.6s ease-in-out infinite;
}

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

/* Bottom panels */
.dash-bottom {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0.6rem;
}

.dash-panel {
  background: linear-gradient(180deg, rgba(55,65,92,0.4), rgba(24,26,47,0.2));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.dash-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  flex-wrap: wrap;
}

.dash-flow-node {
  font-family: "Poppins", sans-serif;
  font-size: 0.56rem;
  font-weight: 600;
  color: #fff;
  background: var(--delego-surface);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 7px;
  white-space: nowrap;
}

.dash-flow-arrow {
  color: var(--delego-coral);
  display: flex;
  opacity: 0.9;
}

.dash-activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.dash-activity li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.62rem;
  color: var(--delego-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-activity-dot.peach   { background: #FDA481; box-shadow: 0 0 6px rgba(253,164,129,0.7); }
.dash-activity-dot.emerald { background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,0.6); }
.dash-activity-dot.red     { background: #B4182D; box-shadow: 0 0 6px rgba(180,24,45,0.6); }
.dash-activity-dot.slate   { background: #37415C; }

/* ============================================================
   daisyUI-STYLE FLYING COMPONENTS — INSIDE THE WINDOW
   Each inner card flies in staggered (like daisyUI's flying
   widgets) and settles inside the tilted dashboard plane.
   ============================================================ */
.dash-stats .dash-stat,
.dash-chart-panel,
.dash-bottom .dash-panel {
  will-change: transform, opacity;
  animation: dashCardRise 0.9s cubic-bezier(0.22,1,0.36,1) backwards;
}

/* Staggered fly-in (daisyUI card order: stat grid → chart → panels) */
.dash-stats .dash-stat:nth-child(1) { animation-delay: 0.05s; }
.dash-stats .dash-stat:nth-child(2) { animation-delay: 0.12s; }
.dash-stats .dash-stat:nth-child(3) { animation-delay: 0.19s; }
.dash-stats .dash-stat:nth-child(4) { animation-delay: 0.26s; }
.dash-chart-panel                    { animation-delay: 0.22s; }
.dash-bottom .dash-panel:nth-child(1) { animation-delay: 0.33s; }
.dash-bottom .dash-panel:nth-child(2) { animation-delay: 0.40s; }

@keyframes dashCardRise {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================================
   STEP 9 — RESPONSIVE
   ============================================================ */

/* Mid-desktop: 1024px–1279px */
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero-visual { height: auto; min-height: 0; }

  /* Top-align both hero columns so the visual starts
     on the same line as the left paragraph */
  .daisy-hero-scroll .grid {
    align-items: start;
  }

  .daisy-hero-scroll .order-2 {
    align-self: start;
  }
}

/* Tablet: 640px–1023px — keep the daisyUI 3D tilt like desktop */
@media (min-width: 640px) and (max-width: 1023px) {
  .hero-visual { height: auto; min-height: 0; max-width: none; }
  .dashboard-main { width: min(560px, 92%); }
}

/* Mobile: ≤639px — keep the daisyUI 3D tilt like desktop */
@media (max-width: 639px) {
  .hero-cards-container { display: block; }
  .hero-visual {
    height: auto;
    min-height: 0;
  }
  .dashboard-main { width: calc(100% - 12px); }
  .dashboard-card {
    border-radius: 20px;
    padding: 0.7rem 0.65rem 0.9rem;
  }
  .dash-title { font-size: 0.95rem; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); gap: 0.45rem; }
  .dash-stat { padding: 0.45rem 0.55rem; }
  .dash-stat-value { font-size: 0.85rem; }
  .dash-chart { height: 62px; }
  .dash-bottom { gap: 0.45rem; }
  .dash-panel { padding: 0.5rem 0.55rem; gap: 0.35rem; }
  .dash-flow { gap: 0.12rem; }
  .dash-flow-node { font-size: 0.48rem; padding: 0.18rem 0.32rem; }
  .dash-activity li { font-size: 0.56rem; }
}

/* Reduced motion — static dashboard + cards */
@media (prefers-reduced-motion: reduce) {
  .dashboard-main,
  .dashboard-card,
  .dash-stat,
  .dash-chart-panel,
  .dash-bottom .dash-panel,
  .dash-chart-line,
  .dash-chart-area,
  .dash-chart-dot,
  .dash-live-dot {
    animation: none !important;
  }
  .dashboard-main {
    transform: rotateX(20deg) rotateZ(-20deg) skewY(8deg);
  }
}

/* ============================================================
   Gap tightening — kept at the very end so it always wins the
   cascade against .section-padding at every breakpoint.
   ============================================================ */
.d-section-tight-top {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Banner hugs its content at every breakpoint: no forced viewport
   height and no bottom padding, so it flows straight into the
   problem section with zero gap. */
.hero-section.daisy-hero-scroll {
  min-height: auto !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* Remove the hero grid's own bottom padding so the banner flows
   straight into the problem section with no extra gap. */
.daisy-hero-scroll .grid {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  min-height: auto !important;
}

/* Below the desktop animation breakpoint the hero must hug its content,
   otherwise the forced 100vh min-height centers the banner and leaves an
   empty band above the problem section. */
@media (max-width: 1279px) {
  .hero-section {
    min-height: auto;
  }

  .hero-section .grid {
    min-height: auto !important;
  }
}

/* ============================================================
   HERO CHAT — invoice → payment (inside the dashboard window)
   The window frame + topbar stay put the whole time; only its
   contents convert: inner cards fly out while the chat fades up
   exactly where the card body was (desktop scroll p 14→26,
   or autoplay on smaller screens). Messages stagger via .chat-play.
   ============================================================ */
.hero-chat {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 15;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3.2rem 1.4rem 1rem;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.22,1,0.36,1);
}

.hero-visual.show-chat .hero-chat {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-chat-card {
  width: 100%;
  max-height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: var(--color-delego-surface, #242E49);
  border: 1px solid var(--color-delego-border-dark, rgba(255,255,255,0.10));
  box-shadow: var(--delego-shadow-xl, 0 16px 50px rgba(0,0,0,0.32));
  display: flex;
  flex-direction: column;
}

.hero-chat-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid var(--color-delego-border-dark, rgba(255,255,255,0.10));
  background: rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.hero-chat-avatars {
  display: flex;
}

.hero-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  border: 2px solid var(--color-delego-surface, #242E49);
}

.hero-chat-avatar.crm {
  background: linear-gradient(135deg, #FDA481, #B4182D);
  color: #181A2F;
}

.hero-chat-avatar.client {
  background: linear-gradient(135deg, #2563EB, #1E40AF);
  color: #fff;
  margin-left: -9px;
}

.hero-msg-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hero-msg-avatar.crm {
  background: linear-gradient(135deg, #FDA481, #B4182D);
  color: #181A2F;
}

.hero-msg-avatar.client {
  background: linear-gradient(135deg, #2563EB, #1E40AF);
  color: #fff;
}

.hero-chat-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}

.hero-chat-title {
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-chat-status {
  font-size: 0.66rem;
  opacity: 0.65;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.hero-chat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.8);
  animation: heroChatPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.hero-chat-secure {
  opacity: 0.5;
}

.hero-chat-body {
  padding: 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(130,140,160,0.45) transparent;
}

.hero-chat-body::-webkit-scrollbar {
  width: 5px;
}

.hero-chat-body::-webkit-scrollbar-track {
  background: transparent;
}

.hero-chat-body::-webkit-scrollbar-thumb {
  background: rgba(130,140,160,0.45);
  border-radius: 9999px;
}

.hero-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
}

.hero-msg-left {
  justify-content: flex-start;
}

.hero-msg-right {
  justify-content: flex-end;
}

.hero-bubble {
  max-width: 80%;
  padding: 0.55rem 0.75rem;
  border-radius: 13px;
  font-size: 0.8rem;
  line-height: 1.45;
  background: rgba(127,140,170,0.18);
  border: 1px solid var(--color-delego-border-dark, rgba(255,255,255,0.10));
}

.hero-bubble.dark {
  background: #2563EB;
  border-color: #2563EB;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.hero-msg-left .hero-bubble {
  border-bottom-left-radius: 4px;
}

.hero-bubble p {
  margin: 0 0 0.15rem;
}

.hero-time {
  display: block;
  font-size: 0.54rem;
  opacity: 0.6;
  text-align: right;
}

/* Invoice card (sent by CRM user) */
.hero-invoice {
  max-width: 86%;
  background: #fff;
  color: #181A2F;
  border-radius: 13px;
  padding: 0.6rem;
  border: 1px solid rgba(24,26,47,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.hero-invoice-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.hero-invoice-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #EEF4FF;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-invoice-label {
  display: block;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #64748B;
}

.hero-invoice-amount {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #111C36;
  line-height: 1.2;
}

.hero-invoice-due {
  margin-left: auto;
  font-size: 0.54rem;
  font-weight: 600;
  color: #B45309;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  padding: 0.12rem 0.4rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.hero-invoice-rows {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.64rem;
  color: #475569;
  padding: 0.4rem 0.5rem;
  background: #F8FAFC;
  border: 1px solid #EEF2F7;
  border-radius: 8px;
  margin-bottom: 0.45rem;
}

.hero-invoice-rows span {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.hero-invoice-rows b {
  color: #111C36;
}

.hero-pay-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #2563EB;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.45rem;
  border-radius: 8px;
}

/* Payment (money) card from client */
.hero-payment {
  max-width: 86%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #0E9F5D, #067A46);
  color: #fff;
  border-radius: 13px;
  padding: 0.6rem;
  box-shadow: 0 8px 24px rgba(6,122,70,0.35);
  border: 1px solid rgba(255,255,255,0.25);
}

.hero-money {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}

.hero-payment-label {
  display: block;
  font-size: 0.53rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.85;
}

.hero-payment-amount {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
}

.hero-payment-ok {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.62rem;
  opacity: 0.95;
}

.hero-chat-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem 0.7rem;
  flex-shrink: 0;
}

.hero-input-pill {
  flex: 1;
  font-size: 0.66rem;
  opacity: 0.55;
  background: rgba(127,140,170,0.16);
  border: 1px solid var(--color-delego-border-dark, rgba(255,255,255,0.10));
  padding: 0.45rem 0.75rem;
  border-radius: 9999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-send {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #2563EB;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Typing dots */
.hero-typing {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0.7rem;
  background: rgba(127,140,170,0.18);
  border-radius: 12px;
  width: fit-content;
}

.hero-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  animation: heroChatTyping 1.2s ease-in-out infinite;
}

.hero-typing span:nth-child(2) { animation-delay: 0.15s; }
.hero-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes heroChatTyping {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-3px); opacity: 1; }
}

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

/* --- Staged entrance: hidden until .chat-play is added by JS --- */
.hero-chat .hero-msg-row,
.hero-chat .hero-typing {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
}

.hero-chat.chat-play .hero-msg-row,
.hero-chat.chat-play .hero-typing {
  animation: heroChatMsgIn 0.7s cubic-bezier(0.22,1,0.36,1) forwards;
}

.hero-chat.chat-play .hero-msg-row:nth-child(1) { animation-delay: 0.3s; }
.hero-chat.chat-play .hero-msg-row:nth-child(2) { animation-delay: 1.3s; }
.hero-chat.chat-play .hero-msg-row:nth-child(3) { animation-delay: 2.3s; }
.hero-chat.chat-play .hero-typing { animation-delay: 3.3s; animation-duration: 0.5s; }
.hero-chat.chat-play .hero-msg-row:nth-child(5) { animation-delay: 4.3s; }
.hero-chat.chat-play .hero-msg-row:nth-child(6) { animation-delay: 5.3s; }
.hero-chat.chat-play .hero-msg-row:nth-child(7) { animation-delay: 6.5s; }

.hero-chat.chat-play .hero-payment .hero-money {
  animation: heroChatMoneyPop 0.7s cubic-bezier(0.34,1.56,0.64,1) 5.6s backwards;
}

@keyframes heroChatMsgIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroChatMoneyPop {
  0% { transform: scale(0.4) rotate(-18deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* Tablet / mid-desktop: shorter visual (470–500px), so use a smaller top gap
   to keep the chat inside the banner and off the problem section */
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero-chat {
    padding-top: 6rem;
  }
}

/* Stacked layout (no side-by-side): small top gap */
@media (min-width: 640px) and (max-width: 1023px) {
  .hero-chat {
    padding-top: 0.75rem;
  }
}

/* Compact chat on small screens (hero-visual is only 400px tall) */
@media (max-width: 639px) {
  /* Chat is desktop/tablet only — keep the dashboard on phones */
  .hero-chat {
    display: none;
  }

  .hero-chat-card {
    width: min(300px, 94%);
  }

  .hero-chat-body {
    padding: 0.6rem 0.7rem;
    gap: 0.45rem;
  }

  .hero-bubble {
    font-size: 0.72rem;
  }

  .hero-invoice-amount {
    font-size: 0.95rem;
  }

  .hero-payment-amount {
    font-size: 0.84rem;
  }

  .hero-chat-input {
    padding: 0.5rem 0.7rem 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-chat {
    transition: none;
  }

  .hero-chat .hero-msg-row,
  .hero-chat .hero-typing {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

/* ============================================================
   Big shell static — flat, no float/tilt/hover motion.
   Small inner cards untouched.
   Kept last so it wins over the shell animation rules.
   ============================================================ */
.dashboard-main,
.dashboard-card {
  animation: none !important;
}

.dashboard-main {
  transform: rotateX(20deg) rotateZ(-20deg) skewY(8deg) !important;
  will-change: auto;
}

.dashboard-main:hover .dashboard-card {
  transform: none;
}

/* ============================================================
   Testimonial appear-on-scroll (Whenevr-style: fade + rise +
   de-blur with an ease-out-expo curve, stagger via inline delay).
   ============================================================ */
.t-reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 700ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform, filter;
}

.t-reveal.t-revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .t-reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* ============================================================
   Testimonial carousel — swipeable track + auto-advance +
   back/next arrows (Whenevr-style).
   ============================================================ */
.t-viewport {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.t-viewport::-webkit-scrollbar {
  display: none;
}

.t-track {
  display: flex;
  width: max-content;
  will-change: scroll-position;
}

.t-carousel .t-set {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  gap: 1.25rem;
  padding-right: 1.25rem;
}

.t-carousel .t-set .service-card {
  width: min(360px, 82vw);
  flex-shrink: 0;
  scroll-snap-align: start;
}
@media (max-width: 640px) {
  .t-carousel .t-set .service-card {
    width: min(300px, 84vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .t-viewport {
    -webkit-mask-image: none;
            mask-image: none;
  }
}