/* ════════════════════════════════════════════════════════════════════════
   sections.css — playful section treatments for the light body sections.
   Adds (a) a gentle color rhythm to the otherwise all-white sections and
   (b) an abstract-shape decoration layer echoing the hero (orbs / dot-grid /
   geometry). Everything is gated on data-attributes set by the Tweaks panel,
   so it degrades to the original clean look when switched off.

   Accent hues are driven by two CSS vars set inline on <html>:
     --deco-a  primary decorative hue
     --deco-b  secondary decorative hue
   Defaults (brand red / warm gold) below so the page looks right with no JS.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --deco-a: #ad2324;   /* brand red   */
  --deco-b: #e0a55f;   /* warm gold   */
}

/* The decorated sections become positioning contexts; content rides above
   the deco layer. (These sections carry no ::before/::after of their own.) */
.about,
.features,
.courses,
.tests,
.clients { position: relative; isolation: isolate; }

.about   > .wrap,
.features > .wrap,
.courses > .wrap,
.tests   > .wrap,
.clients > .wrap { position: relative; z-index: 1; }

/* ───────────────────────── decoration layer ───────────────────────── */
.sect-deco {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  /* hidden unless shapes are switched on */
  opacity: 0;
  transition: opacity .5s ease;
}
html[data-deco-shapes="on"] .sect-deco { opacity: 1; }

.sect-deco > * { position: absolute; will-change: transform; }

/* — blurred orbs are RETIRED: they lived in an overflow:hidden layer and got
   sliced flat at section edges (hard color lines). Colour now lives in each
   section's own background as radial blooms that fade out before any edge. — */
.sect-deco .d-orb { display: none !important; }

/* — dot grid patch — */
.sect-deco .d-dots {
  width: 280px; height: 280px;
  background-image: radial-gradient(circle, color-mix(in oklab, var(--deco-a) 32%, transparent) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask: radial-gradient(circle at 50% 50%, black 0%, transparent 72%);
          mask: radial-gradient(circle at 50% 50%, black 0%, transparent 72%);
  opacity: 0.75;
}

/* — geometry: outline ring + soft square — */
.sect-deco .d-ring {
  width: 120px; height: 120px;
  border: 2px solid color-mix(in oklab, var(--deco-a) 38%, transparent);
  border-radius: 50%;
  animation: deco-bob 12s ease-in-out infinite;
}
.sect-deco .d-square {
  width: 84px; height: 84px;
  border-radius: 22px;
  background: color-mix(in oklab, var(--deco-b) 22%, transparent);
  transform: rotate(18deg);
  animation: deco-spin 24s linear infinite;
}
.sect-deco .d-plus {
  width: 60px; height: 60px;
  color: color-mix(in oklab, var(--deco-a) 40%, transparent);
  animation: deco-bob 10s ease-in-out infinite reverse;
}
.sect-deco .d-plus svg { width: 100%; height: 100%; display: block; }

/* shape-style filter: show only the relevant family */
html[data-deco-style="orbs"] .sect-deco .d-dots,
html[data-deco-style="orbs"] .sect-deco .d-ring,
html[data-deco-style="orbs"] .sect-deco .d-square,
html[data-deco-style="orbs"] .sect-deco .d-plus { display: none; }

html[data-deco-style="dots"] .sect-deco .d-orb,
html[data-deco-style="dots"] .sect-deco .d-ring,
html[data-deco-style="dots"] .sect-deco .d-square,
html[data-deco-style="dots"] .sect-deco .d-plus { display: none; }

html[data-deco-style="geo"]  .sect-deco .d-orb,
html[data-deco-style="geo"]  .sect-deco .d-dots { display: none; }

/* ── per-section placement (variant classes added by JS) ── */
/* v1 — About */
.sect-deco.v1 .d-orb-a { top: -160px; right: -120px; }
.sect-deco.v1 .d-dots  { bottom: 40px; left: -60px; }
.sect-deco.v1 .d-ring  { bottom: 80px; left: 46%; }
.sect-deco.v1 .d-square{ display: none; }
.sect-deco.v1 .d-plus  { top: 40px; left: 38%; }

/* v2 — Features */
.sect-deco.v2 .d-orb-a { top: -120px; left: -140px; }
.sect-deco.v2 .d-orb-b { bottom: -120px; right: -100px; }
.sect-deco.v2 .d-dots  { top: 30px; right: -40px; }
.sect-deco.v2 .d-ring  { display: none; }
.sect-deco.v2 .d-square{ bottom: 60px; left: 8%; }
.sect-deco.v2 .d-plus  { display: none; }

/* v3 — Courses */
.sect-deco.v3 .d-orb-a { bottom: -160px; left: -120px; }
.sect-deco.v3 .d-orb-b { top: -120px; right: -80px; }
.sect-deco.v3 .d-dots  { display: none; }
.sect-deco.v3 .d-ring  { top: 60px; left: 4%; }
.sect-deco.v3 .d-square{ display: none; }
.sect-deco.v3 .d-plus  { bottom: 30%; right: 2%; }

/* v4 — Testimonials */
.sect-deco.v4 .d-orb-a { top: -140px; right: -100px; }
.sect-deco.v4 .d-orb-b { bottom: -140px; left: -120px; }
.sect-deco.v4 .d-dots  { bottom: 20px; right: 4%; }
.sect-deco.v4 .d-ring  { top: 152px; left: -2%; }
.sect-deco.v4 .d-square{ display: none; }
.sect-deco.v4 .d-plus  { display: none; }

/* v5 — Clients */
.sect-deco.v5 .d-orb-a { top: -120px; left: 50%; transform: translateX(-50%); }
.sect-deco.v5 .d-orb-b { display: none; }
.sect-deco.v5 .d-dots  { top: 50%; left: -80px; }
.sect-deco.v5 .d-ring  { display: none; }
.sect-deco.v5 .d-square{ top: 30px; right: 6%; }
.sect-deco.v5 .d-plus  { bottom: 24px; left: 8%; }

@keyframes deco-float-a {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(40px, -36px, 0) scale(1.08); }
}
@keyframes deco-float-b {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(-44px, 34px, 0) scale(1.1); }
}
@keyframes deco-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(6deg); }
}
@keyframes deco-spin { to { transform: rotate(378deg); } }

