/* SW UI Blocks 1.1 - Nitro structure + SmoothWizard WPF / clay tokens */
:root {
  --swui-bg: #0b0b0b;
  --swui-surface: #121212;
  --swui-card: #181818;
  --swui-inset: #1b1b1b;
  --swui-border: #2a2a2a;
  --swui-border-hover: #3a3a3a;
  --swui-text: #f2f2f2;
  --swui-muted: #a1a1a1;
  --swui-faint: #8a8a8a;
  --swui-green: #6cbe45;
  --swui-green-hot: #1eb34a;
  --swui-green-tint: #1a2e1a;
  --swui-green-fill: #263124;
  --swui-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --swui-radius: 20px;
  --swui-radius-sm: 14px;
  --swui-font: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --swui-display: "Oxanium", "Montserrat", system-ui, sans-serif;
  --swui-max: 1120px;
}

.swui-page,
.swui {
  box-sizing: border-box;
  color: var(--swui-text);
  font-family: var(--swui-font);
  background: var(--swui-bg);
}

.swui *,
.swui *::before,
.swui *::after { box-sizing: border-box; }

.swui-wrap {
  width: min(100% - 2.5rem, var(--swui-max));
  margin-inline: auto;
}

.swui-eyebrow,
.swui-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--swui-green);
}

.swui-section-title {
  margin: 0 0 1.35rem;
  font-family: var(--swui-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
}

.swui-display {
  margin: 0 0 1rem;
  font-family: var(--swui-display);
  font-size: clamp(2.35rem, 5.4vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
}

.swui-display--sm { font-size: clamp(2rem, 4vw, 3.1rem); text-align: center; }

.swui-h2 {
  margin: 0 0 0.75rem;
  font-family: var(--swui-display);
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  font-weight: 650;
  color: #fff;
}

.swui-h3 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.swui-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--swui-muted);
}

.swui-micro {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--swui-faint);
}

.swui-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.swui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--swui-border);
  background: var(--swui-card);
  color: var(--swui-text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.swui-btn:hover { transform: translateY(-1px); border-color: var(--swui-border-hover); color: #fff; }
.swui-btn--sm { min-height: 2.4rem; padding-inline: 1rem; font-size: 0.85rem; }
.swui-btn--lg { min-height: 3.2rem; padding-inline: 1.55rem; }

.swui-btn--primary {
  border-color: transparent;
  background: #fff;
  color: #0a0a0a;
}

.swui-btn--primary:hover { background: #f3f3f3; color: #0a0a0a; }

.swui-btn--glow {
  box-shadow:
    0 0 0 1px rgba(108, 190, 69, 0.35),
    0 0 28px rgba(30, 179, 74, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.35);
}

.swui-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: #3a3a3a;
}

/* Cards */
.swui-card {
  border-radius: var(--swui-radius);
  border: 1px solid var(--swui-border);
  background: var(--swui-card);
  box-shadow: var(--swui-shadow);
  overflow: hidden;
}

.swui-card--split,
.swui-card--chapter {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  align-items: stretch;
}

.swui-feature.is-right .swui-card--chapter .swui-card__copy { order: 2; }

.swui-card__copy {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
}

.swui-card__visual {
  padding: 1.1rem;
  background:
    radial-gradient(500px 240px at 70% 30%, rgba(108, 190, 69, 0.12), transparent 60%),
    var(--swui-inset);
  display: flex;
  align-items: center;
  justify-content: center;
}

.swui-card__visual--sm { min-height: 180px; margin-bottom: 0.85rem; }

.swui-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.swui-bullets li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.65rem;
  align-items: start;
  color: var(--swui-muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.swui-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--swui-green-fill);
  border: 1px solid rgba(108, 190, 69, 0.4);
  position: relative;
}
.swui-ico::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 2px;
  background: var(--swui-green);
  opacity: 0.9;
}

/* Hero */
.swui-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.2rem, 7vw, 5.8rem) 0 clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(900px 420px at 75% 15%, rgba(108, 190, 69, 0.18), transparent 55%),
    radial-gradient(700px 360px at 15% 90%, rgba(30, 179, 74, 0.08), transparent 50%),
    var(--swui-bg);
}

