/* ─── Showcase — single-screen editorial bento, no scroll ─────
   Top to bottom: topbar (fixed) · hero · data grid (fills) · CTA strip · footer
   Everything fits inside 100vh on desktop. Mobile falls back to scroll.
*/

html, body.showcase {
  overflow: hidden;
}
body.showcase .arc,
body.showcase .scene-video,
body.showcase .scene-overlay,
body.showcase .numeral,
body.showcase .progress {
  display: none !important;
}

.show-main {
  height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 2rem 4.5rem;        /* roomier bottom so the CTA isn't crammed against the footer */
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* Soft brand gradient wash, far behind everything */
.show-main::before {
  content: "";
  position: fixed;
  inset: auto 0 -20% 0;
  height: 60vh;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(50% 50% at 15% 100%,
      color-mix(in srgb, var(--potassium) 14%, transparent) 0%, transparent 70%),
    radial-gradient(40% 40% at 85% 100%,
      color-mix(in srgb, var(--copper) 10%, transparent) 0%, transparent 70%);
  opacity: 0.5;
}
.show-main > * { position: relative; z-index: 1; }

/* ─── Hero — just the title ──────────────────────────────── */
.show-hero {
  flex-shrink: 0;
}
.show-hero-title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  /* Black (900) — matches gig.health's heading weight; their kit ships
     this. Falls back to 700 if the network/kit isn't reachable. */
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
}

/* ─── Data grid — quote leads, stats support ─────────────────
   Top row (wider): the quote — biggest cell, the human moment
   Bottom row (3 cols): Quality | Creativity | Budget
*/
.show-data {
  flex: 1;
  display: grid;
  grid-template-columns: 5fr 4fr 3fr;
  grid-template-rows: 1.35fr 1fr;       /* give the quote more room — long testimonials need it */
  gap: 14px;
  min-height: 0;
}
.data-cell {
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--ink-mute);
  border-radius: 12px;
  background: rgba(254, 246, 246, 0.015);
  display: flex;
  flex-direction: column;
  justify-content: space-between;     /* label top · num middle · sub bottom */
  min-height: 0;
  overflow: hidden;
  gap: 0.6rem;
}

/* Placements */
.data-quote      { grid-column: 1 / -1; grid-row: 1; }
.data-quality    { grid-column: 1; grid-row: 2; }
.data-creativity { grid-column: 2; grid-row: 2; }
.data-budget     { grid-column: 3; grid-row: 2; }

/* Cell label */
.cell-label {
  margin: 0 0 0.6rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  flex-shrink: 0;
}
.cell-label::before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1px;
  background: var(--flame);
}

/* Editorial display numeral — the big 88% / 75% stat values */
.cell-num {
  margin: auto 0;            /* vertically centred in the cell */
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(4.5rem, 8.5vw, 7rem);
  line-height: 0.85;
  letter-spacing: -0.045em;
  color: var(--ink);
}
.cell-num small {
  font-size: 0.28em;
  font-weight: 700;
  color: var(--flame);
  margin-left: 0.08em;
  vertical-align: top;
  position: relative;
  top: 0.55em;
}
.cell-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 22ch;
}

/* ─── Budget position — horizontal scale (matches admin dashboard) ── */
.budget-display {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: auto 0;            /* vertically centred inside the cell */
  padding: 0 0.2rem;
}
.budget-scale {
  position: relative;
  display: flex;
  height: 12px;
  border-radius: 999px;
  background: rgba(254, 246, 246, 0.06);
  overflow: visible;
}
.budget-zone { flex: 1; }
.budget-zone.is-higher  { background: color-mix(in srgb, var(--flame)  55%, transparent); border-radius: 999px 0 0 999px; }
.budget-zone.is-on-par  { background: rgba(254, 246, 246, 0.18); }
.budget-zone.is-cheaper { background: color-mix(in srgb, var(--copper) 55%, transparent); border-radius: 0 999px 999px 0; }
.budget-marker {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 4px;
  background: var(--paper);
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px rgba(13, 26, 45, 0.7), 0 0 14px rgba(254, 246, 246, 0.45);
  z-index: 2;
  transition: left 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.budget-marker.is-empty { display: none; }
.budget-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
/* Colour-code the axis labels to mirror the scale beneath */
.budget-axis span:nth-child(1) { color: var(--flame); }
.budget-axis span:nth-child(2) { color: var(--sodium); }
.budget-axis span:nth-child(3) { color: var(--copper); }

/* ─── Quote cell — wide editorial pull-quote ────────────────── */
.data-quote {
  position: relative;
  padding: 2rem 2.4rem;
}
.quote-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 0.8rem;
}
.quote-card {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.2rem;
}
.quote-card.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.quote-text {
  margin: 0;
  /* Slightly smaller ceiling than before — keeps long testimonials
     (200+ chars) inside the card without clipping the final line */
  font-size: clamp(1.1rem, 1.7vw, 1.55rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  padding-left: 3rem;
  position: relative;
  max-width: 78ch;
  text-wrap: pretty;
}
.quote-text::before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: -0.3em;
  font-size: 3.2em;
  font-style: normal;
  line-height: 1;
  color: var(--flame);
  opacity: 0.85;
}
.quote-nav {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-start;
  margin-top: auto;
  padding-left: 3rem;
  flex-shrink: 0;
}
.quote-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 1px solid var(--ink-faint);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quote-dot:hover { border-color: var(--ink); }
.quote-dot.is-active {
  background: var(--flame);
  border-color: var(--flame);
  width: 20px;
  border-radius: 999px;
}

