@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400;500;700;900&display=swap');

:root {
  --background: 210 36% 96%;
  --foreground: 216 34% 10%;
  --primary: 188 92% 42%;
  --primary-foreground: 212 45% 8%;
  --secondary: 210 22% 88%;
  --secondary-foreground: 216 34% 10%;
  --muted: 214 14% 38%;
  --destructive: 4 82% 54%;
  --border: 210 18% 78%;
  --card: 0 0% 100%;
  --urgent: 21 96% 50%;
  --shadow-sm: 0 10px 30px hsl(212 45% 15% / 0.12);
  --shadow-md: 0 20px 55px hsl(212 45% 10% / 0.18);
  --shadow-lg: 0 32px 85px hsl(212 45% 8% / 0.32);
  --transition-fast: 160ms ease;
  --transition-smooth: 420ms cubic-bezier(.2,.8,.2,1);
  --radius-sm: 0.65rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
}

.dark {
  --background: 216 47% 7%;
  --foreground: 205 33% 92%;
  --primary: 188 100% 55%;
  --primary-foreground: 216 48% 8%;
  --secondary: 213 36% 14%;
  --secondary-foreground: 205 33% 92%;
  --muted: 211 17% 66%;
  --destructive: 4 84% 62%;
  --border: 210 28% 20%;
  --card: 215 42% 10%;
  --urgent: 21 96% 56%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: hsl(var(--background));
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 15% 10%, hsl(var(--primary) / 0.14), transparent 30rem),
    radial-gradient(circle at 92% 4%, hsl(var(--urgent) / 0.1), transparent 26rem),
    linear-gradient(135deg, hsl(var(--background)), hsl(214 52% 5%));
  color: hsl(var(--foreground));
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.font-heading {
  font-family: 'Bebas Neue', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

.header-glass {
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.88);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(var(--primary) / 0.45);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(196 100% 72%));
  box-shadow: 0 0 28px hsl(var(--primary) / 0.35);
  color: hsl(var(--primary-foreground));
  font-weight: 900;
}

.hero-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(hsl(var(--primary) / 0.12) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--primary) / 0.12) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: hsl(var(--urgent));
  box-shadow: 0 0 0 0 hsl(var(--urgent) / 0.8);
  animation: pulse-dot 1.25s infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 hsl(var(--urgent) / 0.75); }
  70% { box-shadow: 0 0 0 12px hsl(var(--urgent) / 0); }
  100% { box-shadow: 0 0 0 0 hsl(var(--urgent) / 0); }
}

.cta-primary,
.cta-secondary,
.cta-urgent {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.cta-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 18px 45px hsl(var(--primary) / 0.26);
}

.cta-primary:hover,
.cta-urgent:hover,
.cta-secondary:hover {
  transform: translateY(-2px);
}

.cta-secondary {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.82);
  color: hsl(var(--foreground));
}

.cta-urgent {
  background: hsl(var(--urgent));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 18px 45px hsl(var(--urgent) / 0.24);
}

.pipe-stage {
  position: relative;
  min-height: 420px;
  perspective: 1100px;
}

.pipe-scene {
  position: relative;
  min-height: 420px;
  border: 1px solid hsl(var(--border));
  border-radius: 2rem;
  background:
    radial-gradient(circle at 50% 45%, hsl(var(--primary) / 0.16), transparent 19rem),
    linear-gradient(145deg, hsl(216 42% 12%), hsl(215 46% 6%));
  box-shadow: var(--shadow-lg), inset 0 0 55px hsl(var(--primary) / 0.07);
  transform-style: preserve-3d;
  transition: transform var(--transition-smooth);
  overflow: hidden;
}

.pipe-scene svg {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
}

