/* ============================================================
   SECTIONS — Section-specific layout and styling
   ============================================================ */

/* ─── HERO ─────────────────────────────────────────────────── */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
  /* Fallback when canvas hasn't loaded */
  background: radial-gradient(ellipse 70% 60% at 15% 30%, rgba(108,92,231,0.07), transparent 65%),
              radial-gradient(ellipse 55% 70% at 85% 75%, rgba(0,200,215,0.04), transparent 65%),
              var(--bg-base);
}

/* Dark scrim over canvas — keeps text readable (follows neon-flow demo overlay pattern) */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(5,6,15,0.82) 0%,
    rgba(5,6,15,0.60) 50%,
    rgba(5,6,15,0.75) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Subtle grid overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  position: relative;
  z-index: 2;    /* above ::before and ::after overlays */
}

.hero__content {}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--accent-glow);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--accent);
  margin-bottom: var(--space-8);
  letter-spacing: 0.03em;
}

.hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: heroPulse 2s ease-in-out infinite;
}

.hero__headline {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: 1.08;
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.hero__headline-line {
  display: block;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  color: var(--text-primary);
  overflow: hidden;
}

.hero__headline-line--accent {
  color: var(--accent);
  font-style: italic;
  font-size: clamp(2.8rem, 6.5vw, 5.2rem);
}

.hero__headline-line span {
  display: block;
  animation: slideUp 0.8s var(--ease-out) both;
}

.hero__headline-line:nth-child(1) span { animation-delay: 0.1s; }
.hero__headline-line:nth-child(2) span { animation-delay: 0.25s; }
.hero__headline-line:nth-child(3) span { animation-delay: 0.4s; }

.hero__subline {
  font-size: clamp(var(--text-base), 1.8vw, var(--text-lg));
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 520px;
  margin-bottom: var(--space-10);
  animation: fadeInUp 0.8s 0.55s var(--ease-out) both;
}

.hero__ctas {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
  animation: fadeInUp 0.8s 0.7s var(--ease-out) both;
}

.hero__trust {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  animation: fadeInUp 0.8s 0.85s var(--ease-out) both;
}

.hero__trust-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-strong);
}

/* Hero visual (right side) */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 0.9s 0.5s var(--ease-out) both;
}

/* Dashboard card */
.hv-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(200,151,58,0.06);
  position: relative;
  z-index: 2;
}

.hv-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.hv-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: heroPulse 2s ease-in-out infinite;
}

.hv-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  flex: 1;
}

.hv-live {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--success);
  padding: 2px 8px;
  background: rgba(76,175,125,0.1);
  border: 1px solid rgba(76,175,125,0.3);
  border-radius: var(--radius-full);
}

.hv-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.hv-metric {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.hv-metric__value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.hv-metric__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

/* Mini bar chart */
.hv-chart {
  margin-bottom: var(--space-5);
}

.hv-bars {
  display: flex;
  align-items: flex-end;
  gap: var(--space-1);
  height: 64px;
  padding-bottom: var(--space-1);
}

.hv-bar {
  flex: 1;
  background: var(--bg-elevated);
  border-radius: 3px 3px 0 0;
  position: relative;
  overflow: hidden;
}

.hv-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--h, 50%);
  background: linear-gradient(to top, rgba(108,92,231,0.65), rgba(108,92,231,0.25));
  animation: barGrow 1.4s 1s var(--ease-out) both;
  border-radius: inherit;
}

.hv-bar--active::after {
  background: linear-gradient(to top, var(--accent), rgba(139,127,255,0.6));
  box-shadow: 0 0 12px rgba(108,92,231,0.4);
}

.hv-chart-days {
  display: flex;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.hv-chart-days span {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
}

.hv-tasks {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.hv-pulse {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  flex-shrink: 0;
}

.hv-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: pingOut 2s ease-out infinite;
}

.hv-tasks__count {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

.hv-tasks__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Floating notification cards */
.hv-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 3;
}

.hv-float--1 {
  top: -24px;
  right: -32px;
  animation: floatIn 0.6s 1.8s var(--ease-out) both, floatBob 6s 2.4s ease-in-out infinite;
}

.hv-float--2 {
  bottom: 48px;
  right: -48px;
  animation: floatIn 0.6s 2.4s var(--ease-out) both, floatBob 6s 3s ease-in-out infinite reverse;
}

.hv-float--3 {
  bottom: -24px;
  left: -32px;
  animation: floatIn 0.6s 3s var(--ease-out) both, floatBob 7s 3.6s ease-in-out infinite;
}

.hv-float__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── SERVICES ─────────────────────────────────────────────── */
.services {
  background: var(--bg-base);
  position: relative;
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 120px;
  background: linear-gradient(to bottom, var(--accent-glow-md), transparent);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

/* ─── PROCESS ──────────────────────────────────────────────── */
.process {
  position: relative;
}

.process::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 80% 50%, rgba(200,151,58,0.04), transparent);
  pointer-events: none;
}

