/* --- Variables: Modern, brutal design system --- */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-tertiary: #666;
  --border-color: #2a2a2a;
  --primary: #3498db;
  --primary-hover: #2980b9;
  --dom: #27ae60;
  --code: #3498db;
  --branching: #f39c12;
  --subflow: #9b59b6;
  --start: #3498db;
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-lg: rgba(0, 0, 0, 0.8);
  --radius: 16px;
  --radius-lg: 24px;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
  --duration: 0.4s;
  --duration-slow: 0.8s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

html.lenis,
html.lenis body {
  height: auto;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
}

/* --- Header: Minimal, floating --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(180%);
  transition: all 0.4s var(--ease-out-expo);
}

.header--transparent {
  background: rgba(10, 10, 10, 0);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.header__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color 0.3s;
}

.logo:hover {
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 40px;
}

.nav a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s var(--ease-out-expo);
}

.nav a:hover {
  color: var(--text-primary);
}

.nav a:hover::after {
  width: 100%;
}

/* --- Buttons: Large, modern --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::before {
  opacity: 1;
}

.btn--primary {
  background: linear-gradient(135deg, #8b7cb3 0%, #6b6b9e 50%, #5a6b8a 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(107, 107, 158, 0.25);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #9d8fc4 0%, #7b7bab 50%, #6a7a9a 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(107, 107, 158, 0.35);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn--xl {
  padding: 18px 36px;
  font-size: 1.1rem;
}

.btn svg {
  transition: transform 0.3s var(--ease-out-expo);
}

.btn:hover svg {
  transform: translateX(4px);
}

/* --- Hero: Brutal, large, impactful --- */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding-top: 80px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: visible;
}

.hero__grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(64, 64, 64, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 64, 64, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridPulse 8s ease-in-out infinite;
  will-change: transform;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

/* Hero hands: vedľa seba v strede, vnútorný kraj každej ruky v strede obrazovky */
.hero__hands {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.hero__hands-glow {
  position: fixed;
  left: 50%;
  top: 18vh;
  width: 75vmin;
  height: 75vmin;
  margin-left: -37.5vmin;
  margin-top: -37.5vmin;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at center,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0.95) 3%,
      rgba(255, 255, 255, 0.85) 8%,
      rgba(255, 255, 255, 0.5) 18%,
      rgba(255, 255, 255, 0.2) 35%,
      rgba(255, 255, 255, 0.06) 50%,
      transparent 65%
    );
  filter: brightness(1.15) contrast(1.1);
  z-index: 10;
  pointer-events: none;
}

.hero__flare {
  width: 75vmin;
  height: 75vmin;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5; /* nad fragmentami diagramu (.hero__float__node má max z-index 17) */
  pointer-events: none;
}

.hero__flare img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero__hand {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  isolation: isolate;
}

.hero__hand--human {
  right: 50%;
  left: auto;
  transform: translate(calc(-1 * var(--hero-human-hand-offset, 0px)), calc(-50% + var(--hero-human-hand-offset-y, 0px)));
}

.hero__hand--human::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(40, 40, 40, 0.4);
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: url('images/human-hand.png');
  mask-image: url('images/human-hand.png');
  -webkit-mask-type: alpha;
  mask-mode: alpha;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.hero__hand--human img {
  display: block;
  max-height: 90vh;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
  filter: brightness(0.88) contrast(1.05) grayscale(0.25);
}

.hero__hand--wokie {
  left: 50%;
  right: auto;
  transform: translate(var(--hero-wokie-hand-offset, 0px), calc(-50% + var(--hero-wokie-hand-offset-y, 0px)));
}

.hero__hand--wokie::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(40, 40, 40, 0.4);
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: url('images/wokie-hand.png');
  mask-image: url('images/wokie-hand.png');
  -webkit-mask-type: alpha;
  mask-mode: alpha;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.hero__hand--wokie img {
  display: block;
  max-height: 90vh;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
  filter: brightness(0.88) contrast(1.05) grayscale(0.25);
}

/* Robot animácia: wrapper drží pozíciu, dve vrstvy pre crossfade */
.hero__robot-wrap {
  position: absolute;
  left: 50%;
  margin-left: -575px;
  top: 50%;
  transform: translateY(-50%);
  width: 350px;
  height: 350px;
  z-index: 9999;
  pointer-events: none;
}

.hero__robot--layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/robot1.png');
  background-size: 1400px 1400px;
  background-repeat: no-repeat;
  background-position: 0 0;
  /* východzí transition, aby sa pri zmene tried vždy spustil fade */
  transition: opacity 2s ease-out;
}

/* Fade-in: 2s, bez oneskorenia */
.hero__robot--layer.hero__robot--front {
  opacity: 1;
  z-index: 1;
  transition: opacity 0.1s ease-out 0.01s;
}

/* Fade-out: začína tesne pred koncom fade-inu (2s), rýchly prechod */
.hero__robot--layer.hero__robot--back {
  opacity: 0;
  z-index: 0;
  transition: opacity 0.1s ease-out 0.2s;
}

