/* ==========================================================================
   S02 — The HYGIENE HAVEN difference: interactive brand diagram
   ========================================================================== */
.s02 {
  position: relative;
  padding: clamp(4rem, 8vw, 7rem) 0 var(--section-y);
  background:
    radial-gradient(60% 55% at 22% 62%, var(--mint) 0%, rgba(234, 243, 231, 0) 70%),
    var(--white);
  overflow: hidden;
}

/* ---------- Head ---------- */
.s02__head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}
.s02__title { margin-top: 1.1rem; max-width: 15ch; }
.s02__head-side .lead { max-width: 46ch; }
.s02__hint { display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.4rem; color: var(--teal-700); }
.s02__hint-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: hh-pulse 2s var(--ease-in-out) infinite; }

/* ---------- Body ---------- */
.s02__body {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
}

/* ---------- Diagram ---------- */
.s02__diagram { position: relative; width: 100%; max-width: 640px; aspect-ratio: 1; margin-inline: auto; }
.s02__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.s02__ring { fill: none; transform-origin: 300px 300px; }
.s02__ring--ticks { stroke: var(--teal); opacity: .22; stroke-width: 8; stroke-dasharray: 1.2 10.5; animation: hh-spin 140s linear infinite; }
.s02__ring--orbit { stroke: var(--line); stroke-width: 1.2; }
.s02__ring--inner { stroke: var(--teal); opacity: .35; stroke-width: 1.2; stroke-dasharray: 3 7; animation: hh-spin-rev 60s linear infinite; }
.s02__ring--inner2 { stroke: var(--lime); opacity: .55; stroke-width: 2; stroke-dasharray: 60 22 4 22; animation: hh-spin 38s linear infinite; }
.s02__selector { transform-origin: 300px 300px; transform: rotate(var(--sel, -135deg)); transition: transform 1.1s var(--ease-out); }
.s02__selector path { fill: none; stroke: var(--lime); stroke-width: 6; stroke-linecap: round; }
.s02__selector circle { fill: var(--teal); }
.s02__disc { filter: drop-shadow(0 18px 30px rgba(32, 61, 61, .18)); }
.s02__core { transform-origin: 300px 300px; animation: hh-spin 50s linear infinite; }

.s02__line path { fill: none; stroke-linecap: round; }
.s02__line-base { stroke: var(--teal-300); stroke-width: 1.5; opacity: .6; transition: stroke .5s, stroke-width .5s, opacity .5s; }
.s02__line-flow { stroke: var(--teal); stroke-width: 2.5; stroke-dasharray: 3 14; animation: s02-flow 2.4s linear infinite; opacity: .55; transition: stroke .5s, opacity .5s; }
.s02__line.is-active .s02__line-base { stroke: var(--lime); stroke-width: 9; opacity: .55; }
.s02__line.is-active .s02__line-flow { stroke: var(--forest); stroke-width: 3; opacity: 1; animation-duration: 1.1s; }