.process__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-20);
  align-items: start;
}

.process__visual {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
}

.process__visual-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  overflow: hidden;
  position: relative;
}

.process__visual-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
}

.pvc__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.pvc__title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
}

.pvc__stats {
  display: flex;
  gap: var(--space-6);
}

.pvc__stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.pvc__stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--accent);
}

.pvc__stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── WHY ──────────────────────────────────────────────────── */
.why {
  position: relative;
  overflow: hidden;
}

.why::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(200,151,58,0.04), transparent 70%);
  pointer-events: none;
}

.why__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  padding: var(--space-12) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-16);
}

.why__benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

/* ─── TESTIMONIALS ─────────────────────────────────────────── */
.testimonials {
  background: var(--bg-base);
  position: relative;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

/* ─── FAQ ──────────────────────────────────────────────────── */
.faq__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-20);
  align-items: start;
}

.faq__sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
}

.faq__sidebar-cta {
  margin-top: var(--space-8);
  padding: var(--space-6);
  background: var(--accent-glow);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
}

.faq__sidebar-cta-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-3);
}

.faq__sidebar-cta-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
  line-height: var(--leading-relaxed);
}

/* ─── CONTACT ──────────────────────────────────────────────── */
.contact {
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 0% 50%, rgba(200,151,58,0.05), transparent),
    radial-gradient(ellipse 50% 60% at 100% 50%, rgba(58,138,156,0.04), transparent);
  pointer-events: none;
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-20);
  align-items: start;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.contact__info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-top: var(--space-4);
}

.contact__form-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
}

.contact__form-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* ─── LIVE CHAT ─────────────────────────────────────────────── */
.chat-live-section {
  background: var(--bg-base);
}

.chat-live__inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--space-12);
  align-items: start;
}

.chat-live__hints {
  list-style: none;
  padding: 0;
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chat-live__hints li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.chat-live__embed {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  /* Fixed height — internal chat scrolls, container stays put */
  height: 520px;
  max-height: 520px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

/* n8n fullscreen widget override — match our design */
.chat-live__embed n8n-chat,
#chat-embed-container n8n-chat {
  /* Layout: fill container, internal messages scroll */
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;

  /* Color tokens */
  --chat--color-primary: var(--accent);
  --chat--color-primary-shade-50: var(--accent-bright);
  --chat--color-secondary: #4ADE80;
  --chat--header--background: var(--bg-elevated);
  --chat--header--color: var(--text-primary);
  --chat--message--bot--background: var(--bg-elevated);
  --chat--message--bot--color: var(--text-primary);
  /* User bubble: mint bg → dark text for legibility */
  --chat--message--user--background: var(--accent);
  --chat--message--user--color: #040D08;
  /* Input field */
  --chat--input--background: var(--bg-elevated);
  --chat--input--border-color: var(--border-default);
  --chat--input--text-color: var(--text-primary);
  --chat--input--placeholder--color: var(--text-muted);
  --chat--background: var(--bg-surface);
  border-radius: var(--radius-xl);
}

/* Force message list area to scroll, not grow */
#chat-embed-container .chat-messages-list,
#chat-embed-container [class*="messages"] {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

@media (max-width: 900px) {
  .chat-live__inner {
    grid-template-columns: 1fr;
  }
  .chat-live__embed {
    height: 440px;
    max-height: 440px;
  }
}

/* ─── FOOTER ───────────────────────────────────────────────── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-8);
}

.footer__brand {}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  text-decoration: none;
}

.footer__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

.footer__logo-text span {
  color: var(--accent);
}

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  max-width: 240px;
}

.footer__social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.footer__social a:hover {
  color: var(--accent);
  border-color: var(--border-gold);
  background: var(--accent-glow);
}

.footer__col-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--accent);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer__legal {
  display: flex;
  gap: var(--space-6);
}

.footer__legal a {
  font-size: var(--text-xs);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer__legal a:hover {
  color: var(--text-secondary);
}

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }

  .hero__subline {
    max-width: 100%;
    margin-inline: auto;
  }

  .hero__ctas {
    justify-content: center;
  }

  .hero__trust {
    justify-content: center;
  }

  .hero__visual {
    max-width: 420px;
    margin-inline: auto;
  }

  .hv-float--1 { right: -16px; }
  .hv-float--2 { right: -24px; }
  .hv-float--3 { left: -16px; }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process__inner {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .process__visual {
    position: static;
  }

  .why__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .faq__inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .faq__sidebar {
    position: static;
  }

  .contact__inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .why__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .why__benefits {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .hv-float--1,
  .hv-float--2,
  .hv-float--3 {
    display: none;
  }

  .nav__links,
  .nav__actions {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }
}