@media (max-width: 768px) {
  .hero__robot-wrap {
    transform: translateY(-50%) scale(0.6);
    transform-origin: left center;
  }
}

@media (max-width: 480px) {
  .hero__robot-wrap {
    transform: translateY(-50%) scale(0.4);
    transform-origin: left center;
  }
}

/* Robot v sekcii demo (Pozrite si to v akcii) */
.demo__robot-wrap {
  position: absolute;
  left: 50%;
  margin-left: -575px;
  top: 50%;
  transform: translateY(-50%);
  width: 350px;
  height: 350px;
  z-index: 10;
  pointer-events: none;
}

.demo__robot-wrap__inner {
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .demo__robot-wrap {
    transform: translateY(-50%) scale(0.6);
    transform-origin: left center;
  }
}

@media (max-width: 480px) {
  .demo__robot-wrap {
    transform: translateY(-50%) scale(0.4);
    transform-origin: left center;
  }
}

/* Plávajúce elementy: rozšírené mimo hero (200%), centrované – niektoré fragmenty za hranicou okna */
.hero__float {
  position: absolute;
  left: -50%;
  top: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  overflow: visible;
}

.hero__float__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.hero__float__lines line {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.5;
  transition: stroke 0.2s;
}

.hero__float__nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.hero__float__node {
  position: absolute;
  left: var(--base-x, 50%);
  top: var(--base-y, 50%);
  width: calc(var(--size, 56px) * 1.4);
  height: calc(var(--size, 56px) * 0.8);
  margin-left: calc(var(--size, 56px) * 1.4 / -2);
  margin-top: calc(var(--size, 56px) * 0.8 / -2);
  transform: translate(calc(var(--fx, 0) + var(--collapse-fx, 0)), calc(var(--fy, 0) + var(--collapse-fy, 0))) rotate(var(--rotate, 0deg)) scale(var(--scale, 1));
  opacity: var(--opacity, 1);
  filter: blur(var(--blur, 0px));
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 50%, var(--gradient-color, rgba(52, 152, 219, 0.15)) 100%);
  backdrop-filter: blur(6px);
  transition: box-shadow 0.3s, filter 0.3s, transform 0.3s, border-color 0.3s;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero__gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(52, 152, 219, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(39, 174, 96, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 20%, rgba(155, 89, 182, 0.08) 0%, transparent 45%);
  animation: gradientBreath 10s ease-in-out infinite;
}

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

.hero__shimmer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 100%
  );
  animation: shimmer 8s ease-in-out infinite;
  transform: translateX(-100%);
}

@keyframes shimmer {
  0% { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(200%) skewX(-15deg); }
}

.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 11; /* nad hands (glow 10), content (8) – celý prvý slajd vrátane rúk */
  pointer-events: none;
  background: radial-gradient(
    ellipse 100% 100% at 50% 50%,
    transparent 45%,
    var(--bg-primary) 62%
  );
  opacity: 0;
}

.hero__content {
  position: relative;
  z-index: 8;
  width: 100%;
  padding: 0 40px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero__inner {
  max-width: 900px;
  margin: 0 auto;
  will-change: transform;
}

.hero__badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(52, 152, 219, 0.15);
  border: 1px solid rgba(52, 152, 219, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 0.8s var(--ease-out-expo) 0.2s forwards;
}

.hero__title {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 32px;
  color: var(--text-primary);
}

.hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: heroReveal 1s var(--ease-out-expo) forwards;
}

.hero__title-line:first-child {
  animation-delay: 0.4s;
}

.hero__title-line--accent {
  background: linear-gradient(135deg, #fff 0%, rgba(52, 152, 219, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation-delay: 0.6s;
}

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

.hero__subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 48px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 0.8s var(--ease-out-expo) 0.8s forwards;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 0.8s var(--ease-out-expo) 1s forwards;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0;
  animation: heroReveal 0.8s var(--ease-out-expo) 1.2s forwards;
}

.scroll-indicator__line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(10px); opacity: 1; }
}

/* --- Sections: Large spacing, clean --- */
.section {
  padding: 120px 40px;
  position: relative;
}

.section__inner {
  max-width: 1400px;
  margin: 0 auto;
}

.section__header {
  text-align: center;
  margin-bottom: 80px;
}

.section__badge,
.section__title,
.section__lead {
  will-change: transform, opacity;
}

.section__badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section__title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.section__title.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section__lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.6);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out-expo) 0.1s, transform 0.8s var(--ease-out-expo) 0.1s;
}

.section__lead.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Features: gradient od transparentu do --bg-primary, veľký prechod --- */
.section.features {
  background: linear-gradient(to bottom, transparent 0%, transparent 40%, var(--bg-primary) 55%);
}

/* --- Features: Modern cards with glow --- */
.features__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.feature-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 40px;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
  opacity: 0;
  transform: translateY(40px);
}

.feature-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:nth-child(1) { transition-delay: 0.1s; }
.feature-card:nth-child(2) { transition-delay: 0.15s; }
.feature-card:nth-child(3) { transition-delay: 0.2s; }
.feature-card:nth-child(4) { transition-delay: 0.25s; }
.feature-card:nth-child(5) { transition-delay: 0.3s; }

