/* ==========================================================================
   S03 — The hygiene ecosystem: circular, selectable service diagram
   ========================================================================== */
.s03 {
  position: relative;
  padding: var(--section-y) 0;
  background: var(--forest);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.s03__bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48% 60% at 30% 62%, rgba(52, 127, 131, .55) 0%, rgba(52, 127, 131, 0) 70%),
    radial-gradient(30% 40% at 85% 15%, rgba(197, 222, 107, .12) 0%, rgba(197, 222, 107, 0) 70%),
    repeating-radial-gradient(circle at 30% 62%, rgba(255, 255, 255, .035) 0 1px, transparent 1px 64px);
}

/* ---------- Head ---------- */
.s03__head { display: grid; justify-items: center; text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.s03__title { margin: 1.1rem 0 1.2rem; max-width: 17ch; }
.s03__lead { color: rgba(255, 255, 255, .74); max-width: 54ch; }

/* ---------- Layout ---------- */
.s03__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
}

/* ---------- Ring ---------- */
.s03__ring { position: relative; width: 100%; max-width: 700px; aspect-ratio: 1; margin-inline: auto; container-type: inline-size; }
.s03__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.s03__c { fill: none; transform-origin: 350px 350px; }
.s03__c--ticks { stroke: rgba(255, 255, 255, .16); stroke-width: 10; stroke-dasharray: 1 9.37; animation: hh-spin 160s linear infinite; }
.s03__c--outer { stroke: rgba(141, 187, 189, .22); stroke-width: 1; }
.s03__c--orbit { stroke: rgba(141, 187, 189, .35); stroke-width: 1.4; }
.s03__c--orbit-flow { stroke: var(--lime); stroke-width: 2; stroke-dasharray: 2 18; opacity: .55; animation: hh-spin 70s linear infinite; }
.s03__c--dash { stroke: rgba(197, 222, 107, .5); stroke-width: 1.4; stroke-dasharray: 5 9; animation: hh-spin-rev 50s linear infinite; }
.s03__sats { transform-origin: 350px 350px; animation: hh-spin-rev 40s linear infinite; }
.s03__sats circle { fill: var(--lime); }
.s03__sats circle:nth-child(2) { fill: #fff; } .s03__sats circle:nth-child(3) { fill: var(--teal-300); }
.s03__center { stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.s03__center-mark { transform-origin: 350px 300px; animation: hh-spin 36s linear infinite; }
.s03__center-name { font-family: var(--font-display); font-weight: 700; font-size: 25px; letter-spacing: .04em; fill: var(--lime); }
.s03__center-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .22em; fill: rgba(255, 255, 255, .6); }
.s03__selector { transform-origin: 350px 350px; transform: rotate(var(--sel, 0deg)); transition: transform 1s var(--ease-out); }
.s03__selector path { fill: none; stroke: var(--lime); stroke-width: 5; stroke-linecap: round; }

.s03__link path { fill: none; stroke-linecap: round; }
.s03__link-base { stroke: rgba(141, 187, 189, .45); stroke-width: 1.5; transition: stroke .5s, stroke-width .5s; }
.s03__link-flow { stroke: rgba(255, 255, 255, .5); stroke-width: 2; stroke-dasharray: 2 12; animation: s03-flow 2.8s linear infinite; transition: stroke .5s; }
.s03__link.is-active .s03__link-base { stroke: var(--lime); stroke-width: 3; filter: drop-shadow(0 0 6px rgba(197, 222, 107, .7)); }
.s03__link.is-active .s03__link-flow { stroke: var(--forest); stroke-width: 2.4; animation-duration: 1s; }

/* nodes */
.s03__nodes { position: absolute; inset: 0; }
.s03__node {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: clamp(70px, 13.5cqw, 96px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.s03__bubble {
  position: absolute; inset: 0; display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(32, 61, 61, .78);
  border: 1px solid rgba(255, 255, 255, .2);
  color: var(--dc);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, .7);
  transition: transform .7s var(--ease-spring), background .4s, color .4s, border-color .4s, box-shadow .5s;
}
.s03__bubble svg { width: 44%; height: 44%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.s03__bubble::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px dashed var(--dc); opacity: .35; transition: opacity .4s; animation: hh-spin 24s linear infinite; }
.s03__idx { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--dc); color: var(--forest); font-family: var(--font-mono); font-size: .62rem; font-weight: 500; }
.s03__label {
  position: absolute; left: 50%; top: calc(100% + .75rem); transform: translateX(-50%);
  width: max-content; max-width: 11.5rem; text-align: center;
  font-weight: 600; font-size: .86rem; line-height: 1.25; color: rgba(255, 255, 255, .82);
  transition: color .4s, transform .6s var(--ease-out);
}
.s03__node:hover .s03__bubble { transform: scale(1.08); border-color: var(--dc); }
.s03__node.is-active .s03__bubble { transform: scale(1.16); background: var(--dc); color: var(--forest); border-color: transparent; box-shadow: 0 0 0 10px rgba(197, 222, 107, .12), 0 0 46px rgba(197, 222, 107, .35); }
.s03__node.is-active .s03__bubble::before { opacity: 1; border-style: solid; border-color: var(--lime); }
.s03__node.is-active .s03__idx { background: var(--forest); color: var(--lime); }
.s03__node.is-active .s03__label { color: var(--lime); transform: translateX(-50%) translateY(.4rem); }
.s03__node:first-child .s03__label { top: auto; bottom: calc(100% + .75rem); }
.s03__node:first-child.is-active .s03__label { transform: translateX(-50%) translateY(-.4rem); }
.s03__node:focus-visible { outline: none; }
.s03__node:focus-visible .s03__bubble { outline: 3px solid var(--lime); outline-offset: 10px; }

/* ---------- Detail panel ---------- */
.s03__detail { position: relative; }
.s03__panels {
  position: relative;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  overflow: hidden;
}
.s03__panels::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--lime); }
.s03__panel { outline: none; }
.s03__panel[hidden] { display: none; }
.s03__panel.is-active > * { animation: s03-in .7s var(--ease-out) both; }
.s03__panel.is-active > *:nth-child(2) { animation-delay: .06s; }
.s03__panel.is-active > *:nth-child(3) { animation-delay: .12s; }
.s03__panel.is-active > *:nth-child(4) { animation-delay: .18s; }
.s03__panel.is-active > *:nth-child(5) { animation-delay: .24s; }
.s03__panel:focus-visible { box-shadow: 0 0 0 2px var(--lime); border-radius: var(--r-sm); }
.s03__panel-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; color: rgba(255, 255, 255, .6); }
.s03__num { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .1em; color: var(--forest); background: var(--dc); padding: .3rem .7rem; border-radius: var(--r-pill); }
.s03__panel h3 { color: #fff; }
.s03__panel p { margin-top: .9rem; color: rgba(255, 255, 255, .76); }
.s03__list { display: grid; gap: .1rem; margin: 1.4rem 0 1.6rem; }
.s03__list li { display: flex; align-items: center; gap: .75rem; padding: .62rem 0; border-bottom: 1px solid rgba(255, 255, 255, .1); font-weight: 500; }
.s03__list li::before { content: ""; flex: none; width: 18px; height: 2px; background: var(--lime); }
.s03__panel .link-arrow { color: var(--lime); }

.s03__pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.s03__step { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); color: #fff; transition: background .3s, color .3s, border-color .3s; }
.s03__step svg { width: 20px; height: 20px; }
.s03__step[data-step="-1"] svg { transform: scaleX(-1); }
.s03__step:hover { background: var(--lime); color: var(--forest); border-color: var(--lime); }
.s03__dots { display: flex; gap: .5rem; }
.s03__dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .25); transition: width .5s var(--ease-out), background .3s; }
.s03__dots i.is-active { width: 28px; border-radius: 4px; background: var(--lime); }
.s03__cta { margin-top: 1.4rem; }