.swui-hero__glow {
  position: absolute;
  inset: auto 10% -20% 35%;
  height: 50%;
  background: radial-gradient(circle, rgba(30, 179, 74, 0.22), transparent 70%);
  pointer-events: none;
}

.swui-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.swui-hero__visual {
  position: relative;
  display: grid;
  gap: 1rem;
}

.swui-mascot {
  width: min(100%, 520px);
  height: auto;
  margin-inline: auto;
  display: block;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
}

.swui-mascot--float {
  animation: swui-float 4.8s ease-in-out infinite;
}

@keyframes swui-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.swui-hero__stage { max-width: 480px; margin-inline: auto; width: 100%; }

/* WPF chrome - MainWindow + DashboardGameSS hover */
.swui-wpf {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #121212;
  box-shadow: var(--swui-shadow);
  overflow: hidden;
  font-family: "Segoe UI", var(--swui-font);
}

.swui-wpf__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.42rem 0.55rem 0.42rem 0.7rem;
  background: #1b1b1b;
  border-bottom: 1px solid #2a2a2a;
}

.swui-wpf__brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.swui-wpf__mark {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #9be56a, var(--swui-green-hot) 55%, #0d2a14 100%);
  box-shadow: 0 0 0 1px #2a2a2a;
  flex: 0 0 auto;
}

.swui-wpf__caption {
  font-size: 0.7rem;
  color: #a1a1a1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.swui-wpf__win {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.swui-wpf__win span {
  width: 1.55rem;
  height: 1.05rem;
  display: grid;
  place-items: center;
  color: #a1a1a1;
  position: relative;
}

.swui-wpf__win span::before {
  content: "";
  width: 0.42rem;
  height: 1px;
  background: currentColor;
}

.swui-wpf__win span:nth-child(2)::before {
  width: 0.38rem;
  height: 0.38rem;
  border: 1px solid currentColor;
  background: transparent;
}

.swui-wpf__win span.is-close::before,
.swui-wpf__win span.is-close::after {
  content: "";
  position: absolute;
  width: 0.5rem;
  height: 1px;
  background: currentColor;
  transform: rotate(45deg);
}

.swui-wpf__win span.is-close::after { transform: rotate(-45deg); }

.swui-wpf__body {
  display: grid;
  grid-template-columns: 48px 1fr;
  min-height: 220px;
  background: #131313;
}

.swui-wpf__rail {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.4rem;
  background: #1b1b1b;
  border-right: 1px solid #2a2a2a;
}

.swui-wpf__rail button {
  height: 1.7rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
  cursor: default;
  display: grid;
  place-items: center;
}

.swui-wpf__rail button i {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  background: #3a3a3a;
  display: block;
}

.swui-wpf__rail button.is-on {
  background: #263124;
  border-color: rgba(30, 179, 74, 0.55);
}

.swui-wpf__rail button.is-on i {
  background: linear-gradient(180deg, #6cbe45, #1eb34a);
}

.swui-wpf__main { padding: 0.65rem 0.7rem 0.75rem; background: #121212; }

.swui-wpf__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  gap: 0.5rem;
}

.swui-wpf__chip {
  font-size: 0.65rem;
  color: #a1a1a1;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 0.18rem 0.5rem;
  background: #181818;
}

.swui-wpf__btn {
  font-size: 0.68rem;
  font-weight: 700;
  color: #061208;
  background: linear-gradient(180deg, #24d157, #1eb34a);
  border-radius: 6px;
  padding: 0.26rem 0.65rem;
  box-shadow: 0 0 0 1px rgba(30, 179, 74, 0.35);
}

.swui-wpf__covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.swui-wpf__cover {
  margin: 0;
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  background: #0e0e0e;
  cursor: pointer;
}

.swui-wpf__cover-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(155deg, hsla(var(--h), 38%, 34%, 0.95), #101010 78%),
    radial-gradient(circle at 30% 20%, hsla(var(--h), 50%, 45%, 0.55), transparent 55%);
  transform: scale(1);
  filter: blur(0);
  transform-origin: 50% 50%;
  transition: transform 0.2s ease, filter 0.2s ease;
  will-change: transform, filter;
}

.swui-wpf__cover figcaption {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0.35rem;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px #000;
  background: rgba(0, 0, 0, 0.27);
  pointer-events: none;
}

/* Exact WPF DashboardGameSS: Scale 1.1 + Blur ~5 over 200ms */
.swui-wpf__cover:hover .swui-wpf__cover-art,
.swui-wpf__cover:focus-visible .swui-wpf__cover-art {
  transform: scale(1.1);
  filter: blur(2.5px);
}

.swui-wpf__opt {
  position: relative;
  min-height: 148px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #181818;
  padding: 0.85rem;
  overflow: hidden;
}

.swui-wpf__opt::before {
  content: "";
  position: absolute;
  inset: -40% auto auto 40%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 179, 74, 0.28), transparent 68%);
  animation: swui-opt-pulse 2.8s ease-in-out infinite;
}

