/* ============================================================
   MotionForge — AjonTec
   Design tokens come from the database via Branding::cssVariables(),
   injected inline in <head>. Everything below consumes them, so the
   admin can retune the entire palette without a rebuild.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display), var(--font-body), sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p  { margin: 0 0 1rem; max-width: 68ch; }
a  { color: inherit; text-decoration: none; }

img, video { max-width: 100%; display: block; }

::selection { background: var(--g1); color: #fff; }

:focus-visible {
  outline: 2px solid var(--g2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- layout ---------- */

.wrap {
  width: min(1240px, 100% - 2.5rem);
  margin-inline: auto;
}

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-tight { padding: clamp(2rem, 4vw, 3rem) 0; }

.muted { color: var(--muted); }
.center { text-align: center; }

.row  { display: flex; gap: 1rem; align-items: center; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.stack > * + * { margin-top: 1rem; }

/* ---------- gradient system ---------- */

.grad-text {
  background: linear-gradient(var(--g-angle), var(--g1), var(--g2) 55%, var(--g3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grad-bg {
  background: linear-gradient(var(--g-angle), var(--g1), var(--g2) 55%, var(--g3));
}

/* A slow-drifting aurora behind the hero. One orchestrated moment, not a
   fade-in on every section. */
.aurora {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 120vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38rem 26rem at 18% 12%, color-mix(in srgb, var(--g1) 45%, transparent), transparent 70%),
    radial-gradient(34rem 24rem at 82% 4%,  color-mix(in srgb, var(--g2) 38%, transparent), transparent 70%),
    radial-gradient(30rem 22rem at 55% 42%, color-mix(in srgb, var(--g3) 32%, transparent), transparent 72%);
  filter: blur(24px);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.12); }
}

/* Grain keeps the large gradient fields from banding on cheap panels. */
.grain::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- header ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display), sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -.02em;
}

.logo img { height: 30px; width: auto; }

.logo-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(var(--g-angle), var(--g1), var(--g2) 55%, var(--g3));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent), 0 6px 22px color-mix(in srgb, var(--g1) 45%, transparent);
}

.nav-links { display: flex; gap: 1.6rem; margin-left: auto; align-items: center; }

.nav-links a {
  color: var(--muted);
  font-size: .94rem;
  transition: color .18s ease;
}

.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.35rem;
  border: 0;
  border-radius: calc(var(--radius) * .66);
  font: inherit;
  font-weight: 500;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(var(--g-angle), var(--g1), var(--g3));
  color: #fff;
  box-shadow: 0 8px 26px -8px color-mix(in srgb, var(--g1) 70%, transparent);
}

.btn-primary:hover { box-shadow: 0 12px 34px -8px color-mix(in srgb, var(--g1) 85%, transparent); }

.btn-ghost {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent);
}

.btn-ghost:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); }

.btn-sm { padding: .46rem .9rem; font-size: .85rem; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- surfaces ---------- */

.panel {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  font-size: .78rem;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.chip-live {
  background: linear-gradient(var(--g-angle), color-mix(in srgb, var(--g1) 22%, transparent), color-mix(in srgb, var(--g2) 22%, transparent));
  color: var(--ink);
}

.chip-live .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--g2);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--g2) 70%, transparent);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}

.hero .wrap { position: relative; z-index: 2; }

.hero h1 { max-width: 15ch; }

.hero-lede { font-size: clamp(1rem, 1.6vw, 1.16rem); color: var(--muted); max-width: 54ch; }

.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }

.hero-stats {
  display: flex;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  margin-top: 3rem;
  flex-wrap: wrap;
}

.hero-stats b {
  display: block;
  font-family: var(--font-display), sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
}

.hero-stats span { font-size: .85rem; color: var(--muted); }

/* ---------- filter bar ---------- */

.filters {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filters::-webkit-scrollbar { display: none; }

.filter {
  flex: 0 0 auto;
  padding: .5rem 1rem;
  border-radius: 999px;
  font-size: .88rem;
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--ink) 11%, transparent);
  background: transparent;
  cursor: pointer;
  transition: all .18s ease;
}