@media (prefers-reduced-motion: reduce) {
  .sect-deco > * { animation: none !important; }
}

/* ───────────────────────── section color rhythm ───────────────────────── */
/* Alternating rhythm. A soft tint "blooms" in the MIDDLE of every other
   section and fades back to pure white at BOTH edges, so each section meets
   its neighbour white-on-white — no hard seam, no clipped band.
   Tinted: About · Courses · Clients   ·   White: Features · Testimonials   */

/* "tinted" — warm vertical band + soft accent blooms, all fading to
   transparent well inside the section, so edges meet neighbours cleanly. */
html[data-deco-bg="tinted"] .about,
html[data-deco-bg="tinted"] .courses,
html[data-deco-bg="tinted"] .clients {
  background:
    radial-gradient(46% 40% at 90% 36%, color-mix(in oklab, var(--deco-a) 12%, transparent) 0%, transparent 64%),
    radial-gradient(44% 38% at 8% 64%, color-mix(in oklab, var(--deco-b) 14%, transparent) 0%, transparent 64%),
    linear-gradient(180deg,
      #fff 0%,
      var(--cream-100) 34%,
      var(--cream-100) 66%,
      #fff 100%);
}
html[data-deco-bg="tinted"] .about   { padding: 104px 0 140px; }
html[data-deco-bg="tinted"] .courses { padding: 104px 0 140px; }
html[data-deco-bg="tinted"] .clients { padding: 104px 0 120px; }

/* "bold" — deeper band + stronger blooms; courses leans rose for more play */
html[data-deco-bg="bold"] .about,
html[data-deco-bg="bold"] .clients {
  background:
    radial-gradient(48% 42% at 90% 34%, color-mix(in oklab, var(--deco-a) 18%, transparent) 0%, transparent 62%),
    radial-gradient(46% 40% at 8% 66%, color-mix(in oklab, var(--deco-b) 20%, transparent) 0%, transparent 62%),
    linear-gradient(180deg,
      #fff 0%,
      var(--cream-200) 36%,
      var(--cream-200) 64%,
      #fff 100%);
}
html[data-deco-bg="bold"] .courses {
  background:
    radial-gradient(48% 42% at 88% 32%, color-mix(in oklab, var(--deco-a) 16%, transparent) 0%, transparent 62%),
    radial-gradient(46% 40% at 10% 68%, color-mix(in oklab, var(--deco-b) 18%, transparent) 0%, transparent 62%),
    linear-gradient(180deg,
      #fff 0%,
      var(--r-100) 38%,
      var(--r-100) 62%,
      #fff 100%);
}
html[data-deco-bg="bold"] .about   { padding: 104px 0 140px; }
html[data-deco-bg="bold"] .courses { padding: 104px 0 140px; }
html[data-deco-bg="bold"] .clients { padding: 104px 0 120px; }

/* ───────────────────────── card treatments ───────────────────────── */
/* tinted — cards pick up a faint accent wash + accent hairline             */
html[data-deco-cards="tinted"] .feature {
  background: color-mix(in oklab, var(--deco-a) 4%, #fff);
  border-color: color-mix(in oklab, var(--deco-a) 14%, var(--d-100));
}
html[data-deco-cards="tinted"] .test:not(.featured) {
  background: color-mix(in oklab, var(--deco-b) 5%, #fff);
  border-color: color-mix(in oklab, var(--deco-b) 16%, var(--d-100));
}

/* outline — transparent cards, accent border only (lets the band show through) */
html[data-deco-cards="outline"] .feature {
  background: transparent;
  border: 1.5px solid color-mix(in oklab, var(--deco-a) 24%, transparent);
}
html[data-deco-cards="outline"] .test:not(.featured) {
  background: transparent;
  border: 1.5px solid color-mix(in oklab, var(--deco-b) 26%, transparent);
}
html[data-deco-cards="outline"] .feature:hover,
html[data-deco-cards="outline"] .test:hover {
  background: color-mix(in oklab, #fff 70%, transparent);
}

/* keep the featured testimonial reading as the hero of the trio */
html[data-deco-cards="tinted"] .test.featured,
html[data-deco-cards="outline"] .test.featured {
  background: linear-gradient(160deg, var(--r-100) 0%, var(--r-50) 100%);
  border-color: var(--r-100);
}

/* ───────────────────────── client logos ─────────────────────────
   Generic monochrome logo lockups (abstract mark + wordmark) as
   placeholders. External brand logos can't load in the sandbox preview —
   swap each cell for a real partner logo <img> when you have the files. */
.client-grid .client {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  color: var(--d-400);
  transition: color .2s ease, transform .2s ease;
}
.client:hover { color: var(--d-700); transform: translateY(-1px); }

.logo-word {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.logo-mark { flex: 0 0 auto; display: inline-block; }
.logo-mark.m-dot    { width: 18px; height: 18px; border-radius: 50%; background: currentColor; }
.logo-mark.m-ring   { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; }
.logo-mark.m-square { width: 18px; height: 18px; border-radius: 5px; background: currentColor; }
.logo-mark.m-diamond{ width: 15px; height: 15px; border-radius: 3px; background: currentColor; transform: rotate(45deg); }
.logo-mark.m-tri    { width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 17px solid currentColor; }