.swui-wpf__opt-lines {
  display: grid;
  gap: 0.45rem;
  position: relative;
  z-index: 1;
}

.swui-wpf__opt-lines span {
  height: 0.55rem;
  border-radius: 4px;
  background: #242424;
  border: 1px solid #2f2f2f;
}

.swui-wpf__opt-lines span:nth-child(1) { width: 92%; }
.swui-wpf__opt-lines span:nth-child(2) { width: 78%; }
.swui-wpf__opt-lines span:nth-child(3) { width: 86%; }
.swui-wpf__opt-lines span:nth-child(4) { width: 64%; }

.swui-wpf__opt-chip {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 1;
  font-size: 0.65rem;
  font-weight: 700;
  color: #061208;
  background: linear-gradient(180deg, #24d157, #1eb34a);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
}

@keyframes swui-opt-pulse {
  0%, 100% { opacity: 0.55; transform: translate(-10%, 10%) scale(1); }
  50% { opacity: 1; transform: translate(-6%, 14%) scale(1.08); }
}

.swui-wpf__meter {
  margin-top: 0.65rem;
  height: 0.35rem;
  border-radius: 999px;
  background: #222;
  overflow: hidden;
}

.swui-wpf__meter em {
  display: block;
  height: 100%;
  width: 62%;
  background: linear-gradient(90deg, #1eb34a, #6cbe45);
  animation: swui-meter 2.4s ease-in-out infinite alternate;
}

@keyframes swui-meter {
  from { width: 48%; }
  to { width: 78%; }
}

/* Gains */
.swui-gains,
.swui-new,
.swui-feature,
.swui-bento,
.swui-covers,
.swui-plans,
.swui-matrix,
.swui-close {
  padding: clamp(2.4rem, 5vw, 4.2rem) 0;
}

.swui-gains__row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 250px);
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scroll-snap-type: x mandatory;
}

.swui-gain {
  scroll-snap-align: start;
  padding: 1.15rem 1.15rem 1.3rem;
  border-radius: var(--swui-radius-sm);
  border: 1px solid var(--swui-border);
  background: var(--swui-card);
  min-height: 168px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.swui-gain:hover {
  transform: translateY(-4px);
  border-color: #3f3f3f;
}

.swui-gain__idx {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-family: Consolas, ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--swui-green);
}

.swui-gain__t {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 700;
}

.swui-gain__d {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--swui-muted);
}

/* Bento */
.swui-bento__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.swui-card--bento { padding: 1.15rem 1.2rem 1.35rem; }

/* Covers - same DashboardGameSS motion as in-app tiles */
.swui-covers__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.8rem;
}

.swui-cover {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--swui-border);
  background: #0e0e0e;
  cursor: pointer;
}