.filter:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 24%, transparent); }

.filter.is-on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(var(--g-angle), var(--g1), var(--g3));
}

.search-field {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.search-field input {
  flex: 1;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: .92rem;
  outline: none;
}

.search-field input::placeholder { color: var(--muted); }

/* ---------- item grid ---------- */

.grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
}

.tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  transition: border-color .2s ease, transform .2s ease;
}

.tile:hover {
  border-color: color-mix(in srgb, var(--g2) 45%, transparent);
  transform: translateY(-2px);
}

.tile-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(var(--g-angle), color-mix(in srgb, var(--g1) 20%, var(--surface)), color-mix(in srgb, var(--g2) 16%, var(--surface)));
  overflow: hidden;
}

.tile-media img,
.tile-media video {
  width: 100%; height: 100%;
  object-fit: cover;
}

.tile-body {
  padding: .95rem 1.05rem 1.1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.tile-title {
  font-family: var(--font-display), sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 .15rem;
}

.tile-meta { font-size: .8rem; color: var(--muted); }

.tile-badge {
  position: absolute;
  top: .7rem; left: .7rem;
  z-index: 2;
  padding: .25rem .6rem;
  font-size: .7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}

.tile-lock {
  position: absolute;
  top: .7rem; right: .7rem;
  z-index: 2;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(8px);
  font-size: .8rem;
}

/* ---------- detail page ---------- */

.detail {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
}

.stage {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: var(--surface);
}

.prompt-box {
  position: relative;
  border-radius: calc(var(--radius) * .8);
  background: #05040A;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  padding: 1.1rem 1.2rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .84rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 460px;
  overflow: auto;
}

.prompt-box.is-locked {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  max-height: 260px;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: calc(var(--radius) * .8);
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 96%, transparent), color-mix(in srgb, var(--bg) 55%, transparent));
}

/* ---------- pricing ---------- */

