/* Apps showcase — device frames and crossfades for the Genestack Console Apple apps.
   Pure CSS frames (no frame images), so the only weight is the screenshots themselves. */
.apps-showcase { position: relative; }
.premium-pill {
  display: inline-block; margin-left: 0.45rem; padding: 0.08rem 0.5rem; border-radius: 999px;
  font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--mark-fg); background: linear-gradient(135deg, var(--g1), var(--g2));
  vertical-align: middle;
}
.as-tabs {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.2rem 0 0.4rem;
}
.as-tabs button {
  font: inherit; font-size: 0.86rem; color: var(--muted); cursor: pointer;
  background: var(--panel-deep); border: 1px solid var(--border); border-radius: 999px;
  padding: 0.38rem 0.9rem; transition: color .2s, border-color .2s, background .2s;
}
.as-tabs button:hover { color: var(--text); }
.as-tabs button.is-active {
  color: var(--text); border-color: var(--g2); background: var(--selected-bg);
  box-shadow: 0 0 18px rgba(52, 199, 89, 0.18);
}
.as-stage {
  position: relative; display: grid; place-items: center;
  min-height: clamp(360px, 52vw, 600px); margin-top: 0.6rem;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 70% at 50% 40%, rgba(52, 199, 89, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(14, 30, 18, 0.65), rgba(4, 6, 10, 0.9));
  overflow: hidden; padding: 1.6rem 1rem 1rem;
}
.as-stage::after { /* slow scan line for a little life */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(141, 240, 106, 0.05) 50%, transparent 100%);
  background-size: 100% 240px; animation: as-scan 9s linear infinite; opacity: .7;
}
@keyframes as-scan { from { background-position: 0 -240px; } to { background-position: 0 100%; } }

.as-device {
  grid-area: 1 / 1; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
  opacity: 0; transform: translateY(18px) scale(0.97); pointer-events: none;
  transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
}
.as-device.is-active { opacity: 1; transform: none; pointer-events: auto; }

.as-frame { position: relative; filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.55)); }
.as-screen { position: relative; overflow: hidden; background: #000; }
.as-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center;
  opacity: 0; transform: scale(1.0); transition: opacity .9s ease;
  display: block;
}
.as-slide.is-active { opacity: 1; animation: as-drift var(--as-slide-ms, 4200ms) ease-out both; }
.is-paused .as-slide.is-active, .is-reduced .as-slide.is-active { animation: none; }
@keyframes as-drift { from { transform: scale(1.0); } to { transform: scale(1.025); } }