.swui-cover__art {
  aspect-ratio: 3/4;
  background:
    linear-gradient(160deg, hsla(var(--hue), 35%, 28%, 0.9), #141414 70%);
  transform: scale(1);
  filter: blur(0);
  transform-origin: 50% 50%;
  transition: transform 0.2s ease, filter 0.2s ease;
  will-change: transform, filter;
}

.swui-cover:hover .swui-cover__art,
.swui-cover:focus-within .swui-cover__art {
  transform: scale(1.1);
  filter: blur(2.5px);
}

.swui-cover figcaption {
  margin: 0;
  padding: 0.45rem 0.35rem 0.55rem;
  font-size: 0.78rem;
  color: var(--swui-muted);
  text-align: center;
  background: #181818;
  border-top: 1px solid #2a2a2a;
  position: relative;
  z-index: 1;
}

/* Plans */
.swui-plans__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.swui-plan {
  position: relative;
  padding: 1.5rem 1.4rem 1.5rem;
  border-radius: var(--swui-radius);
  border: 1px solid var(--swui-border);
  background: var(--swui-card);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.swui-plan--pro {
  border-color: rgba(108, 190, 69, 0.55);
  background:
    radial-gradient(420px 180px at 80% 0%, rgba(108, 190, 69, 0.2), transparent 60%),
    var(--swui-card);
  box-shadow: 0 0 0 1px rgba(108, 190, 69, 0.15), var(--swui-shadow);
}

.swui-plan__badge {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #061208;
  background: var(--swui-green);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
}

.swui-plan__name {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.swui-plan__price {
  margin: 0;
  font-family: var(--swui-display);
  font-size: 1.8rem;
  font-weight: 700;
}

.swui-plan__sub { margin: 0; color: var(--swui-faint); font-size: 0.85rem; }

.swui-plan__list {
  list-style: none;
  margin: 0.4rem 0 0.8rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  color: var(--swui-muted);
  font-size: 0.9rem;
  flex: 1;
}

.swui-plan__list li::before {
  content: "✓ ";
  color: var(--swui-green);
  font-weight: 700;
}

/* Matrix */
.swui-matrix__table {
  border-radius: var(--swui-radius);
  border: 1px solid var(--swui-border);
  overflow: hidden;
  background: var(--swui-card);
}

.swui-matrix__head,
.swui-matrix__row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 0;
  align-items: center;
}

.swui-matrix__head > div,
.swui-matrix__row > div {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #242424;
  font-size: 0.92rem;
}

.swui-matrix__head > div {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--swui-faint);
  font-weight: 700;
}

.swui-matrix__row:last-child > div { border-bottom: 0; }

.swui-matrix .is-pro {
  background: rgba(108, 190, 69, 0.06);
  box-shadow: inset 2px 0 0 var(--swui-green);
}

.swui-yes { color: var(--swui-green); font-weight: 800; }
.swui-no { color: #555; font-weight: 700; }

/* CTA bands */
.swui-cta-band {
  padding: 2.5rem 0;
  background:
    radial-gradient(800px 280px at 10% 0%, rgba(108, 190, 69, 0.12), transparent 55%),
    var(--swui-bg, #0b0b0f);
}

.swui-cta-band.is-strong {
  background:
    radial-gradient(900px 320px at 80% 100%, rgba(108, 190, 69, 0.22), transparent 55%),
    var(--swui-bg, #0b0b0f);
}

.swui-cta-band.is-download {
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}

.swui-cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.swui-cta-band__copy {
  flex: 1 1 16rem;
  max-width: 36rem;
}

.swui-cta-band.is-dual .swui-cta-band__inner {
  align-items: flex-end;
}

@media (max-width: 720px) {
  .swui-cta-band__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Close */
.swui-close {
  background:
    radial-gradient(700px 320px at 50% 100%, rgba(108, 190, 69, 0.18), transparent 60%),
    var(--swui-bg);
}

.swui-close__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.swui-mascot--close { width: min(100%, 420px); }

/* Reveal - progressive: visible by default; hide only when JS enhances */
[data-swui-reveal] {
  opacity: 1;
  transform: none;
}
.swui-js [data-swui-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.swui-js [data-swui-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-swui-reveal],
  .swui-mascot--float,
  .swui-wpf__meter em,
  .swui-cover__art,
  .swui-wpf__cover-art,
  .swui-wpf__opt::before,
  .swui-gain {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
  }
}

@media (max-width: 960px) {
  .swui-hero__grid,
  .swui-card--split,
  .swui-card--chapter,
  .swui-bento__grid,
  .swui-plans__grid {
    grid-template-columns: 1fr;
  }
  .swui-feature.is-right .swui-card--chapter .swui-card__copy { order: 0; }
  .swui-covers__grid { grid-template-columns: repeat(3, 1fr); }
  .swui-matrix__head,
  .swui-matrix__row { grid-template-columns: 1.2fr 0.6fr 0.6fr; }
}

@media (max-width: 560px) {
  .swui-covers__grid { grid-template-columns: repeat(2, 1fr); }
}