/* ---------- Entrance: radial burst from the centre ---------- */
.s03__link-base { stroke-dasharray: 320; stroke-dashoffset: 320; }
.s03__node { opacity: 0; transform: translate(-50%, -50%) translate(calc((50 - var(--x)) * 1cqw), calc((50 - var(--y)) * 1cqw)) scale(.3); transition: opacity .6s var(--ease-out), transform 1.2s var(--ease-out); }
.s03__center, .s03__center-mark, .s03__center-name, .s03__center-sub { opacity: 0; transition: opacity 1s var(--ease-out); }
.s03.is-in .s03__center, .s03.is-in .s03__center-mark, .s03.is-in .s03__center-name, .s03.is-in .s03__center-sub { opacity: 1; }
.s03.is-in .s03__link-base { animation: s03-draw 1.2s var(--ease-out) forwards; }
.s03.is-in .s03__link:nth-child(2) .s03__link-base { animation-delay: .1s; }
.s03.is-in .s03__link:nth-child(3) .s03__link-base { animation-delay: .2s; }
.s03.is-in .s03__link:nth-child(4) .s03__link-base { animation-delay: .3s; }
.s03.is-in .s03__link:nth-child(5) .s03__link-base { animation-delay: .4s; }
.s03.is-in .s03__node { opacity: 1; transform: translate(-50%, -50%); transition-delay: calc(.35s + var(--n, 0) * .1s); }
.s03__node:nth-child(2) { --n: 1; } .s03__node:nth-child(3) { --n: 2; } .s03__node:nth-child(4) { --n: 3; } .s03__node:nth-child(5) { --n: 4; }
.s03.is-settled .s03__node { transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); transition-delay: 0s; }

@keyframes s03-flow { to { stroke-dashoffset: -28; } }
@keyframes s03-draw { to { stroke-dashoffset: 0; } }
@keyframes s03-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (min-width: 761px) { .s03__pager { display: none; } }
@media (max-width: 1100px) {
  .s03__layout { grid-template-columns: 1fr; }
  .s03__ring { max-width: 620px; }
  .s03__detail { max-width: 640px; width: 100%; margin-inline: auto; }
}
@media (max-width: 760px) {
  /* Mobile: a compact icon ring with the detail panel and a pager below */
  .s03__head { justify-items: start; text-align: left; }
  .s03__ring { width: min(100%, 400px); }
  .s03__node { width: 62px; }
  .s03__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .s03__idx { width: 22px; height: 22px; font-size: .56rem; top: -6px; right: -6px; }
  .s03__center-name { font-size: 30px; }
  .s03__center-sub { font-size: 13px; }
  .s03__c--ticks { display: none; }
  .s03__panels { padding: 1.4rem 1.3rem; }
  .s03__cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .s03__link-base { stroke-dashoffset: 0 !important; }
  .s03__node { opacity: 1 !important; transform: translate(-50%, -50%) !important; }
  .s03__center, .s03__center-mark, .s03__center-name, .s03__center-sub { opacity: 1 !important; }
}
.s03__selector circle { fill: var(--forest); stroke: var(--lime); stroke-width: 2; }
.s03__label { text-shadow: 0 0 6px var(--forest), 0 0 14px var(--forest); }
