.pluvial-page {
  background: var(--paper);
  color: var(--black);
  padding-top: 82px;
}

.pluvial-hero,
.pluvial-block,
.pluvial-cta,
.pluvial-sources,
.pluvial-viz {
  width: min(1100px, 100% - 12vw);
  margin: 0 auto;
}

.pluvial-hero {
  padding: clamp(4rem, 10vw, 9rem) 0 clamp(3rem, 7vw, 6rem);
}

.pluvial-hero h1 {
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 0.98;
  max-width: 20ch;
  margin-bottom: 1.8rem;
}

.pluvial-hero .lead {
  max-width: 52ch;
}

.pluvial-block {
  padding: clamp(2rem, 4vw, 3.6rem) 0;
  border-top: 1px solid var(--line);
}

.pluvial-block h2,
.pluvial-sources h2,
.pluvial-cta h2,
.pluvial-viz h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  margin-bottom: 1.2rem;
}

.pluvial-block p,
.pluvial-viz__head p {
  max-width: 72ch;
}

.check-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.check-list li {
  border-left: 3px solid var(--lime);
  padding-left: 1rem;
}

.pluvial-grid {
  width: min(1100px, 100% - 12vw);
  margin: 0 auto;
  padding: 0.8rem 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pluvial-grid article {
  background: #fff;
  border: 1px solid #dedfd8;
  padding: 1.4rem 1.2rem;
}

.pluvial-grid h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  margin-bottom: 0.7rem;
}

.pluvial-highlight {
  background: var(--lime);
  padding: clamp(2rem, 5vw, 4rem) 2rem;
  border: 0;
}

.formula {
  margin: 1rem 0 1.2rem;
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(11, 12, 10, 0.35);
  background: #fff;
}

.mini-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.mini-cards div {
  background: #fff;
  border-top: 2px solid var(--black);
  padding: 1.1rem 0.2rem 0.4rem;
}

.mini-cards strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.mini-cards span {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #333;
}

.faq-list details {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}

.faq-list details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq-list details p {
  margin-top: 1rem;
  max-width: 74ch;
}

.pluvial-cta {
  margin-top: 1rem;
  padding: clamp(2.4rem, 6vw, 4.6rem) 0;
}

.pluvial-cta p {
  max-width: 62ch;
}

.pluvial-sources {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 5.5rem;
}

.pluvial-sources ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.pluvial-sources li {
  margin-bottom: 0.5rem;
}

.pluvial-sources a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.contact--blog {
  padding-top: 2rem;
}

/* Visualizations */
.pluvial-viz {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}

.pluvial-viz__head {
  margin-bottom: 1.6rem;
}

.svg-frame {
  margin: 0;
  background: #fff;
  border: 1px solid #dedfd8;
  padding: 1rem 1rem 0.6rem;
}

.svg-frame figcaption {
  font-size: 0.82rem;
  color: #555;
  padding: 0.85rem 0.35rem 0.9rem;
  border-top: 1px solid #ecece8;
  margin-top: 0.4rem;
}

.diagram {
  width: 100%;
  height: auto;
  display: block;
}

.svg-frame--split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.5rem 1.5rem;
  align-items: center;
}

.svg-frame--split .diagram {
  grid-row: 1;
}