.pipe-shadow,
.pipe-main {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pipe-shadow {
  stroke: hsl(216 70% 2% / 0.65);
  stroke-width: 56;
  transform: translate(15px, 18px);
}

.pipe-main {
  stroke: url(#pipeSteel);
  stroke-width: 42;
  filter: drop-shadow(0 12px 18px hsl(210 70% 2% / 0.55));
}

.pipe-water {
  fill: none;
  stroke: url(#waterGlow);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 34 32;
  animation: water-flow 1.15s linear infinite;
  filter: url(#glow);
}

.pipe-water-delay {
  stroke-width: 5;
  opacity: 0.72;
  animation-duration: 1.75s;
  animation-direction: reverse;
}

@keyframes water-flow {
  to { stroke-dashoffset: -132; }
}

.valve {
  transform-origin: 270px 252px;
  animation: valve-float 4.5s ease-in-out infinite;
}

@keyframes valve-float {
  0%, 100% { transform: translate(270px, 252px) rotate(0deg); }
  50% { transform: translate(270px, 246px) rotate(2deg); }
}

.needle {
  transform-origin: 0 8px;
  animation: needle-sweep 2.4s ease-in-out infinite;
}

@keyframes needle-sweep {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(24deg); }
}

.wrench {
  animation: wrench-bob 5s ease-in-out infinite;
}

@keyframes wrench-bob {
  0%, 100% { transform: translate(170px, 380px) rotate(-16deg); }
  50% { transform: translate(182px, 366px) rotate(-10deg); }
}

.drop-one,
.drop-two,
.drop-three {
  animation: drip 1.4s ease-in infinite;
}

.drop-two { animation-delay: 0.26s; }
.drop-three { animation-delay: 0.52s; }

@keyframes drip {
  0% { opacity: 0; transform: translateY(-18px) scale(0.75); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(48px) scale(1); }
}

.pipe-card {
  position: absolute;
  z-index: 3;
  display: flex;
  width: 96px;
  height: 96px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(var(--primary) / 0.35);
  border-radius: 1.25rem;
  background: hsl(var(--card) / 0.82);
  box-shadow: var(--shadow-md);
  color: hsl(var(--primary));
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 2.25rem;
  line-height: 0.9;
  backdrop-filter: blur(14px);
  animation: card-float 4.5s ease-in-out infinite;
}

.pipe-card span {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  color: hsl(var(--muted));
}

.pipe-card-a { left: -10px; top: 42px; }
.pipe-card-b { right: 18px; bottom: 36px; animation-delay: 0.75s; }

@keyframes card-float {
  0%, 100% { transform: translate3d(0, 0, 40px) rotate(-2deg); }
  50% { transform: translate3d(0, -16px, 65px) rotate(2deg); }
}

.emergency-panel {
  border: 1px solid hsl(var(--urgent) / 0.28);
  background:
    linear-gradient(135deg, hsl(var(--card)), hsl(var(--secondary) / 0.7)),
    radial-gradient(circle at 90% 10%, hsl(var(--urgent) / 0.24), transparent 20rem);
}

.section-kicker {
  margin-bottom: 0.65rem;
  color: hsl(var(--primary));
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.float-card,
.step-card {
  transform-style: preserve-3d;
  transition: transform var(--transition-smooth), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.float-card:hover,
.step-card:hover {
  border-color: hsl(var(--primary) / 0.44);
  box-shadow: var(--shadow-md);
  transform: translateY(-6px) rotateX(2deg);
}

.trust-check {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  font-weight: 900;
}

.avatar {
  display: inline-flex;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary) / 0.35);
  background: linear-gradient(135deg, hsl(var(--secondary)), hsl(var(--primary) / 0.18));
  color: hsl(var(--primary));
  font-weight: 900;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.8,.2,1);
}

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

.skeleton {
  position: relative;
  overflow: hidden;
  background: hsl(var(--secondary));
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, hsl(var(--foreground) / 0.08), transparent);
  animation: shimmer 1.15s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 999px;
  will-change: transform;
}

.cursor-dot {
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  background: hsl(var(--primary));
  box-shadow: 0 0 20px hsl(var(--primary) / 0.8);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  margin-left: -18px;
  margin-top: -18px;
  border: 1px solid hsl(var(--primary) / 0.65);
  box-shadow: 0 0 22px hsl(var(--primary) / 0.22);
  transition: transform 90ms linear;
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

@media (max-width: 767px) {
  .pipe-stage {
    min-height: 360px;
  }

  .pipe-scene,
  .pipe-scene svg {
    min-height: 360px;
  }

  .pipe-card {
    width: 78px;
    height: 78px;
    font-size: 1.75rem;
  }

  .pipe-card-a { left: 8px; top: 20px; }
  .pipe-card-b { right: 10px; bottom: 18px; }
}

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