.plans {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.9rem 1.6rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.plan.is-featured {
  border-color: transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(var(--g-angle), var(--g1), var(--g2), var(--g3)) border-box;
  border: 1px solid transparent;
}

.plan-price {
  font-family: var(--font-display), sans-serif;
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  margin: .6rem 0 .2rem;
}

.plan ul { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: .6rem; }
.plan li { display: flex; gap: .6rem; font-size: .92rem; color: var(--muted); }
.plan li::before { content: "✓"; color: var(--g2); font-weight: 700; }
.plan .btn { margin-top: auto; }

/* ---------- forms ---------- */

.field { display: block; margin-bottom: 1.05rem; }

.field > span {
  display: block;
  font-size: .84rem;
  color: var(--muted);
  margin-bottom: .4rem;
}

.input, textarea.input, select.input {
  width: 100%;
  padding: .72rem .95rem;
  border-radius: calc(var(--radius) * .55);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
  transition: border-color .18s ease, background .18s ease;
}

.input:focus {
  outline: none;
  border-color: var(--g2);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

textarea.input { min-height: 120px; resize: vertical; }

.error { color: #ff7a90; font-size: .82rem; margin-top: .3rem; }

.alert {
  padding: .85rem 1.1rem;
  border-radius: calc(var(--radius) * .6);
  margin-bottom: 1.25rem;
  font-size: .92rem;
  border: 1px solid;
}

.alert-good { background: color-mix(in srgb, #22c55e 12%, transparent); border-color: color-mix(in srgb, #22c55e 35%, transparent); }
.alert-bad  { background: color-mix(in srgb, #ef4444 12%, transparent); border-color: color-mix(in srgb, #ef4444 35%, transparent); }

/* ---------- gateway picker ---------- */

.gateways { display: grid; gap: .7rem; }

.gateway {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .95rem 1.1rem;
  border-radius: calc(var(--radius) * .6);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

.gateway:hover { border-color: color-mix(in srgb, var(--g2) 40%, transparent); }

.gateway input { accent-color: var(--g1); width: 18px; height: 18px; }

.gateway:has(input:checked) {
  border-color: var(--g2);
  background: color-mix(in srgb, var(--g2) 8%, transparent);
}

/* ---------- footer ---------- */

.footer {
  margin-top: 4rem;
  padding: 3.5rem 0 calc(2rem + env(safe-area-inset-bottom));
  border-top: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr repeat(auto-fit, minmax(150px, 1fr));
}

.footer a { color: var(--muted); font-size: .9rem; display: block; padding: .22rem 0; }
.footer a:hover { color: var(--ink); }

.footer-base {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: .84rem;
  color: var(--muted);
}

/* ---------- mobile app shell ---------- */

.tabbar { display: none; }

.pwa-prompt {
  position: fixed;
  left: 1rem; right: 1rem;
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
  z-index: 70;
  display: none;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  box-shadow: 0 18px 50px -12px rgba(0,0,0,.7);
}

.pwa-prompt.is-shown { display: flex; }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .nav-links { display: none; }

  .tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: .45rem .3rem calc(.45rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  }

  .tabbar a {
    display: grid;
    justify-items: center;
    gap: .18rem;
    padding: .4rem 0;
    font-size: .66rem;
    color: var(--muted);
    border-radius: 12px;
  }

  .tabbar a svg { width: 21px; height: 21px; }

  .tabbar a[aria-current="page"] {
    color: var(--ink);
  }

  .tabbar a[aria-current="page"] svg { stroke: url(#tabGrad); }

  body { padding-bottom: 4.6rem; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
  .footer { margin-bottom: 3.5rem; }
}

@media (min-width: 861px) {
  .mobile-only { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- admin ---------- */

.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }

.admin-side {
  padding: 1.4rem 1rem;
  border-right: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.admin-side a {
  display: block;
  padding: .55rem .75rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: .9rem;
}

.admin-side a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.admin-side a[aria-current="page"] { background: linear-gradient(var(--g-angle), var(--g1), var(--g3)); color: #fff; }

.admin-main { padding: 1.8rem clamp(1rem, 3vw, 2.4rem); }

.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.kpi b {
  display: block;
  font-family: var(--font-display), sans-serif;
  font-size: 1.85rem;
  font-weight: 600;
  margin-top: .3rem;
}

table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; color: var(--muted); font-weight: 500; padding: .7rem .6rem; font-size: .82rem; }
table.data td { padding: .8rem .6rem; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
table.data tr:hover td { background: color-mix(in srgb, var(--ink) 4%, transparent); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.pill { padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; }
.pill-paid    { background: color-mix(in srgb, #22c55e 18%, transparent); color: #86efac; }
.pill-pending { background: color-mix(in srgb, #eab308 18%, transparent); color: #fde047; }
.pill-failed  { background: color-mix(in srgb, #ef4444 18%, transparent); color: #fca5a5; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); }
  .admin-side nav { display: flex; gap: .4rem; overflow-x: auto; }
  .admin-side a { white-space: nowrap; }
}

/* ============================================================
   Homepage sections added in v1.1
   ============================================================ */

/* ---------- bundle tiles ---------- */

.tile.bundle { display: block; }

.bundle-stack { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; }

.bundle-layer {
    width: 26%; height: 62%;
    border-radius: 6px;
    background: linear-gradient(150deg, var(--a1), var(--a2));
    opacity: .55;
    transform: rotate(-6deg);
    transition: transform .45s cubic-bezier(.2,.7,.3,1), opacity .3s ease;
    box-shadow: 0 12px 30px -10px rgba(0,0,0,.7);
}

.bundle-layer:nth-child(2) { transform: rotate(0deg) translateY(-6%) scale(1.08); opacity: .75; }
.bundle-layer:nth-child(3) { transform: rotate(6deg); }

.tile.bundle:hover .bundle-layer:nth-child(1) { transform: rotate(-12deg) translateX(-12%); }
.tile.bundle:hover .bundle-layer:nth-child(3) { transform: rotate(12deg) translateX(12%); }

.bundle-label {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.1rem;
    text-align: center;
    background: linear-gradient(to top, color-mix(in srgb, var(--surface) 96%, transparent), transparent);
}

/* ---------- promo band ---------- */

.promo {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: clamp(2rem, 5vw, 3.2rem);
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.promo-body { position: relative; z-index: 2; }
.promo-body h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }

.promo-art { position: relative; z-index: 2; display: flex; gap: .8rem; justify-content: center; }

.promo-art span {
    width: 26%;
    aspect-ratio: 3/4;
    border-radius: 10px;
    background: linear-gradient(150deg, var(--g1), var(--g2));
    opacity: .8;
    animation: promo-float 7s ease-in-out infinite;
}

.promo-art span:nth-child(2) { background: linear-gradient(150deg, var(--g2), var(--g3)); animation-delay: -2.3s; transform: translateY(-8%); }
.promo-art span:nth-child(3) { background: linear-gradient(150deg, var(--g3), var(--g1)); animation-delay: -4.6s; }

@keyframes promo-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9%); }
}

/* ---------- how it works ---------- */

.steps { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.step {
    padding: 1.6rem 1.5rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
}

.step-num {
    font-family: var(--font-display), sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    background: linear-gradient(var(--g-angle), var(--g1), var(--g3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- testimonials ---------- */

.quote-wall { columns: 3; column-gap: 1.15rem; }
.quote { break-inside: avoid; margin: 0 0 1.15rem; }
.quote-avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; display: block; }

@media (max-width: 1000px) { .quote-wall { columns: 2; } }
@media (max-width: 620px)  { .quote-wall { columns: 1; } }

/* ---------- FAQ ---------- */

.faq {
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
    border-radius: 14px;
    margin-bottom: .7rem;
    overflow: hidden;
}

.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 1.05rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 1rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary b {
    position: relative;
    flex: 0 0 auto;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.faq summary b::before,
.faq summary b::after {
    content: "";
    position: absolute;
    left: 25%; right: 25%; top: 50%;
    height: 1.5px;
    background: var(--ink);
    transform: translateY(-50%);
    border-radius: 2px;
}

.faq summary b::after { transform: translateY(-50%) rotate(90deg); transition: transform .24s cubic-bezier(.4,0,.2,1); }
.faq[open] summary b::after { transform: translateY(-50%) rotate(0deg); }
.faq[open] { border-color: color-mix(in srgb, var(--g2) 35%, transparent); }

.faq-body { padding: 0 1.2rem 1.15rem; }

/* ---------- closing panel ---------- */

.closing {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem;
    position: relative;
    overflow: hidden;
}

/* ---------- footer additions ---------- */

.footer-newsletter { display: flex; gap: .5rem; margin-top: 1rem; max-width: 340px; }
.footer-newsletter input {
    flex: 1;
    padding: .6rem .9rem;
    border-radius: calc(var(--radius) * .5);
    background: color-mix(in srgb, var(--ink) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
    color: var(--ink);
    font: inherit;
    font-size: .88rem;
}

.pay-note { font-size: .78rem; color: var(--muted); margin-top: 1rem; max-width: 46ch; }

@media (max-width: 760px) {
    .promo { grid-template-columns: 1fr; }
    .promo-art { order: -1; }
}

/* ---------- admin: tabbed settings ---------- */

.tabs { display: flex; gap: .4rem; overflow-x: auto; margin-bottom: 1.5rem; padding-bottom: .4rem; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

.tab {
    flex: 0 0 auto;
    padding: .5rem 1rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--ink) 11%, transparent);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: .88rem;
    cursor: pointer;
}

.tab:hover { color: var(--ink); }
.tab.is-on { background: linear-gradient(var(--g-angle), var(--g1), var(--g3)); color: #fff; border-color: transparent; }

.tab-panel { display: none; }
.tab-panel.is-on { display: block; }

.save-bar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-top: 1.5rem;
    padding: .9rem 1.1rem;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 -10px 30px -14px rgba(0,0,0,.8);
}

/* ---------- live demo frame ---------- */

.demo-shell {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
    background: var(--surface);
}

.demo-bar {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .55rem .8rem;
    background: color-mix(in srgb, var(--ink) 5%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.demo-dots { display: flex; gap: 5px; flex: 0 0 auto; }
.demo-dots i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 18%, transparent); }

.demo-url {
    flex: 1;
    font-size: .78rem;
    color: var(--muted);
    font-family: ui-monospace, Menlo, monospace;
    text-align: center;
    padding: .2rem .7rem;
    background: color-mix(in srgb, var(--ink) 5%, transparent);
    border-radius: 999px;
}

.demo-sizes { display: flex; gap: .25rem; flex: 0 0 auto; }

.demo-size {
    padding: .28rem .6rem;
    font: inherit;
    font-size: .75rem;
    border-radius: 7px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.demo-size:hover { color: var(--ink); }
.demo-size.is-on { background: linear-gradient(var(--g-angle), var(--g1), var(--g3)); color: #fff; }

.demo-frame {
    display: flex;
    justify-content: center;
    background: #05040A;
    padding: 0;
    height: 560px;
}

.demo-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    transition: width .35s cubic-bezier(.2,.7,.3,1);
    background: #05040A;
}

@media (max-width: 860px) {
    .demo-frame { height: 420px; }
    .demo-sizes { display: none; }
}

.demo-chip {
    background: linear-gradient(var(--g-angle), color-mix(in srgb, var(--g1) 26%, transparent), color-mix(in srgb, var(--g2) 26%, transparent));
    color: var(--ink);
    border-color: color-mix(in srgb, var(--g2) 35%, transparent);
}

/* ============================================================
   Live thumbnails — v1.2

   Each tile renders the real demo page at desktop width, scaled
   down. The page inside is never interactive: the whole tile is
   one link, and the frame is inert.
   ============================================================ */

.tile-live {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #07060D;
}

.tile-live iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 1280px;
    height: 960px;
    border: 0;
    transform-origin: top left;
    pointer-events: none;
    opacity: 0;
    transition: opacity .45s ease;
}

.tile-live iframe.is-ready { opacity: 1; }

/* The CSS mock sits underneath as the placeholder, and fades out
   once the real page has painted. */
.tile-live .pv { transition: opacity .45s ease; }
.tile-live.is-live .pv { opacity: 0; }

/* Bigger, calmer tiles — the artwork is the product here. */
.grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.3rem; }

.tile {
    background: #07060D;
    transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 50px -22px rgba(0, 0, 0, .9);
}

.tile-media {
    aspect-ratio: 4 / 3;
    border-bottom: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
}

.tile-badge {
    background: color-mix(in srgb, #07060D 78%, transparent);
    font-weight: 500;
    letter-spacing: .01em;
}

.tile-body { padding: 1rem 1.1rem 1.15rem; }
.tile-title { font-size: 1.05rem; }

/* Bundle tiles: real demos fanned out instead of flat gradient cards. */
.bundle-stack { gap: 0; }

.bundle-layer {
    position: relative;
    width: 30%;
    height: 66%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 16px 40px -14px rgba(0,0,0,.85);
    background: linear-gradient(150deg, var(--a1), var(--a2));
}

.bundle-layer:nth-child(1) { transform: rotate(-8deg) translateX(18%); z-index: 1; }
.bundle-layer:nth-child(2) { transform: translateY(-5%) scale(1.1); z-index: 3; }
.bundle-layer:nth-child(3) { transform: rotate(8deg) translateX(-18%); z-index: 2; }

.tile.bundle:hover .bundle-layer:nth-child(1) { transform: rotate(-14deg) translateX(2%); }
.tile.bundle:hover .bundle-layer:nth-child(3) { transform: rotate(14deg) translateX(-2%); }

@media (max-width: 860px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .9rem; }
    .tile-title { font-size: .95rem; }
}

/* bundle layers hold a scaled mock of the real section */
.bundle-layer .pv { transform: scale(1); border-radius: 0; }
.bundle-layer .pv-stage { padding: 9%; }
.bundle-layer .pv-chrome { height: 11%; }