/* ─── CTA — prominent closing moment ─────────────────────── */
.show-cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 2.2rem;
  border: 1px solid var(--ink-mute);
  border-radius: 12px;
  background: rgba(254, 246, 246, 0.015);
}
.show-cta-text {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}
.show-cta-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
  color: var(--flame);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.show-cta-kicker::before {
  content: "";
  display: inline-block;
  width: 1.4rem;
  height: 1px;
  background: var(--flame);
}
.show-cta-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  /* Black (900) to match the hero title */
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-wrap: balance;
}
.show-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
  padding: 1.1rem 1.8rem;
  background: var(--flame);
  color: var(--paper);
  text-decoration: none;
  border-radius: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 30px rgba(244, 83, 71, 0.32);
  white-space: nowrap;
  flex-shrink: 0;
}
.show-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(244, 83, 71, 0.45);
}
.show-cta-btn-arrow { transition: transform 0.2s ease; }
.show-cta-btn:hover .show-cta-btn-arrow { transform: translateX(4px); }

/* Empty state */
.show-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* ─── Skeleton placeholders ──────────────────────────────────
   Shown immediately on first paint so the layout looks settled
   while /api/public is in flight. JS removes them as soon as
   real data arrives. The shimmer is subtle on purpose — fast
   connections should barely see it.
*/
@keyframes skel-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skel {
  display: block;
  border-radius: 6px;
  background:
    linear-gradient(
      90deg,
      rgba(254, 246, 246, 0.045) 0%,
      rgba(254, 246, 246, 0.11)  50%,
      rgba(254, 246, 246, 0.045) 100%
    );
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
}
.quote-skeleton {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.skel-line {
  height: 1.1rem;
}
.skel-line-1 { width: 92%; }
.skel-line-2 { width: 78%; }
.skel-line-3 { width: 60%; }

/* Big-number skeleton — keeps the cell at full height so nothing
   reflows when the real number drops in. */
.skel-num {
  display: inline-block;
  min-width: 2.2ch;
  height: 0.78em;
  border-radius: 8px;
  vertical-align: middle;
  background:
    linear-gradient(
      90deg,
      rgba(254, 246, 246, 0.045) 0%,
      rgba(254, 246, 246, 0.11)  50%,
      rgba(254, 246, 246, 0.045) 100%
    );
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .skel, .skel-num { animation: none; }
}

/* Footer — minimal one-line strip at the very bottom */
.show-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.7rem 2rem;
  font-size: 0.62rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}
.show-footer .foot-block { pointer-events: auto; }
.show-footer .foot-block { display: flex; flex-direction: row; gap: 0.6em; align-items: baseline; }
.show-footer .foot-label,
.show-footer .foot-link {
  font-size: 0.62rem;
}

/* ─── Mobile fallback (vertical scroll) ────────────────────── */
@media (max-width: 980px), (max-height: 640px) {
  html, body.showcase { overflow: auto; }
  .show-main { height: auto; padding: 6rem 1rem 5rem; }
  .show-data {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .data-quote      { grid-column: 1 / -1; grid-row: auto; min-height: 0; }
  .data-quality    { grid-column: 1 / -1; grid-row: auto; min-height: 280px; }
  .data-creativity { grid-column: 1; grid-row: auto; }
  .data-budget     { grid-column: 2; grid-row: auto; }
  .show-cta { flex-direction: column; align-items: flex-start; gap: 0.8rem; padding: 1.5rem; }
  .show-footer { position: relative; padding: 1.5rem 1rem; }

  /* Long quotes: stop absolutely-positioning each card inside a
     fixed-height stage — that was clipping multi-paragraph
     testimonials against .data-cell's overflow:hidden. On mobile,
     the active card flows in the normal layout so the cell grows
     to fit its text and nothing escapes the border. Carousel still
     works via the nav dots; we just lose the fade transition. */
  .data-cell { overflow: visible; }
  .data-quote .quote-stage {
    position: static;
    min-height: 0;
    height: auto;
    display: block;
  }
  .data-quote .quote-card {
    position: static;
    opacity: 0;
    transform: none;
    transition: none;
    display: none;
  }
  .data-quote .quote-card.is-active {
    opacity: 1;
    display: flex;
  }
  /* Tighten the oversized opening-quote glyph on small screens so
     the body text has room to breathe within the card width. */
  .quote-text { padding-left: 2.2rem; max-width: none; }
  .quote-text::before { font-size: 2.6em; top: -0.15em; }
  .quote-nav { padding-left: 2.2rem; }
}
@media (max-width: 520px) {
  .show-data { grid-template-columns: 1fr; }
  .data-creativity, .data-budget { grid-column: 1; }
  .data-quality .quality-stack { grid-template-columns: 1fr; }
}