.svg-frame--split .legend {
  grid-row: 1;
  list-style: none;
  margin: 0;
  padding: 0 0.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.svg-frame--split figcaption {
  grid-column: 1 / -1;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.95rem;
}

.legend i {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex: 0 0 auto;
}

/* Flow animation */
.diagram--flow .rain circle {
  animation: rainFall 1.8s linear infinite;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.diagram--flow .rain circle:nth-child(2) { animation-delay: 0.2s; }
.diagram--flow .rain circle:nth-child(3) { animation-delay: 0.45s; }
.diagram--flow .rain circle:nth-child(4) { animation-delay: 0.1s; }
.diagram--flow .rain circle:nth-child(5) { animation-delay: 0.7s; }
.diagram--flow .rain circle:nth-child(6) { animation-delay: 0.35s; }
.diagram--flow .rain circle:nth-child(7) { animation-delay: 0.55s; }
.diagram--flow .rain circle:nth-child(8) { animation-delay: 0.15s; }
.diagram--flow .rain circle:nth-child(9) { animation-delay: 0.85s; }
.diagram--flow .rain circle:nth-child(10) { animation-delay: 0.4s; }
.diagram--flow .rain circle:nth-child(11) { animation-delay: 0.65s; }

@keyframes rainFall {
  0% { transform: translateY(-8px); opacity: 0; }
  15% { opacity: 0.8; }
  100% { transform: translateY(42px); opacity: 0; }
}

.diagram--flow .pipe {
  stroke-dasharray: 12 10;
  animation: flowDash 1.1s linear infinite;
}

@keyframes flowDash {
  to { stroke-dashoffset: -44; }
}

.diagram--flow .tank-fill {
  transform-origin: bottom;
  transform-box: fill-box;
  animation: tankPulse 3.2s ease-in-out infinite;
}

@keyframes tankPulse {
  0%, 100% { transform: scaleY(0.72); opacity: 0.35; }
  50% { transform: scaleY(1); opacity: 0.55; }
}

.diagram--flow .uses rect {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.pluvial-viz.is-live .diagram--flow .uses rect:nth-of-type(1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.15s;
}
.pluvial-viz.is-live .diagram--flow .uses rect:nth-of-type(2) {
  opacity: 1;
  transform: none;
  transition-delay: 0.28s;
}
.pluvial-viz.is-live .diagram--flow .uses rect:nth-of-type(3) {
  opacity: 1;
  transform: none;
  transition-delay: 0.4s;
}

/* Bars */
.diagram--bars .bar {
  transition: height 1.1s cubic-bezier(0.16, 1, 0.3, 1), y 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.diagram--bars .bar-label {
  opacity: 0;
  transition: opacity 0.5s ease 0.45s;
}

.pluvial-viz.is-live .diagram--bars .bar-label {
  opacity: 1;
}

/* Donut — C ≈ 565 (2π·90); segmentos 50 / 25 / 15 / 10 %
   (el 1.er circle es el track de fondo) */
.diagram--donut .donut-seg {
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pluvial-viz.is-live .diagram--donut .donut-seg:nth-of-type(2) {
  stroke-dashoffset: 0;
  transition-delay: 0.05s;
}
.pluvial-viz.is-live .diagram--donut .donut-seg:nth-of-type(3) {
  stroke-dashoffset: -283;
  transition-delay: 0.15s;
}
.pluvial-viz.is-live .diagram--donut .donut-seg:nth-of-type(4) {
  stroke-dashoffset: -424;
  transition-delay: 0.25s;
}
.pluvial-viz.is-live .diagram--donut .donut-seg:nth-of-type(5) {
  stroke-dashoffset: -509;
  transition-delay: 0.35s;
}

/* Reveal */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .diagram--flow .rain circle,
  .diagram--flow .pipe,
  .diagram--flow .tank-fill {
    animation: none !important;
  }
  .reveal-up,
  .diagram--bars .bar,
  .diagram--bars .bar-label,
  .diagram--donut .donut-seg,
  .diagram--flow .uses rect {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .pluvial-viz.is-live .diagram--donut .donut-seg:nth-of-type(2) { stroke-dashoffset: 0; }
  .pluvial-viz.is-live .diagram--donut .donut-seg:nth-of-type(3) { stroke-dashoffset: -283; }
  .pluvial-viz.is-live .diagram--donut .donut-seg:nth-of-type(4) { stroke-dashoffset: -424; }
  .pluvial-viz.is-live .diagram--donut .donut-seg:nth-of-type(5) { stroke-dashoffset: -509; }
}

@media (max-width: 820px) {
  .pluvial-page {
    padding-top: 66px;
  }

  .pluvial-hero,
  .pluvial-block,
  .pluvial-grid,
  .pluvial-cta,
  .pluvial-sources,
  .pluvial-viz {
    width: calc(100% - 14vw);
  }

  .pluvial-grid,
  .mini-cards,
  .svg-frame--split {
    grid-template-columns: 1fr;
  }

  .svg-frame--split .legend {
    padding: 0 0.2rem 0.6rem;
  }

  .pluvial-highlight {
    padding: 1.5rem 1rem;
  }
}
