/* ============================================================
   GoGood Groups — inline product mockups for the case study.

   Presentation tuned to match the Air Tahiti Nui & Brain Game
   case studies: Playfair Display + DM Sans, warm cream panels,
   a coral accent and a dark, glowing hero panel. Device screens
   keep their own Plus Jakarta product type. Imagery sits on the
   panels with soft shadows — no gray border boxes (CLAUDE.md).
   ============================================================ */

.gg, .gg * { box-sizing: border-box; }
.gg {
  --gg-cream: #F4F1FE;
  --gg-cream-2: #FFFFFF;
  --gg-ink: #1A1335;
  --gg-body: #4A4564;
  --gg-muted: #8E88A8;
  --gg-coral: #6D4DF5;
  --gg-teal: #34D399;
  --gg-line: #E8E3F8;
  --gg-night: #1B1145;
  --gg-serif: "Playfair Display", Georgia, serif;
  --gg-sans: "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-family: var(--gg-sans);
  -webkit-font-smoothing: antialiased;
}
/* device interiors keep the product typeface */
.gg-phone-inner, .gg-desktop { font-family: "Plus Jakarta Sans", system-ui, sans-serif; }

/* ---------- flow panels (cream, like the BG/ATN section cards) ---------- */
.gg:has(.gg-flow-head) {
  margin-top: clamp(50px, 6vw, 100px);
}

.gg-flow-head {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center; margin: 0 auto;
}
.gg-flow-head h3 { max-width: 24ch; }
.flow-desc {
  font-family: var(--gg-sans); font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.62; color: var(--gg-body);
  max-width: 60ch; margin: 14px auto 0; text-align: center;
}
.gg-flow-head .ft {
  font-family: var(--gg-sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gg-coral);
  white-space: nowrap;
}
.gg-flow-head h3 {
  font-family: var(--gg-serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 1rem + 1.4vw, 1.9rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--gg-ink);
  margin: 0;
}

/* ---------- showcase rows ---------- */
.gg-stage {
  display: flex;
  gap: clamp(20px, 2.8vw, 44px);
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: clamp(26px, 3vw, 44px);
}
.gg-stage.col { flex-direction: column; align-items: center; gap: clamp(28px, 3.4vw, 52px); }

/* ---- auto-advancing flow player ---- */
.gg-stage.auto {
  display: grid;
  grid-template-areas: "stack";
  justify-items: center;
}
.gg-stage.auto .gg-shot {
  grid-area: stack;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.99);
  transition: opacity .3s ease, transform .3s cubic-bezier(.22, 1, .36, 1), visibility .3s;
}
.gg-stage.auto .gg-shot.is-on { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .gg-stage.auto .gg-shot { transition: none; }
}
.gg-cue {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: clamp(18px, 2vw, 26px); min-height: 21px;
  font-family: var(--gg-sans); font-size: 13.5px; font-weight: 600;
  color: var(--gg-coral); text-align: center;
}
/* in the auto-playing flows the action cue tells the story — drop the
   per-screen captions so each step is a single line, not two. */
.gg-stage.auto .gg-cap { display: none; }
.gg-cue .ic { flex: none; }
.gg-cue.end { color: var(--gg-muted); font-weight: 500; }
.gg-dots {
  display: flex; gap: 9px; justify-content: center;
  margin-top: 14px;
}
.gg-dot {
  width: 8px; height: 8px; border-radius: 50%; padding: 0; border: none;
  background: color-mix(in oklab, var(--gg-ink) 22%, transparent);
  cursor: pointer; transition: background .2s, transform .2s;
}
.gg-dot:hover { background: color-mix(in oklab, var(--gg-ink) 42%, transparent); }
.gg-dot.on { background: var(--gg-coral); transform: scale(1.3); }

/* tap indicator — lights up the CTA being tapped on the active screen */
.gg-tap { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .gg-stage.auto .gg-shot.is-on .gg-tap { animation: ggTapPress 1s ease-out .6s 1 both; }
  .gg-stage.auto .gg-shot.is-on .gg-tap::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 64px; height: 64px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.92);
    transform: translate(-50%, -50%) scale(.3);
    opacity: 0; pointer-events: none; z-index: 6;
    animation: ggTapRing 1s ease-out .6s 1 both;
  }
}
@keyframes ggTapPress {
  0%, 24%, 100% { transform: scale(1); filter: none; }
  9% { transform: scale(.95); filter: brightness(1.18) saturate(1.08); }
}
@keyframes ggTapRing {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  9% { opacity: .9; }
  46% { opacity: 0; transform: translate(-50%, -50%) scale(1.7); }
  100% { opacity: 0; }
}

