/* ─────────────────────────────────────────────────────────────────
   POWERUS · v2 SOFTWARE, Oz and Cypher product pages
   Loads after site.css / v2.css / v2-product.css. Everything is scoped
   under .sw so no other page is affected.
   ───────────────────────────────────────────────────────────────── */

.sw {
  --sw-pad: 40px;
  --sw-panel: rgba(22, 22, 22, 0.025);
  --sw-grid: rgba(22, 22, 22, 0.02);
}
:root[data-theme="dark"] .sw {
  --sw-panel: rgba(253, 250, 243, 0.025);
  --sw-grid: rgba(253, 250, 243, 0.03);
}
.sw-in { max-width: var(--max); margin: 0 auto; padding-left: var(--sw-pad); padding-right: var(--sw-pad); }

/* Dark-by-design bands (hero, closing CTA). They stay dark in both themes,
   like .prod-cta / .closer-dark, so the tokens are pinned locally and every
   rule inside can keep painting off --char (surface) and --bone (ink). */
.sw-dark {
  --bone: #FDFAF3; --bone-2: #F7F2E6; --bone-3: #EFE9D9;
  --char: #161616; --graphite: #3A3A38; --stone: #9A938A;
  --sw-grid: rgba(253, 250, 243, 0.04);
  background-color: var(--char); color: var(--bone);
}
:root[data-theme="dark"] .sw-dark { --char: #121211; }
.sw-dark .redact-h .redact,
.sw-dark .redact-ml .rl .rd { background: var(--bone); }

/* The 48px substrate grid behind every section */
.sw-sub {
  background-image:
    linear-gradient(to right, var(--sw-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--sw-grid) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Panel + well */
.sw-pt { position: relative; background-color: var(--sw-panel); min-width: 0; }
.sw-well { position: relative; overflow: hidden; color: var(--char); }

/* Dither plate + its projected labels */
.sw-plate-host { position: absolute; inset: 0; }
.sw-plate-host canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  transform-origin: 50% 50%; image-rendering: pixelated; }
.sw-lab { position: absolute; z-index: 1; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  white-space: nowrap; line-height: 1.2; padding: 3px 7px; background: var(--bone); color: var(--char); }
.sw-lab.l { transform: translateY(-50%); }
.sw-dark .sw-lab { background: var(--char); color: var(--bone); }

/* ─── Buttons: the site's redact-bar hover ─────────────────────── */
.sw-btn { display: inline-flex; align-items: center; gap: 12px; flex: none; white-space: nowrap;
  padding: 14px 22px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; line-height: 1; text-decoration: none; cursor: pointer;
  border: 1px solid var(--char); background: transparent; color: var(--char);
  transition: border-color 160ms ease; }
.sw-btn .lbl { position: relative; display: inline-block; }
.sw-btn .lbl::after { content: ""; position: absolute; top: 50%; height: 0.9em; margin-top: -0.45em; left: 0; right: 0;
  background: currentColor; pointer-events: none; transform: scaleX(0); transform-origin: left center;
  transition: transform 130ms steps(5, end); }
.sw-btn:hover .lbl::after { transform: scaleX(1); transition: transform 180ms steps(6, end); }
.sw-btn:hover { color: var(--char); border-color: color-mix(in srgb, currentColor 40%, transparent); }
.sw-btn .ar { font-size: 13px; transition: transform 220ms cubic-bezier(.16,1,.3,1); }
.sw-btn:hover .ar { transform: translateX(5px); }
.sw-btn:active { opacity: 0.82; }
.sw-dark .sw-btn { border-color: var(--bone); color: var(--bone); }
.sw-dark .sw-btn:hover { color: var(--bone); border-color: color-mix(in srgb, var(--bone) 40%, transparent); }
.sw-dark .sw-btn.solid { background: var(--bone); color: var(--char); }
.sw-dark .sw-btn.solid:hover { color: var(--char); border-color: var(--bone); }

/* ─── Hero ─────────────────────────────────────────────────────── */
.sw-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.sw-hero .pdp-title { padding-top: clamp(16px, 2.4vw, 28px); padding-bottom: clamp(20px, 4vw, 64px); }
.sw-hero .pdp-name { color: var(--bone); line-height: 0.8; margin: 0; padding-bottom: 0.12em; }
.sw-hero-media { width: 100%; max-width: 1980px; margin: 0 auto; padding: 0 var(--sw-pad); }
.sw-hero-media .frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--char); }
.sw-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* The fitted title's descenders (Cypher's y and p) hang below its 0.8 line box,
   so the plate needs its own clearance; it scales with the title, i.e. with vw. */
