/* =========================================================================
   s7s — Secure, so you can stop worrying about it (SECURITY)
   Split out of the old s7. Layout archetype: CENTRED, abstract, NO device frame
   (alternates from the s7b SPLIT local-search visual that follows).
   Signature motion (ONE): a single scrubbed proxy --charge (0 -> 1) on .s7s-stage.
   Everything derives from it:
     - the four protection checks ignite gold ONE AFTER ANOTHER (each box keys off
       --charge against its own --i staged threshold)
     - the shield body brightens and its tick draws LAST
   Transform / opacity / stroke-dashoffset only. Reduced motion + no-JS force
   --charge:1 so the section rests fully charged and readable.
   ========================================================================= */

#s7s {
  --charge: 0;            /* 0 cold -> 1 fully charged; JS scrubs it */
  text-align: center;
}

#s7s .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2.2rem, 5vw, 3.4rem);
}

/* ---- head ------------------------------------------------------------- */
#s7s .s7s-head {
  max-width: var(--maxw-prose);
  margin-inline: auto;
}
#s7s .s7s-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  justify-content: center;
  margin-bottom: var(--sp-3);
}
#s7s .s7s-eyebrow::before,
#s7s .s7s-eyebrow::after {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}
#s7s .s7s-eyebrow::after { background: linear-gradient(90deg, var(--gold-soft), transparent); }
#s7s .s7s-title {
  font-size: var(--fs-h2);
  font-weight: 600; line-height: 1.08; letter-spacing: -0.01em;
  color: var(--ice); text-wrap: balance;
  margin: 0;
}
#s7s .s7s-title .accent { color: var(--gold-bright); font-style: italic; font-weight: 500; }
#s7s .s7s-lead {
  margin: var(--sp-3) auto 0;
  color: var(--parchment-dim);
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 58ch;
  text-wrap: pretty;
}

/* ---- stage (the abstract centrepiece) --------------------------------- */
#s7s .s7s-stage {
  position: relative;
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  gap: clamp(1.8rem, 6vw, 4rem);
  padding: clamp(2.2rem, 4.5vw, 3.2rem) clamp(1.2rem, 4vw, 3rem);
  border: 1px solid rgba(110, 118, 132, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(168, 200, 224, 0.05), transparent 60%),
    linear-gradient(180deg, rgba(20, 24, 32, 0.55), rgba(8, 9, 12, 0.35));
  overflow: hidden;
  isolation: isolate;
}

/* subtle star / edge-node motif (shared with s7): drifting orbit rings + sparks */
#s7s .s7-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(168, 200, 224, 0.10);
  pointer-events: none;
  z-index: 0;
  opacity: calc(0.25 + var(--charge) * 0.55);
  transition: opacity 0.4s linear;
}
#s7s .s7-orbit--a {
  width: 360px; height: 360px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(calc(0.9 + var(--charge) * 0.1));
  animation: s7-spin 60s linear infinite;
}
#s7s .s7-orbit--b {
  width: 540px; height: 540px;
  left: 50%; top: 50%;
  border-color: rgba(196, 162, 101, 0.08);
  transform: translate(-50%, -50%);
  animation: s7-spin 90s linear infinite reverse;
}
#s7s .s7-spark {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--cyan-glow);
  box-shadow: 0 0 6px 1px rgba(168, 200, 224, 0.7);
  z-index: 0;
  pointer-events: none;
  opacity: calc(var(--charge) * 0.8);
  transition: opacity 0.5s linear;
}
#s7s .s7-spark--1 { left: 14%; top: 22%; animation: s7-twinkle 4.2s ease-in-out infinite; }
#s7s .s7-spark--2 { left: 82%; top: 30%; background: var(--gold-soft); box-shadow: 0 0 6px 1px rgba(196,162,101,.7); animation: s7-twinkle 5.6s ease-in-out infinite 0.8s; }
#s7s .s7-spark--3 { left: 70%; top: 78%; animation: s7-twinkle 4.8s ease-in-out infinite 1.6s; }

/* ---- shield ----------------------------------------------------------- */
#s7s .s7-shield {
  position: relative;
  z-index: 1;
  width: clamp(82px, 17vw, 112px);
}
#s7s .s7-shield__svg { width: 100%; height: auto; overflow: visible; display: block; }
#s7s .s7-shield__body {
  fill: rgba(168, 200, 224, calc(0.05 + var(--charge) * 0.07));
  stroke: var(--gold-soft);
  stroke-width: 2.5;
  opacity: calc(0.4 + var(--charge) * 0.6);
  filter: drop-shadow(0 0 8px rgba(196, 162, 101, calc(var(--charge) * 0.45)));
}
/* shield tick draws LAST (only after charge passes 0.7) */
#s7s .s7-shield__tick {
  stroke: var(--gold-bright);
  stroke-dasharray: 60;
  stroke-dashoffset: calc(60 - 60 * clamp(0, (var(--charge) - 0.7) / 0.3, 1));
}
/* gentle pulse once charged (decorative, transform/opacity only) */
#s7s .s7-shield__pulse {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  border: 1px solid rgba(196, 162, 101, 0.4);
  opacity: calc(clamp(0, (var(--charge) - 0.85) / 0.15, 1));
  animation: s7-pulse 2.8s ease-out infinite;
}

/* ---- protection checks ------------------------------------------------ */
#s7s .s7-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  text-align: left;
  width: max-content;
  max-width: 100%;
}
#s7s .s7-check {
  --start: calc(var(--i) * 0.16);     /* staged ignition threshold per row */
  --span: 0.2;
  --lit: clamp(0, (var(--charge) - var(--start)) / var(--span), 1);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: var(--fs-small);
  color: var(--ice);
  opacity: calc(0.4 + var(--lit) * 0.6);
  transform: translateX(calc((1 - var(--lit)) * -8px));
}
#s7s .s7-check__box {
  flex: none;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid rgba(196, 162, 101, calc(0.3 + var(--lit) * 0.7));
  background: rgba(196, 162, 101, calc(var(--lit) * 0.16));
  box-shadow: 0 0 calc(var(--lit) * 10px) rgba(196, 162, 101, calc(var(--lit) * 0.4));
  transform: scale(calc(0.82 + var(--lit) * 0.18));
}
#s7s .s7-check__box svg {
  width: 15px; height: 15px;
}
#s7s .s7-check__box svg path {
  stroke: var(--gold-bright);
  stroke-dasharray: 28;
  stroke-dashoffset: calc(28 - 28 * var(--lit));
}
#s7s .s7-check__txt { line-height: 1.3; font-size: var(--fs-small); }

/* ---- responsive ------------------------------------------------------- */
@media (max-width: 760px) {
  #s7s .s7s-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: clamp(2rem, 8vw, 2.8rem);
    max-width: 460px;
  }
  #s7s .s7-orbit--a { width: 300px; height: 300px; }
  #s7s .s7-orbit--b { width: 440px; height: 440px; }
}

/* ---- reduced motion / no-JS resting state: fully charged -------------- */
@media (prefers-reduced-motion: reduce) {
  #s7s { --charge: 1; }
  #s7s .s7-orbit,
  #s7s .s7-spark,
  #s7s .s7-shield__pulse { animation: none; }
}
.no-js #s7s { --charge: 1; }