.gg-shot { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.gg-cap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
  max-width: 30ch;
}
.gg-cap .ct {
  font-family: var(--gg-serif);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.005em;
  color: var(--gg-ink);
}
.gg-cap .cd {
  font-family: var(--gg-sans);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--gg-muted);
}

/* ---------- phone device ---------- */
.gg-phone-wrap { --s: 0.84; width: calc(392px * var(--s)); height: calc(812px * var(--s)); flex: none; }
.gg-phone-scale { transform: scale(var(--s)); transform-origin: top left; }
.gg-phone {
  width: 392px; height: 812px;
  background: #05070F;
  border-radius: 50px;
  padding: 11px;
  box-shadow: 0 34px 70px -28px rgba(20, 16, 8, 0.5), inset 0 0 0 2px rgba(255,255,255,0.06);
}
.gg-phone-inner {
  position: relative; width: 100%; height: 100%;
  background: #0A0E20;
  border-radius: 39px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.gg-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.gg-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ---------- desktop browser ---------- */
.gg-desk-wrap { --s: 0.86; width: calc(1100px * var(--s)); height: calc(702px * var(--s)); max-width: 94vw; flex: none; }
.gg-desk-scale { transform: scale(var(--s)); transform-origin: top left; }
.gg-desktop {
  width: 1100px; height: 702px;
  background: #0A0E20;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 38px 78px -30px rgba(20, 16, 8, 0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
}

/* ---------- in-app photo slot placeholder ---------- */
.gg-photo {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.04) 10px, transparent 10px, transparent 20px),
    linear-gradient(160deg, #20283F, #141A2E);
  display: flex; align-items: center; justify-content: center;
}
.gg-photo span {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 0 24px;
}

/* ---------- hero: dark glowing panel + overlapping composition ---------- */
.gg-hero {
  position: relative;
  margin-block: clamp(22px, 3vw, 40px);
  background: radial-gradient(120% 90% at 50% 0%, #191B26 0%, var(--gg-night) 58%);
  border-radius: clamp(20px, 2.4vw, 30px);
  padding: clamp(36px, 5vw, 72px) clamp(20px, 4vw, 56px);
  overflow: hidden;
  box-shadow: 0 50px 90px -56px rgba(10, 12, 22, 0.7);
}
.gg-hero-glow {
  position: absolute;
  left: 50%; top: 4%;
  width: min(880px, 96%); height: 78%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 36%, rgba(140,108,255,0.42), transparent 62%),
    radial-gradient(circle at 70% 70%, rgba(52,211,153,0.12), transparent 60%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}
.gg-hero-compose {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: clamp(18px, 3vw, 40px);
}
/* pedestal light grounding the devices */
.gg-hero-compose::after {
  content: "";
  position: absolute;
  left: 50%; bottom: clamp(-6px, 0.6vw, 6px);
  width: min(620px, 80%); height: 90px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(150,120,255,0.34), rgba(150,120,255,0) 70%);
  filter: blur(14px);
  pointer-events: none;
  z-index: 0;
}
.gg-hero .gg-desk-wrap { --s: 0.66; }
.gg-hero .gg-phone-wrap { --s: 0.6; }
/* phone is first child (front, resting on the desktop's left corner); desktop second (anchor) */
.gg-hero-compose .gg-shot { margin: 0; position: relative; }
.gg-hero-compose .gg-shot:first-child {
  z-index: 2;
  margin-right: clamp(-168px, -13vw, -104px);
  transform: rotate(-4deg) translateY(40px);
  filter: drop-shadow(-22px 40px 50px rgba(0,0,0,0.55));
}
.gg-hero-compose .gg-shot:last-child {
  z-index: 1;
  transform: rotate(1deg) translateY(-8px);
  filter: drop-shadow(28px 44px 56px rgba(0,0,0,0.5));
}
/* soft reflection under the desktop */
.gg-hero-compose .gg-shot:last-child::after {
  content: "";
  position: absolute;
  left: 6%; right: 6%; bottom: -22px; height: 40px;
  background: radial-gradient(ellipse at center top, rgba(0,0,0,0.32), transparent 72%);
  filter: blur(8px);
  z-index: -1;
}
/* staggered float-in */
@media (prefers-reduced-motion: no-preference) {
  .gg-hero .gg-hero-compose .gg-shot { opacity: 0; }
  .gg-hero.in .gg-hero-compose .gg-shot:last-child {
    animation: ggHeroDesk 0.9s cubic-bezier(.2,.85,.25,1) 0.05s both;
  }
  .gg-hero.in .gg-hero-compose .gg-shot:first-child {
    animation: ggHeroPhone 1s cubic-bezier(.2,.85,.25,1) 0.24s both;
  }
}
@keyframes ggHeroDesk {
  from { opacity: 0; transform: translateY(44px) rotate(1deg) scale(.97); }
  to   { opacity: 1; transform: rotate(1deg) translateY(-8px); }
}
@keyframes ggHeroPhone {
  from { opacity: 0; transform: translateY(78px) rotate(-4deg) scale(.95); }
  to   { opacity: 1; transform: rotate(-4deg) translateY(40px); }
}