.sw-hero-viz { position: relative; height: clamp(240px, 34vw, 430px); margin: clamp(28px, 5.5vw, 104px) auto 0; width: 100%;
  max-width: 1980px; padding: 0 var(--sw-pad); }
.sw-hero-viz .clip { position: relative; height: 100%; overflow: hidden; }
.sw-hero-viz .sw-well { position: absolute; left: 0; right: 0; top: -34.9%; height: 139.5%; color: var(--bone); }
.sw-hero-viz .cap { position: absolute; right: 16px; bottom: 16px; z-index: 2; max-width: 440px; text-align: right;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; line-height: 1.7; text-transform: uppercase;
  color: var(--stone); background: var(--char); padding: 6px 10px; }

.sw-hero-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(48px, 7vw, 96px);
  align-items: start; padding-top: clamp(48px, 6vw, 72px); padding-bottom: clamp(64px, 8vw, 104px); }
.sw-hero-body .lead { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; min-width: 0; }
.sw-hero-body h2 { margin: 0; max-width: 760px; font-family: var(--sans); font-size: clamp(40px, 5vw, 64px); font-weight: 400;
  letter-spacing: -0.05em; line-height: 0.98; color: var(--bone); text-wrap: balance; }
.sw-hero-body .intro { margin: 0; max-width: 600px; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.5;
  color: var(--bone); opacity: 0.8; text-wrap: pretty; }

/* Q&A rotator */
.sw-qa { display: flex; flex-direction: column; gap: 26px; min-width: 0; padding-top: 10px; }
.sw-qa-bars { display: flex; gap: 6px; }
.sw-qa-bar { flex: 1 1 0; padding: 8px 0; border: 0; background: transparent; cursor: pointer; }
.sw-qa-bar span { display: block; position: relative; height: 2px; overflow: hidden; background: rgba(253, 250, 243, 0.18); }
.sw-qa-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--bone); }
.sw-qa-bar:hover span { background: rgba(253, 250, 243, 0.32); }
.sw-qa-bar:focus-visible { outline: 1px solid var(--bone); outline-offset: 2px; }
.sw-qa-stage { display: grid; }
.sw-qa-item { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 14px; pointer-events: none;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.6s ease 0s, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0s; }
.sw-qa-item.is-prev { transform: translateY(-16px); }
.sw-qa-item.is-cur { opacity: 1; transform: none; transition-delay: 0.3s, 0.3s; }
.sw-qa-item .q { font-size: 16px; line-height: 1.35; color: var(--stone); }
.sw-qa-item .a { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.03em; line-height: 1.15; color: var(--bone); text-wrap: pretty; }
@media (prefers-reduced-motion: reduce) { .sw-qa-item { transition: none; } }

/* ─── Strip: three capability cards ────────────────────────────── */
.sw-strip { background-color: var(--bone); }
.sw-strip .sw-in { padding-top: var(--sw-pad); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sw-card { display: flex; flex-direction: column; }
.sw-card .sw-well { aspect-ratio: 16 / 10; }
.sw-card .tx { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 12px; }
.sw-card .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sw-card .k { font-size: clamp(28px, 2.6vw, 34px); letter-spacing: -0.04em; line-height: 1; color: var(--char); }
.sw-card .ar { font-size: 26px; line-height: 1; color: var(--stone); }
.sw-card p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--graphite); text-wrap: pretty; }

