/* HOMEPAGE REALIZATION PLAYGROUND v1.0
   Visual demonstration layer only. Reuses the O.T.R.A.F.F. reality-loop engine.
   No FuelDesk math / O.T.R.A.F.F. formula / Stripe / paywall / auth touched here. */

.playground-body {
  background:
    radial-gradient(circle at 12% -10%, rgba(34,197,94,.16), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(20,184,166,.14), transparent 40%),
    #0b1120;
  color: #e5edf7;
  min-height: 100vh;
}

.playground-hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) 16px 8px;
}
.playground-hero .gut-kicker {
  display: block;
  width: max-content;
  max-width: 100%;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: .78rem;
  color: #34d399;
  margin: 0 auto 8px;
  text-align: center;
}
.playground-hero h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  line-height: 1.08;
  margin: 0 0 12px;
}
.playground-hero p {
  color: #9fb2c8;
  font-size: 1.02rem;
  margin: 0 auto;
  max-width: 640px;
}

.playground-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  min-height: 44px;
  padding: 11px 18px;
  color: #061016;
  font-weight: 900;
  font-size: .95rem;
  text-decoration: none;
  border: 1px solid rgba(52,211,153,.72);
  border-radius: 999px;
  background: linear-gradient(135deg, #34d399, #8be9c0);
  box-shadow: 0 12px 30px rgba(52,211,153,.18), 0 0 0 5px rgba(52,211,153,.08);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.playground-continue:hover {
  color: #061016;
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 16px 36px rgba(52,211,153,.25), 0 0 0 6px rgba(52,211,153,.1);
}
.playground-continue:focus-visible {
  outline: 3px solid rgba(255,255,255,.86);
  outline-offset: 3px;
}

/* Uploader-style card grid */
.playground-stage-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 16px 64px;
}
.playground-grid-intro {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  color: #8aa0ba;
  font-size: .92rem;
  margin: 18px 0 22px;
}
.playground-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 16px;
}

.playground-card {
  --card-accent: #22c55e;
  position: relative;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 18px;
  padding: 18px 18px 20px;
  background:
    radial-gradient(circle at 50% -20%, color-mix(in srgb, var(--card-accent) 22%, transparent), transparent 55%),
    rgba(15,23,42,.78);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.playground-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: var(--card-accent);
  opacity: .9;
}
.playground-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--card-accent) 55%, transparent);
  box-shadow: 0 18px 40px -22px var(--card-accent);
}
.playground-card .pg-doc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.playground-card .pg-doc-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  background: color-mix(in srgb, var(--card-accent) 20%, rgba(255,255,255,.05));
  color: var(--card-accent);
}
.playground-card .pg-badge {
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--card-accent);
  border: 1px solid color-mix(in srgb, var(--card-accent) 60%, transparent);
  background: color-mix(in srgb, var(--card-accent) 14%, transparent);
}
.playground-card h3 {
  margin: 2px 0 0;
  font-size: 1.12rem;
}
.playground-card .pg-teaser {
  margin: 0;
  color: #9fb2c8;
  font-size: .9rem;
  line-height: 1.4;
  flex: 1;
}
.playground-card .pg-go {
  margin-top: 6px;
  display: block;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .04em;
  color: #06210f;
  background: var(--card-accent);
  transition: filter .15s ease, transform .15s ease;
}
.playground-card .pg-go:hover { filter: brightness(1.08); transform: translateY(-1px); }

.playground-card.is-red    { --card-accent: #ef4444; }
.playground-card.is-orange { --card-accent: #f59e0b; }
.playground-card.is-green  { --card-accent: #22c55e; }
.playground-card.is-deep   { --card-accent: #14b8a6; }
.playground-card.is-red .pg-go,
.playground-card.is-orange .pg-go { color: #1a1206; }

.playground-card.is-coming-soon {
  opacity: 0.55;
  cursor: not-allowed;
}
.playground-card.is-coming-soon:hover {
  transform: none;
  border-color: rgba(148,163,184,.22);
  box-shadow: none;
}
.playground-card .pg-coming-soon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(148,163,184,.2);
  color: #8aa0ba;
  font-size: .65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(148,163,184,.3);
}
.playground-card .pg-go[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(148,163,184,.3);
}

/* Loop stage */
.playground-loop-stage { display: none; }
.playground-loop-stage.is-active { display: block; }
.playground-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 6px 0 18px;
}
.pg-back {
  border: 1px solid rgba(148,163,184,.32);
  background: rgba(15,23,42,.6);
  color: #cdd9e8;
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.pg-back:hover { border-color: #34d399; color: #fff; }
.pg-stage-title {
  font-weight: 700;
  letter-spacing: .04em;
  color: #cdd9e8;
}
.pg-stage-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}
.pg-open-fueldesk {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 800;
  letter-spacing: .03em;
  text-decoration: none;
  white-space: nowrap;
  color: #06210f;
  background: linear-gradient(90deg, #34d399, #22c55e);
  box-shadow: 0 10px 28px -12px rgba(34,197,94,.8);
  transition: transform .15s ease, filter .15s ease;
}
.pg-open-fueldesk:hover { transform: translateY(-1px); filter: brightness(1.06); }
.pg-open-fueldesk[hidden] { display: none; }
.pg-to-homepage {
  color: #8aa0ba;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.pg-to-homepage:hover { color: #e5edf7; border-color: #34d399; }
.pg-try-another {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  color: #06210f;
  background: #22c55e;
  opacity: .55;
  transition: opacity .25s ease, transform .15s ease, box-shadow .25s ease;
}
.pg-try-another.is-ready {
  opacity: 1;
  animation: pgPulse 1.6s ease-in-out infinite;
}
.pg-try-another:hover { transform: translateY(-1px); }
@keyframes pgPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  50% { box-shadow: 0 0 0 12px rgba(34,197,94,0); }
}

.playground-loop-mount {
  display: flex;
  justify-content: center;
}

.playground-grid-view.is-hidden { display: none; }

@media (prefers-reduced-motion: reduce) {
  .pg-try-another.is-ready { animation: none; }
}
