/* "See what's hatching": a looping tablet slideshow narrated by Goosy, sized to fit one screen. */
.studio-showcase { --tablet-h: clamp(340px, calc(100svh - 280px), 540px); }
.studio-showcase .showcase-stage {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  align-items: center; gap: 12px; padding: 30px 44px 22px; overflow: hidden;
  background: radial-gradient(ellipse 60% 70% at 38% 50%, #ffffffd9, transparent 70%), var(--world);
  transition: background-color .6s;
}
.studio-showcase .showcase-stage::before, .studio-showcase .showcase-stage::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; opacity: .55;
  animation: showcase-float 14s ease-in-out infinite alternate;
}
.studio-showcase .showcase-stage::before { width: 220px; height: 220px; left: 6%; top: -60px; background: #FFE6A0; }
.studio-showcase .showcase-stage::after { width: 160px; height: 160px; right: 30%; bottom: -50px; background: #ffffffa6; animation-duration: 18s; }
@keyframes showcase-float { to { translate: 40px 24px; } }

.showcase-device { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.showcase-slides { margin-bottom: 8px; }
.showcase-slides { display: grid; place-items: center; min-width: 0; max-width: 100%; }
.showcase-slides > figure { grid-area: 1 / 1; margin: 0; padding: 0; min-width: 0; max-width: 100%; }
.showcase-ghost { pointer-events: none; }

/* Graphite tablet: even bezel, machined edge, camera, side buttons, glass glare and a floor shadow. */
.showcase-tablet {
  position: relative; box-sizing: content-box; height: var(--tablet-h); aspect-ratio: 720 / 1135; max-width: calc(100% - 26px);
  padding: 13px; border-radius: 34px;
  background: linear-gradient(150deg, #454B55 0%, #23272E 22%, #16191E 60%, #2A2F37 100%);
  box-shadow: 0 0 0 1px #0A0C10, inset 0 0 0 1.5px #6B727D, inset 0 2px 1px 1.5px #ffffff18,
    0 42px 60px -34px #1F2A4499, 0 16px 28px -18px #1F2A4466;
}
.showcase-tablet.landscape { height: auto; width: min(560px, calc(100% - 26px)); aspect-ratio: 760 / 520; border-radius: 30px; }
.showcase-tablet::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -26px; height: 22px; border-radius: 50%;
  background: radial-gradient(closest-side, #1F2A4440, transparent); z-index: -1;
}
.tablet-camera {
  position: absolute; left: calc(50% - 2.5px); top: 4px; width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4C5A74, #0B0E14 70%); box-shadow: 0 0 0 1px #0006;
}
.landscape .tablet-camera { left: 4px; top: calc(50% - 2.5px); }
.tablet-button { position: absolute; background: linear-gradient(#5B616B, #2A2E35); }
.tablet-button.power { top: -3px; right: 18%; width: 34px; height: 3px; border-radius: 3px 3px 0 0; }
.tablet-button.volume { right: -3px; top: 16%; width: 3px; height: 44px; border-radius: 0 3px 3px 0; }
.landscape .tablet-button.power { top: 18%; right: -3px; width: 3px; height: 34px; border-radius: 0 3px 3px 0; }
.landscape .tablet-button.volume { top: -3px; right: 14%; width: 44px; height: 3px; border-radius: 3px 3px 0 0; }
.showcase-tablet-screen { position: relative; height: 100%; overflow: hidden; border-radius: 21px; background: #F5FAF6; }
.landscape .showcase-tablet-screen { border-radius: 18px; }
.showcase-tablet-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(118deg, #ffffff1f 0, #ffffff08 28%, transparent 42%);
}
.showcase-tablet-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transform-origin: 50% 0; }
.showcase-slide:not([hidden]) .showcase-tablet-screen img { animation: screen-settle 6.5s cubic-bezier(.2,.6,.3,1) both; }
@keyframes screen-settle { from { transform: scale(1.04); } to { transform: none; } }

/* Passive progress: one dot per slide, the current one fills while it is on screen. */
.showcase-meta { display: flex; align-items: center; gap: 14px; }
.showcase-dots { display: flex; gap: 7px; align-items: center; }
.showcase-dots > span { position: relative; display: block; width: 8px; height: 8px; border-radius: 99px; overflow: hidden; background: #1F2A4426; transition: width .4s; }
.showcase-dots > span.on { width: 34px; }
.showcase-dots > span > span { position: absolute; inset: 0; background: var(--orange, #C25210); transform-origin: 0 50%; scale: 0 1; }
.showcase-note { font: 800 11px/1 var(--body); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.showcase-note:empty { display: none; }

.showcase-pause {
  display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; color: var(--ink);
  background: #ffffffb3; box-shadow: 0 0 0 1.5px #1F2A4433; transition: background .2s, box-shadow .2s;
}
.showcase-pause:hover { background: #fff; box-shadow: 0 0 0 1.5px var(--ink); }
.showcase-pause .icon-play, .showcase-pause[data-paused] .icon-pause { display: none; }
.showcase-pause[data-paused] .icon-play { display: block; margin-left: 2px; }

/* Narrator. */
.goosy-comment { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0; align-self: end; padding-bottom: 30px; }
.goosy-speech {
  position: relative; margin: 0 0 18px; padding: 16px 20px; max-width: 290px; min-height: 3.9em;
  border: 2px solid var(--ink); border-radius: 22px; background: #fff;
  font: 600 18px/1.35 var(--display); color: var(--ink); text-wrap: balance;
  box-shadow: 0 14px 26px -18px #1f2a4459;
}
.goosy-speech::after {
  content: ""; position: absolute; left: 42%; bottom: -13px; width: 22px; height: 22px;
  background: #fff; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg) skew(8deg, 8deg); border-bottom-right-radius: 5px;
}
.goosy-comment-button { width: 180px; height: 180px; margin-right: 20px; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.goosy-comment-button:hover { transform: translateY(-4px) rotate(-3deg); }

html[data-theme] .goosy-speech, html[data-theme] .goosy-speech::after { background: var(--surface); border-color: var(--line); color: var(--ink); }
html[data-theme] .studio-showcase .showcase-stage::before, html[data-theme] .studio-showcase .showcase-stage::after { opacity: .12; }
html[data-theme] .studio-showcase .showcase-stage { background: radial-gradient(ellipse 60% 70% at 38% 50%, var(--surface-pick), transparent 70%), var(--paper); }
html[data-theme] .showcase-tablet { box-shadow: 0 0 0 1px #000, inset 0 0 0 1.5px #6B727D, inset 0 2px 1px 1.5px #ffffff18, 0 30px 60px -30px #000c; }
html[data-theme] .showcase-dots > span { background: color-mix(in srgb, var(--ink) 22%, transparent); }
html[data-theme] .showcase-pause { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line); }

@media (max-width: 860px) {
  .studio-showcase { --tablet-h: clamp(300px, calc(100svh - 300px), 460px); }
  .studio-showcase .showcase-stage { grid-template-columns: minmax(0, 1fr); padding: 26px 16px 18px; gap: 4px; }
  .goosy-comment { flex-direction: row-reverse; align-items: flex-end; justify-content: center; padding-bottom: 0; align-self: stretch; }
  .goosy-comment-button { width: 112px; height: 112px; margin: 0; flex-shrink: 0; }
  .goosy-speech { margin: 0 0 58px -6px; font-size: 16px; max-width: none; flex: 1 1 auto; min-height: 0; }
  .goosy-speech::after { left: -12px; bottom: 16px; border-width: 0 0 2px 2px; transform: rotate(45deg) skew(8deg, 8deg); border-radius: 0 0 0 5px; }
}
@media (max-width: 480px) {
  .showcase-tablet { padding: 9px; border-radius: 24px; max-width: calc(100% - 18px); }
  .showcase-tablet.landscape { width: calc(100% - 18px); border-radius: 20px; }
  .showcase-tablet-screen, .landscape .showcase-tablet-screen { border-radius: 15px; }
  .tablet-camera { top: 2px; width: 4px; height: 4px; }
  .landscape .tablet-camera { left: 2px; top: calc(50% - 2px); }
  .goosy-comment-button { width: 96px; height: 96px; }
  .goosy-speech { font-size: 15px; padding: 12px 15px; margin-bottom: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-showcase .showcase-stage::before, .studio-showcase .showcase-stage::after, .showcase-tablet-screen img { animation: none !important; }
}