.feature-card__glow {
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 0;
}

.feature-card--start .feature-card__glow {
  background: radial-gradient(circle at center, rgba(52, 152, 219, 0.3), transparent 70%);
}

.feature-card--dom .feature-card__glow {
  background: radial-gradient(circle at center, rgba(39, 174, 96, 0.3), transparent 70%);
}

.feature-card--code .feature-card__glow {
  background: radial-gradient(circle at center, rgba(52, 152, 219, 0.3), transparent 70%);
}

.feature-card--branching .feature-card__glow {
  background: radial-gradient(circle at center, rgba(243, 156, 18, 0.3), transparent 70%);
}

.feature-card--subflow .feature-card__glow {
  background: radial-gradient(circle at center, rgba(155, 89, 182, 0.3), transparent 70%);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.feature-card:hover .feature-card__glow {
  opacity: 1;
}

.feature-card__content {
  position: relative;
  z-index: 1;
}

.feature-card__icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
  transition: transform 0.3s var(--ease-out-expo);
}

.feature-card--start .feature-card__icon-wrapper {
  background: rgba(52, 152, 219, 0.15);
  border: 1px solid rgba(52, 152, 219, 0.3);
  color: var(--start);
}

.feature-card--dom .feature-card__icon-wrapper {
  background: rgba(39, 174, 96, 0.15);
  border: 1px solid rgba(39, 174, 96, 0.3);
  color: var(--dom);
}

.feature-card--code .feature-card__icon-wrapper {
  background: rgba(52, 152, 219, 0.15);
  border: 1px solid rgba(52, 152, 219, 0.3);
  color: var(--code);
}

.feature-card--branching .feature-card__icon-wrapper {
  background: rgba(243, 156, 18, 0.15);
  border: 1px solid rgba(243, 156, 18, 0.3);
  color: var(--branching);
}

.feature-card--subflow .feature-card__icon-wrapper {
  background: rgba(155, 89, 182, 0.15);
  border: 1px solid rgba(155, 89, 182, 0.3);
  color: var(--subflow);
}

.feature-card:hover .feature-card__icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.feature-card p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

/* --- Demo section --- */
.workflow-demo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.workflow-demo.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.workflow-demo__canvas {
  position: relative;
  height: 500px;
  background: var(--bg-primary);
}

.workflow-demo__scene {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 700px;
  height: 380px;
  transform: translate(-50%, -50%);
}

.workflow-demo__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(64, 64, 64, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 64, 64, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

.workflow-demo__edges {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.workflow-demo__nodes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- How section: Large numbers --- */
.how__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px;
}

.how-card {
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.how-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.how-card:nth-child(1) { transition-delay: 0.1s; }
.how-card:nth-child(2) { transition-delay: 0.2s; }
.how-card:nth-child(3) { transition-delay: 0.3s; }

.how-card__number {
  font-size: clamp(4rem, 6vw, 6rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
  letter-spacing: -0.05em;
}

.how-card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.how-card p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

/* --- CTA section: Large, impactful --- */
.cta-section {
  position: relative;
  padding: 160px 40px;
  overflow: hidden;
}

.cta-section__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 80% at 50% 50%, rgba(52, 152, 219, 0.1), transparent);
  z-index: 0;
}

.cta-section__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-section__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  will-change: transform, opacity;
  margin-bottom: 24px;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.cta-section__title.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-section__text {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 48px;
  will-change: transform, opacity;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out-expo) 0.1s, transform 0.8s var(--ease-out-expo) 0.1s;
}

.cta-section__text.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-section__inner .btn {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out-expo) 0.2s, transform 0.8s var(--ease-out-expo) 0.2s;
}

.cta-section__inner .btn.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 40px;
  text-align: center;
}

.footer__copy {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- Workflow nodes (shared) --- */
.wf-node {
  position: absolute;
  min-width: 160px;
  max-width: 200px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid;
  font-size: 13px;
  cursor: default;
  transition: box-shadow 0.3s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(10px);
}

.wf-node:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.wf-node__label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.wf-node__desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.wf-node--start {
  border-color: var(--start);
  background: rgba(52, 152, 219, 0.1);
}

.wf-node--dom {
  border-color: var(--dom);
  background: rgba(39, 174, 96, 0.1);
}

.wf-node--code {
  border-color: var(--code);
  background: rgba(52, 152, 219, 0.1);
}

.wf-node--branching {
  border-color: var(--branching);
  background: rgba(243, 156, 18, 0.1);
}

.wf-node--subflow {
  border-color: var(--subflow);
  background: rgba(155, 89, 182, 0.1);
}

.wf-node__handle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #444;
  border: 2px solid var(--bg-secondary);
}

.wf-node__handle--bottom {
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
}

.workflow-demo__edge {
  transition: stroke 0.3s;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header__inner {
    padding: 16px 24px;
  }
  
  .nav {
    display: none;
  }
  
  .section {
    padding: 80px 24px;
  }
  
  .features__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }
  
  .btn--xl {
    width: 100%;
    justify-content: center;
  }
}
