/* ChatGPT app product page (/chatgpt-app). Builds on product.css (.pr-*); page-only pieces use .cgx-. */

/* ---------- Hero ---------- */
.cgx-hero { padding-top: calc(58px + 28px); }
.cgx-hero h1 { font-size: min(var(--fs-h1, 56px), 52px); }
.cgx-hero .pr-lead { margin-top: 12px !important; }
.cgx-hero .pr-ctas { margin-top: 22px; }
.cgx-hero .pr-note { margin-top: 12px !important; }
.cgx-hero::after { display: none; }
.cgx-hero h1 { margin-top: 14px; }
.cgx-hero .pr-btn img { width: 18px; height: 18px; }

/* Dark ChatGPT app window (real screenshots) */
.cgx-win { margin: 0; overflow: hidden; border-radius: 20px; border: 1px solid rgba(255,255,255,.1); background: #0F0F10; box-shadow: 0 34px 70px -30px rgba(8,12,40,.65), 0 2px 8px rgba(8,12,40,.2); }
.cgx-win img { display: block; width: 100%; height: auto; }
.cgx-bar { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; background: #171718; border-bottom: 1px solid rgba(255,255,255,.07); }
.cgx-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3A3A3C; }
.cgx-bar span { display: inline-flex; align-items: center; gap: 7px; margin-left: 10px; color: #D4D4D8; font-size: 13px; font-weight: 600; }
.cgx-bar span img { width: 14px; height: 14px; filter: invert(1); }


/* ---------- Hero demo video ---------- */
.cgx-hero-vid { margin-top: 28px; }
.cgx-vid { width: min(1040px, calc(100% - 32px)); margin: 44px auto 0; text-align: left; overflow: hidden; border-radius: 22px; border: 1px solid rgba(255,255,255,.1); background: #0F0F10; box-shadow: 0 40px 80px -36px rgba(8,12,40,.7), 0 2px 8px rgba(8,12,40,.2); }
.cgx-player { position: relative; aspect-ratio: 16 / 9; background: #0F0F10; }
.cgx-player video { display: block; width: 100%; height: 100%; object-fit: cover; background: #0F0F10; }
.cgx-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border: 0; padding: 0; cursor: pointer; background: transparent; color: #0F172A; }
.cgx-play svg { box-sizing: content-box; width: 34px; height: 34px; padding: 25px 21px 25px 29px; border-radius: 50%; background: #fff; box-shadow: 0 18px 40px -8px rgba(0,0,0,.55), 0 0 0 10px rgba(255,255,255,.22); transition: transform .25s ease; }
.cgx-play:hover svg, .cgx-play:focus-visible svg { transform: scale(1.07); }
.cgx-play:focus-visible { outline: 3px solid #9AEEAC; outline-offset: -6px; }
.cgx-vid.is-playing .cgx-play { display: none; }

/* ---------- Step picker ---------- */
.cgx-tabs { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; width: var(--pr-w); margin: 52px auto 0; }
.cgx-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cgx-step { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 18px; border: 1px solid transparent; border-radius: 18px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.cgx-step:hover { background: rgba(255,255,255,.6); }
.cgx-step.is-on { background: #fff; border-color: var(--line); box-shadow: 0 18px 34px -26px rgba(15,23,42,.45); }
.cgx-step:focus-visible { outline: 2px solid #3461FF; outline-offset: 2px; }
.cgx-sn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #E4E2DC; color: #334155; font-size: 15px; font-weight: 700; transition: background .2s ease, color .2s ease; }
.cgx-step.is-on .cgx-sn { background: #0F172A; color: #fff; }
.cgx-step-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cgx-step-t b { font-size: 18px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; color: #0F172A; }
.cgx-step-t small { display: none; font-size: 15px; line-height: 1.45; color: #475569; }
.cgx-step.is-on .cgx-step-t small { display: block; }
.cgx-stage { position: relative; height: 520px; overflow: hidden; border-radius: 22px; border: 1px solid rgba(255,255,255,.1); background: radial-gradient(120% 90% at 50% 0%, #26336A 0%, #1A2142 70%); box-shadow: 0 34px 70px -34px rgba(8,12,40,.65); }
.cgx-panel { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 22px; }
.cgx-panel.is-on { display: flex; animation: cgx-in .35s ease both; }
.cgx-panel img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc((520px - 44px - 14px * (var(--n) - 1)) / var(--n)); border-radius: 12px; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 18px 40px -20px rgba(0,0,0,.6); }
.cgx-cap { display: none; }
@keyframes cgx-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cgx-tabs { grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 640px; }
  .cgx-list { flex-direction: row; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
  .cgx-list::-webkit-scrollbar { display: none; }
  .cgx-step { flex: none; width: auto; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: #fff; border-color: var(--line); }
  .cgx-step.is-on { background: #0F172A; border-color: #0F172A; box-shadow: none; }
  .cgx-step.is-on .cgx-step-t b { color: #fff; }
  .cgx-step.is-on .cgx-sn { background: #9AEEAC; color: #0F172A; }
  .cgx-sn { width: 28px; height: 28px; font-size: 13px; }
  .cgx-step-t b { font-size: 14.5px; white-space: nowrap; }
  .cgx-step.is-on .cgx-step-t small { display: none; }
  .cgx-stage { order: 2; height: auto; aspect-ratio: 4 / 4.2; }
  .cgx-panel { gap: 10px; padding: 14px; }
  .cgx-panel img { max-height: calc((100% - 0px) / var(--n)); }
  .cgx-cap { display: block; order: 1; margin: 0 !important; text-align: center; font-size: 16px; line-height: 1.45; color: #475569; }
}
@media (max-width: 640px) {
  .cgx-win, .cgx-vid, .cgx-stage { border-radius: 14px; }
  .cgx-play svg { width: 26px; height: 26px; padding: 18px 14px 18px 22px; box-shadow: 0 14px 30px -8px rgba(0,0,0,.55), 0 0 0 7px rgba(255,255,255,.22); }
}
@media (prefers-reduced-motion: reduce) {
  .cgx-play svg { transition: none; transform: none; }
  .cgx-panel.is-on { animation: none; }
}

/* YouTube player (poster first; the iframe loads only on click) */
.cgx-yt img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cgx-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cgx-ytlink { margin: 16px 0 0; text-align: center; }
.cgx-ytlink a { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: rgba(255,255,255,.86); text-decoration: none; }
.cgx-ytlink a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.cgx-ytlink svg { width: 20px; height: 20px; color: #FF3D3D; }

/* Key facts: tinted cards with an icon, short values */
.cgx-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 1120px; margin: 40px auto 0; padding: 0; }
.cgx-facts div { display: flex; flex-direction: column; gap: 4px; padding: 22px 22px 24px; border-radius: 20px; background: var(--t); transition: transform .2s ease, box-shadow .2s ease; }
.cgx-facts div:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -22px var(--c); }
.cgx-fi { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 14px; background: #fff; color: var(--c); box-shadow: 0 6px 14px -10px var(--c); }
.cgx-fi svg { width: 22px; height: 22px; }
.cgx-facts dt { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.cgx-facts dd { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; color: #0F172A; }
@media (max-width: 1023px) { .cgx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cgx-facts { grid-template-columns: 1fr 1fr; gap: 10px; } .cgx-facts div { padding: 16px; } .cgx-facts dd { font-size: 15px; } }
@media (prefers-reduced-motion: reduce) { .cgx-facts div { transition: none; } }

/* ===== Mobile pass (<=767px) ===== */
@media (max-width: 767px) {
  /* Step viewer: the frame hugs the screenshot instead of a tall dark box around a thin image. */
  /* All slides share one grid cell, so the frame is always as tall as the tallest slide: no jump on autoplay. */
  .cgx-stage { display: grid; aspect-ratio: auto; height: auto; }
  .cgx-panel { position: relative; inset: auto; grid-area: 1 / 1; display: flex; visibility: hidden; gap: 8px; padding: 10px; }
  .cgx-panel.is-on { visibility: visible; }
  .cgx-panel img { max-height: none; }
  /* Smaller play button so the poster headline stays readable. */
  .cgx-play svg { width: 18px; height: 18px; padding: 13px 11px 13px 15px; box-shadow: 0 10px 24px -8px rgba(0,0,0,.55), 0 0 0 5px rgba(255,255,255,.22); }
  /* Key facts: drop the decorative icon tiles, eight cards were a 700px tower. */
  .cgx-fi { display: none; }
  .cgx-facts { margin-top: 28px; }
  .cgx-facts div { padding: 14px 16px; }
}