/* ---------- Nodes (real buttons over the SVG) ---------- */
.s02__nodes { position: absolute; inset: 0; }
.s02__node {
  position: absolute; left: var(--x); top: var(--y);
  width: clamp(64px, 8.4vw, 96px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.s02__bubble {
  position: absolute; inset: 0; display: grid; place-items: center;
  border-radius: 50%; background: var(--white); color: var(--teal);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform .7s var(--ease-spring), background .4s, color .4s, box-shadow .5s;
}
.s02__bubble svg { width: 42%; height: 42%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.s02__bubble::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1.5px solid var(--lime); opacity: 0; transform: scale(.8); transition: opacity .4s, transform .6s var(--ease-out); }
.s02__label {
  position: absolute; left: 50%; top: calc(100% + .8rem); transform: translateX(-50%);
  width: max-content; max-width: 13rem; text-align: center;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(.95rem, 1.25vw, 1.1rem); letter-spacing: -.01em; line-height: 1.15;
  color: var(--forest);
  transition: transform .6s var(--ease-out);
}
.s02__tag { display: block; margin-top: .35rem; font-family: var(--font-body); font-weight: 500; font-size: .78rem; letter-spacing: 0; color: var(--teal-700); opacity: 0; transform: translateY(-6px); transition: opacity .45s, transform .6s var(--ease-out); }
.s02__node:hover .s02__bubble { transform: scale(1.08); }
.s02__node.is-active .s02__bubble { transform: scale(1.2); background: var(--lime); color: var(--forest); border-color: transparent; box-shadow: 0 24px 46px -18px rgba(93, 116, 18, .55); }
.s02__node.is-active .s02__bubble::after { opacity: 1; transform: scale(1); animation: s02-ring 2.4s var(--ease-out) .4s infinite; }
.s02__node.is-active .s02__label { transform: translateX(-50%) translateY(.55rem); }
/* top pillars carry their label above the bubble, clear of the connectors */
.s02__node:nth-child(-n+2) .s02__label { top: auto; bottom: calc(100% + .8rem); display: flex; flex-direction: column-reverse; align-items: center; }
.s02__node:nth-child(-n+2) .s02__tag { margin: 0 0 .35rem; transform: translateY(6px); }
.s02__node:nth-child(-n+2).is-active .s02__label { transform: translateX(-50%) translateY(-.55rem); }
.s02__node:nth-child(-n+2).is-active .s02__tag { transform: none; }
.s02__node.is-active .s02__tag { opacity: 1; transform: none; }
.s02__node:focus-visible { outline: none; }
.s02__node:focus-visible .s02__bubble { outline: 3px solid var(--teal); outline-offset: 6px; }

/* ---------- Panel ---------- */
.s02__panel { position: relative; }
.s02__visual { position: relative; aspect-ratio: 9 / 6.4; border-radius: var(--r-lg); overflow: hidden; background: var(--mint); box-shadow: var(--shadow-lift); }
.s02__img { position: absolute; inset: 0; clip-path: circle(0% at var(--ox) var(--oy)); transition: clip-path 1.15s var(--ease-in-out); z-index: 1; }
.s02__img.is-active { clip-path: circle(142% at var(--ox) var(--oy)); z-index: 2; }
.s02__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.6s var(--ease-out); }
.s02__img.is-active img { transform: scale(1); }
.s02__count { position: absolute; z-index: 3; left: 1rem; bottom: 1rem; padding: .45rem .8rem; border-radius: var(--r-pill); background: rgba(255, 255, 255, .9); color: var(--forest); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.s02__count b { color: var(--teal-700); }

.s02__texts { display: grid; margin-top: clamp(1.5rem, 3vw, 2.2rem); }
.s02__text { grid-area: 1 / 1; visibility: hidden; opacity: 0; transform: translateX(24px); transition: opacity .45s, transform .7s var(--ease-out), visibility 0s .7s; }
.s02__text.is-active { visibility: visible; opacity: 1; transform: none; transition-delay: .12s, .12s, 0s; }
.s02__text h3 { color: var(--forest); }
.s02__text p { margin-top: .8rem; color: var(--ink-soft); max-width: 46ch; }
.s02__text ul { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.s02__text li { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .85rem; border-radius: var(--r-pill); background: var(--pale-lime); color: var(--forest); font-size: var(--fs-small); font-weight: 600; }
.s02__text li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

/* ---------- Entrance: rings expand from the core, nodes settle in with blur ---------- */
.s02__svg { opacity: 0; transform: scale(.86) rotate(-12deg); transition: opacity 1s var(--ease-out), transform 1.6s var(--ease-out); }
.s02__node { opacity: 0; filter: blur(8px); transition: opacity .8s var(--ease-out), filter .8s var(--ease-out); }
.s02__node:nth-child(2) { --n: 1; } .s02__node:nth-child(3) { --n: 2; } .s02__node:nth-child(4) { --n: 3; }
.s02__line-base { stroke-dasharray: 400; stroke-dashoffset: 400; }
.s02.is-in .s02__svg { opacity: 1; transform: none; }
.s02.is-in .s02__node { opacity: 1; filter: none; transition-delay: calc(.5s + var(--n, 0) * .12s); }
.s02.is-in .s02__line-base { animation: s02-draw 1.4s var(--ease-out) .4s forwards; }
.s02.no-js .s02__svg, .s02.no-js .s02__node { opacity: 1; transform: none; filter: none; }

@keyframes s02-flow { to { stroke-dashoffset: -34; } }
@keyframes s02-draw { to { stroke-dashoffset: 0; } }
@keyframes s02-ring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .s02__head { grid-template-columns: 1fr; align-items: start; }
  .s02__body { grid-template-columns: 1fr; }
  .s02__diagram { max-width: 600px; }
  .s02__panel { max-width: 640px; margin-inline: auto; width: 100%; }
}
@media (max-width: 600px) {
  .s02__diagram { width: calc(100% + 1rem); margin-inline: -.5rem; margin-bottom: 1.5rem; }
  .s02__node { width: 58px; }
  .s02__bubble svg { width: 46%; height: 46%; }
  .s02__label { font-size: .82rem; max-width: 7.5rem; top: calc(100% + .55rem); }
  .s02__tag { display: none; }
  .s02__node.is-active .s02__label { transform: translateX(-50%) translateY(.35rem); }
  .s02__node:nth-child(-n+2) .s02__label { bottom: calc(100% + .55rem); }
  .s02__node:nth-child(-n+2).is-active .s02__label { transform: translateX(-50%) translateY(-.35rem); }
  .s02__selector path { stroke-width: 5; }
  .s02__visual { aspect-ratio: 4 / 3; border-radius: var(--r-md); }
}

@media (prefers-reduced-motion: reduce) {
  .s02__svg, .s02__node { opacity: 1 !important; transform: none; filter: none !important; }
  .s02__node { transform: translate(-50%, -50%); }
  .s02__line-base { stroke-dashoffset: 0 !important; }
}