/* ─── Feature ──────────────────────────────────────────────────── */
.sw-feature { background-color: var(--bone); padding-top: clamp(72px, 9vw, 104px); }
.sw-feature-head { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: end; }
.sw-feature-head h2 { margin: 0; font-size: clamp(40px, 5vw, 64px); font-weight: 400; letter-spacing: -0.05em; line-height: 0.98;
  color: var(--char); text-wrap: balance; }
.sw-feature-head .paras { display: flex; flex-direction: column; gap: 14px; padding-bottom: 6px; }
.sw-feature-head p { margin: 0; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.5; color: var(--graphite); text-wrap: pretty; }
.sw-feature .sw-pt { margin-top: 56px; margin-bottom: 16px; }
.sw-feature.has-lib .sw-pt { margin-bottom: 56px; }
.sw-feature .sw-pt > .sw-well { aspect-ratio: 16 / 6; }
.sw-items { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.sw-item { padding: 44px 32px; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.sw-item .ic { width: 40px; height: 40px; color: var(--char); margin-bottom: 8px; }
.sw-item .ic svg { display: block; width: 40px; height: 40px; }
.sw-item .t { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; color: var(--char); }
.sw-item p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--graphite); max-width: 30ch; text-wrap: pretty; }

/* Icon draw-in, same timing family as the PDP capability icons */
@media (prefers-reduced-motion: no-preference) {
  .sw-item .ic svg :not([stroke-dasharray]) { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1400ms cubic-bezier(.16,1,.3,1); }
  .sw-item .ic svg [stroke-dasharray] { opacity: 0; transition: opacity 600ms ease 500ms; }
  .sw-items.draw .sw-item .ic svg :not([stroke-dasharray]) { stroke-dashoffset: 0; }
  .sw-items.draw .sw-item .ic svg [stroke-dasharray] { opacity: 1; }
}

/* ─── Task library (Cypher) ────────────────────────────────────── */
.sw-lib { background-color: var(--bone); border-bottom: 1px solid var(--hairline); }
.sw-lib .sw-in { padding-top: clamp(64px, 8vw, 96px); padding-bottom: clamp(64px, 8vw, 96px);
  display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: clamp(40px, 5vw, 72px); align-items: start; }
.sw-lib .side { display: flex; flex-direction: column; gap: 22px; }
.sw-lib .count { font-size: clamp(150px, 20vw, 260px); font-weight: 400; letter-spacing: -0.075em; line-height: 0.76;
  color: var(--char); margin-left: -0.03em; }
.sw-lib h2 { margin: 8px 0 0; font-size: clamp(32px, 3.2vw, 40px); font-weight: 400; letter-spacing: -0.04em; line-height: 1;
  color: var(--char); text-wrap: balance; }
.sw-lib .side p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--graphite); }
.sw-lib .rows { border-top: 1px solid var(--char); }
.sw-lib .row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; padding: 24px 0;
  border-bottom: 1px solid var(--hairline); align-items: start; }
.sw-lib .cap { display: flex; flex-direction: column; gap: 10px; }
.sw-lib .cap b { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; color: var(--char); }
.sw-lib .cap .v { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1; color: var(--stone); }
.sw-lib .det { display: flex; flex-direction: column; gap: 12px; }
.sw-lib .tasks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sw-lib .tasks li { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; padding: 6px 10px; color: var(--char); background: var(--bone-3); }
.sw-lib .det p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--graphite); text-wrap: pretty; }

/* ─── Bento tiles ──────────────────────────────────────────────── */
.sw-tiles { background-color: var(--bone); border-bottom: 1px solid var(--hairline); }
.sw-tiles .sw-in { padding-top: 0; padding-bottom: var(--sw-pad); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.sw-tiles.pad-top .sw-in { padding-top: var(--sw-pad); }
.sw-tile { grid-column: span var(--span, 6); display: flex; flex-direction: var(--dir, column-reverse); }
.sw-tile .tx { flex: var(--tflex, 1 1 0); min-width: 0; display: flex; flex-direction: column; gap: 14px; justify-content: flex-end;
  padding: 26px 28px 30px; }
.sw-tile .sw-well { flex: var(--vflex, none); min-width: 0; aspect-ratio: var(--ratio, 16 / 9); }
.sw-tile h3 { margin: 0; font-family: var(--sans); text-transform: none; font-size: clamp(26px, 2.5vw, 32px); font-weight: 400;
  letter-spacing: -0.04em; line-height: 1; color: var(--char); text-wrap: balance; }
.sw-tile .tx > p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--graphite); max-width: 52ch; text-wrap: pretty; }
.sw-tile .its { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; border-top: 1px solid var(--hairline);
  padding-top: 16px; margin-top: 4px; }
