.rhythm-section {
  --rhythm-concern: #C44141;
  --rhythm-concern-light: #EBA5A0;
  --rhythm-concern-deep: #8F2F35;
  --rhythm-soft-shadow: #153D3424;
  --rhythm-link-shine: #FFFFFFA6;
  --rhythm-link-depth: #153D341A;
  --rhythm-new-start: 75;
  --rhythm-active-glow: #92D7C570;
  --rhythm-accent: var(--primary);
  padding-block: clamp(64px, 7vw, 112px);
  background: var(--surface);
  color: var(--on-surface);
}

.rhythm-heading {
  max-width: 960px;
  margin-inline: auto;
}

.rhythm-heading h2 {
  max-width: 30ch;
  font-family: var(--font-heading);
  font-size: clamp(30px, 22px + 1.7vw, 46px);
  line-height: 1.17;
  letter-spacing: -0.025em;
}

.rhythm-intro {
  max-width: 68ch;
  margin-top: 24px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.8;
}

.rhythm-figure {
  margin: clamp(32px, 4vw, 56px) 0 0;
}

.rhythm-stage {
  isolation: isolate;
  width: 100%;
}

.rhythm-diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 192px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.rhythm-cycle {
  --cycle-ink: var(--rhythm-concern);
  --cycle-highlight: var(--rhythm-concern-light);
  --cycle-deep: var(--rhythm-concern-deep);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 500px;
  align-self: stretch;
  padding: 76px 44px;
}

.rhythm-cycle[data-rhythm-cycle="old"],
.rhythm-cycle[data-rhythm-cycle="new"] {
  padding-block: 110px;
}

.rhythm-cycle[data-rhythm-cycle="new"] {
  --cycle-ink: var(--rhythm-accent);
  --cycle-highlight: var(--secondary);
  --cycle-deep: var(--footer);
}

.rhythm-cycle-ring {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0.82;
  transition: opacity 700ms ease;
}

.rhythm-cycle-ring path {
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.rhythm-band-highlight {
  stop-color: var(--cycle-highlight);
}

.rhythm-band-color {
  stop-color: var(--cycle-ink);
}

.rhythm-band-deep {
  stop-color: var(--cycle-deep);
}

.rhythm-ring-shadow {
  stroke: var(--rhythm-soft-shadow);
  stroke-width: 18;
  transform: translateY(8px);
  filter: blur(5px);
}

.rhythm-ring-depth {
  stroke: var(--cycle-deep);
  stroke-width: 20;
  opacity: 0.34;
  transform: translateY(4px);
}

.rhythm-ring-track {
  stroke-width: 19;
}

.rhythm-ring-light {
  stroke: var(--surface);
  stroke-width: 1.5;
  opacity: 0.65;
  transform: translateY(-5px);
}

.rhythm-cycle-ring [data-rhythm-flow] {
  stroke: var(--surface);
  stroke-width: 7;
  stroke-dasharray: 22 78;
  vector-effect: none;
  opacity: 0;
}

.rhythm-cycle-ring [data-rhythm-flow="new"] {
  stroke-dashoffset: var(--rhythm-new-flow, 0);
}

.rhythm-section[data-playing="true"] [data-rhythm-flow="new"] {
  opacity: 1;
}

.rhythm-section[data-playing="true"] [data-rhythm-cycle="new"] .rhythm-cycle-ring {
  filter: drop-shadow(0 0 7px var(--rhythm-active-glow));
}

.rhythm-cycle[data-rhythm-cycle="new"] .rhythm-cycle-ring {
  opacity: 1;
}

.rhythm-cycle[data-rhythm-cycle="old"] .rhythm-cycle-ring {
  opacity: 0.5;
}

.rhythm-cycle-content {
  width: 100%;
  max-width: 310px;
}

.rhythm-cycle h3 {
  margin: 0 0 28px;
  color: var(--cycle-ink);
  font-family: var(--font-ui);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.025em;
  text-align: center;
}

.rhythm-cycle ul {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rhythm-node {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-width: 0;
  color: var(--on-surface);
  font-family: var(--font-ui);
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.45;
  hyphens: auto;
  hyphenate-limit-chars: 12 5 5;
  overflow-wrap: normal;
}

.rhythm-node-icon {
  display: block;
  width: 30px;
  height: 30px;
  color: var(--cycle-ink);
}

.rhythm-node span {
  min-width: 0;
}

.rhythm-centre {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-block: 12px;
  text-align: center;
}

.rhythm-centre::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(50% + 28px);
  left: -34px;
  right: -34px;
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--rhythm-concern-light), var(--rhythm-accent), var(--secondary));
  box-shadow: inset 0 2px 1px var(--rhythm-link-shine), 0 3px 0 var(--rhythm-link-depth);
}

.rhythm-centre-title {
  max-width: 176px;
  margin: 0;
  padding: 4px;
  background: var(--surface);
  color: var(--rhythm-accent);
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.rhythm-photo {
  position: relative;
  width: 176px;
  height: 176px;
  margin: 0;
  overflow: hidden;
  border: 6px solid var(--surface);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 6px 20px var(--rhythm-soft-shadow);
}

.rhythm-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}

.rhythm-action {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

@media (max-width: 999.98px) {
  .rhythm-section {
    --rhythm-new-start: 0;
  }

  .rhythm-diagram {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0;
  }

  .rhythm-cycle {
    width: min(100%, 470px);
    min-height: 470px;
    padding: 72px 40px;
  }

  .rhythm-centre {
    width: min(100%, 470px);
    margin-block: 8px;
    gap: 10px;
  }

  .rhythm-centre::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -20px;
    bottom: -20px;
    height: auto;
    right: auto;
    left: calc(50% - 6px);
    width: 12px;
    border-radius: 8px;
    background: linear-gradient(var(--rhythm-concern-light), var(--rhythm-concern) 34%, var(--rhythm-accent) 64%, var(--secondary));
    box-shadow: inset 2px 0 1px var(--rhythm-link-shine), 3px 0 0 var(--rhythm-link-depth);
  }

  .rhythm-centre-title {
    max-width: 240px;
    padding: 8px 18px;
  }


  .rhythm-intro {
    font-size: 17px;
    line-height: 1.75;
  }
}

@media (max-width: 380px) {
  .rhythm-cycle {
    padding: 94px 40px;
  }

  .rhythm-cycle h3 {
    font-size: 19px;
  }

  .rhythm-node {
    column-gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rhythm-section * {
    scroll-behavior: auto;
    transition: none;
  }

  .rhythm-cycle-ring [data-rhythm-flow] {
    display: none;
  }
}