/* Mac: a laptop lid and base */
.as-mac .as-frame { width: min(860px, 88vw); }
.as-mac .as-bezel { padding: 2.2% 2.2% 2.6%; border-radius: 18px 18px 6px 6px; background: #0b0d0c; border: 1px solid #262b28; }
.as-mac .as-screen { aspect-ratio: 16 / 10; border-radius: 6px; }
.as-mac .as-base {
  height: 16px; margin: 0 -6%; border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, #2b302d, #141715); border-top: 1px solid #3a403c;
}
.as-mac .as-base::before { content: ""; display: block; width: 16%; height: 6px; margin: 0 auto; border-radius: 0 0 8px 8px; background: #0b0d0c; }

/* iPad, portrait */
.as-ipad .as-frame { width: min(400px, 70vw); }
.as-ipad .as-bezel { padding: 4.2%; border-radius: 34px; background: #0b0d0c; border: 1px solid #2a302c; }
.as-ipad .as-screen { aspect-ratio: 2064 / 2752; border-radius: 18px; }

/* iPhone */
.as-iphone .as-frame { width: min(270px, 62vw); }
.as-iphone .as-bezel { padding: 3.6%; border-radius: 46px; background: #0b0d0c; border: 1px solid #2c322e; }
.as-iphone .as-screen { aspect-ratio: 1320 / 2868; border-radius: 36px; }
.as-iphone .as-screen::after {
  content: ""; position: absolute; top: 1.6%; left: 50%; width: 30%; height: 3.4%; transform: translateX(-50%);
  border-radius: 999px; background: #000; z-index: 2;
}

/* Watch */
.as-watch .as-frame { width: min(230px, 56vw); }
.as-watch .as-bezel { padding: 9%; border-radius: 30%/26%; background: #121513; border: 1px solid #333a35; }
.as-watch .as-screen { aspect-ratio: 422 / 514; border-radius: 22%/18%; }
.as-watch .as-frame::after { /* digital crown */
  content: ""; position: absolute; right: -9px; top: 26%; width: 10px; height: 18%;
  border-radius: 4px; background: linear-gradient(90deg, #2c322e, #4a524c);
}
.as-watch .as-band { width: 58%; height: 26px; margin: 0 auto; background: #0f1411; border: 1px solid #1d2a21; }
.as-watch .as-band.top { border-radius: 10px 10px 0 0; border-bottom: 0; }
.as-watch .as-band.bottom { border-radius: 0 0 10px 10px; border-top: 0; }

/* Apple TV: a thin-bezel panel on a stand */
.as-tv .as-frame { width: min(880px, 90vw); }
.as-tv .as-bezel { padding: 1.1%; border-radius: 10px; background: #050605; border: 1px solid #222724; }
.as-tv .as-screen { aspect-ratio: 16 / 9; border-radius: 3px; }
.as-tv .as-stand { width: 26%; height: 14px; margin: 0 auto; border-radius: 0 0 6px 6px; background: linear-gradient(180deg, #1e2320, #0d0f0e); }

.as-caption { text-align: center; min-height: 2.6em; }
.as-caption b { display: block; color: var(--text); font-size: 1rem; }
.as-caption span { color: var(--muted); font-size: 0.86rem; }
.as-dots { display: flex; gap: 0.35rem; justify-content: center; }
.as-dots button {
  width: 22px; height: 4px; padding: 0; border: 0; border-radius: 4px; cursor: pointer;
  background: rgba(126, 155, 134, 0.35); position: relative; overflow: hidden;
}
.as-dots button.is-active { background: rgba(126, 155, 134, 0.35); }
.as-dots button.is-active::after {
  content: ""; position: absolute; inset: 0; background: var(--g1); transform-origin: left;
  animation: as-progress var(--as-slide-ms, 4200ms) linear both;
}
.is-paused .as-dots button.is-active::after, .is-reduced .as-dots button.is-active::after { animation: none; }
@keyframes as-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Plan framing */
.as-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.9rem; margin-top: 1.2rem; }
.as-plan article {
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.05rem 1.15rem;
  background: linear-gradient(180deg, rgba(18, 36, 24, 0.75), rgba(7, 14, 9, 0.85));
}
.as-plan article.now { border-color: var(--ok-border); box-shadow: 0 0 0 1px rgba(52, 199, 89, 0.12), 0 18px 40px rgba(0, 0, 0, 0.35); }
.as-plan h3 { margin: 0.1rem 0 0.35rem; font-size: 1.02rem; }
.as-plan .tag { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--g1); }
.as-plan p { margin: 0.25rem 0; }

/* Feature grid (apps page) */
.as-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.8rem; margin-top: 1rem; }
.as-features article { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.95rem 1.05rem; background: rgba(7, 14, 9, 0.8); }
.as-features h3 { margin: 0 0 0.3rem; font-size: 0.98rem; }
.as-features p { margin: 0; font-size: 0.9rem; }
.as-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }

@media (max-width: 640px) {
  .as-stage { min-height: 0; padding: 1rem 0.5rem 0.8rem; }
  .as-tabs button { padding: 0.32rem 0.7rem; font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .as-stage::after { animation: none; display: none; }
  .as-device, .as-slide { transition: none; }
}

/* Support-plan cards: a label instead of a price. */
.plan-tag {
  margin: 0 0 .6rem;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted, #8fa39a);
}
.plan-tag.now { color: var(--accent, #4ade80); }