.sw-tile .its b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--char); margin-bottom: 6px; }
.sw-tile .its p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--graphite); }
.sw-tile .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; border-top: 1px solid var(--hairline); margin-top: 4px; }
.sw-tile .facts > div { padding: 16px 0; border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 10px; }
.sw-tile .facts .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1; color: var(--stone); }
.sw-tile .facts .v { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1; color: var(--char); }
.sw-tile .act { display: flex; margin-top: 6px; }

/* ─── Cross-link band ──────────────────────────────────────────── */
.sw-also { background: var(--bone-2); border-bottom: 1px solid var(--hairline); }
.sw-also .sw-in { padding-top: 64px; padding-bottom: 64px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; }
.sw-also .tx { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sw-also .hd { margin: 0; font-size: clamp(26px, 2.6vw, 32px); letter-spacing: -0.04em; line-height: 1.1; color: var(--char); max-width: 40ch; text-wrap: balance; }
.sw-also .sub { margin: 0; font-size: 18px; line-height: 1.5; color: var(--graphite); max-width: 60ch; text-wrap: pretty; }

/* ─── Closing CTA ──────────────────────────────────────────────── */
.sw-cta .sw-in { padding-top: clamp(72px, 9vw, 96px); padding-bottom: clamp(64px, 8vw, 88px);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 72px); align-items: end; }
.sw-cta .l { display: flex; flex-direction: column; gap: 28px; }
.sw-cta h2 { margin: 0; font-size: clamp(44px, 5.6vw, 72px); font-weight: 400; letter-spacing: -0.05em; line-height: 0.95; color: var(--bone); text-wrap: pretty; }
.sw-cta .r { display: flex; flex-direction: column; gap: 18px; border-top: 1px solid rgba(253, 250, 243, 0.2); padding-top: 24px; }
.sw-cta .r .t { font-size: 26px; letter-spacing: -0.03em; line-height: 1.1; color: var(--bone); }
.sw-cta .r p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--bone); opacity: 0.86; }
.sw-cta .acts { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }


/* ─── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1040px) {
  .sw-hero-body { grid-template-columns: 1fr; }
  .sw-qa { max-width: 560px; }
  .sw-lib .sw-in { grid-template-columns: 1fr; }
  .sw-tile { grid-column: span 12; }
  .sw-tile.is-row { flex-direction: column-reverse; }
  .sw-tile.is-row .sw-well { flex: none; }
  .sw-cta .sw-in { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sw-feature-head { grid-template-columns: 1fr; }
  .sw-strip .sw-in { grid-template-columns: 1fr; }
  .sw-card .ar { display: none; }
  .sw-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sw-also .sw-in { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .sw { --sw-pad: 24px; }
  .sw-hero .pdp-title { padding-left: var(--sw-pad); padding-right: var(--sw-pad); }
  .sw-hero-media .frame { aspect-ratio: 4 / 3; }
  .sw-feature .sw-pt > .sw-well { aspect-ratio: 4 / 3; }
  .sw-items { grid-template-columns: 1fr; }
  .sw-item { padding: 32px 20px; }
  .sw-lib .row { grid-template-columns: 1fr; gap: 14px; }
  .sw-tile .tx { padding: 22px 20px 26px; }
  .sw-tile .its, .sw-tile .facts { grid-template-columns: 1fr; }
  .sw-cta .acts .sw-btn { flex: 1 1 auto; justify-content: center; }
  .sw-hero-viz .cap { right: 8px; bottom: 8px; }
}