/* ---------- problem "before" diagram (cream cards, coral resolve) ---------- */
.gg-before {
  display: flex; align-items: stretch; gap: 12px;
  flex-wrap: wrap;
  margin-top: clamp(28px, 3vw, 44px);
}
.gg-step {
  flex: 1 1 150px;
  border: 1px solid var(--gg-line);
  border-radius: 14px;
  padding: 18px 18px 20px;
  background: var(--gg-cream-2);
  display: flex; flex-direction: column; gap: 6px;
}
.gg-step .n {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem; color: var(--gg-muted); margin-bottom: 2px;
}
.gg-step .t { font-family: var(--gg-serif); font-weight: 600; letter-spacing: -0.005em; font-size: 1.08rem; color: var(--gg-ink); }
.gg-step .d { color: var(--gg-body); font-size: 0.86rem; line-height: 1.45; }
.gg-step.solved { background: color-mix(in oklab, var(--gg-coral) 12%, #fff); border-color: color-mix(in oklab, var(--gg-coral) 42%, var(--gg-line)); }
.gg-step.solved .t { color: var(--gg-coral); }
.gg-before .arr { align-self: center; color: var(--gg-coral); flex: none; font-size: 1.1rem; opacity: 0.55; }
.gg-cap.gg-cap-left { text-align: left; max-width: none; margin-top: 16px; }
.gg-cap.gg-cap-left .ct { font-size: 0.78rem; font-family: ui-monospace, monospace; color: var(--gg-muted); font-weight: 500; }

/* ---------- responsive scale-down ---------- */
@media (max-width: 1180px) {
  .gg-desk-wrap { --s: 0.7; }
  .gg-hero .gg-desk-wrap { --s: 0.5; }
  .gg-hero .gg-phone-wrap { --s: 0.46; }
}
@media (max-width: 920px) {
  .gg-phone-wrap { --s: 0.72; }
  .gg-desk-wrap { --s: 0.56; }
  .gg-before .arr { display: none; }
  .gg-hero-compose { flex-wrap: wrap; gap: 24px; align-items: center; padding-bottom: 0; }
  .gg-hero-compose .gg-shot:first-child,
  .gg-hero-compose .gg-shot:last-child { transform: none; margin: 0; }
  .gg-hero-compose .gg-shot:last-child::after,
  .gg-hero-compose::after { display: none; }
  .gg-hero .gg-desk-wrap { --s: 0.6; }
  .gg-hero .gg-phone-wrap { --s: 0.6; }
  /* keep the float-in but without the resting offsets that only fit the overlap */
  .gg-hero.in .gg-hero-compose .gg-shot:first-child { animation-name: ggHeroPhoneStacked; }
  .gg-hero.in .gg-hero-compose .gg-shot:last-child { animation-name: ggHeroDeskStacked; }
}
@keyframes ggHeroDeskStacked {
  from { opacity: 0; transform: translateY(36px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes ggHeroPhoneStacked {
  from { opacity: 0; transform: translateY(56px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
  .gg-phone-wrap { --s: 0.6; }
  .gg-desk-wrap { --s: 0.4; }
  .gg-hero .gg-desk-wrap { --s: 0.46; }
  .gg-hero .gg-phone-wrap { --s: 0.52; }
}
@media (max-width: 460px) {
  .gg-phone-wrap { --s: 0.52; }
  .gg-desk-wrap { --s: 0.33; }
  .gg-hero .gg-desk-wrap { --s: 0.38; }
  .gg-hero .gg-phone-wrap { --s: 0.44; }
}
@media (max-width: 380px) {
  .gg-phone-wrap { --s: 0.46; }
  .gg-desk-wrap { --s: 0.28; }
  .gg-hero .gg-desk-wrap { --s: 0.32; }
  .gg-hero .gg-phone-wrap { --s: 0.38; }
}
