/* ==========================================================================
   Calopic Game Studio page
   ========================================================================== */

.page-game { background: var(--bg); }

/* ---- hero ---------------------------------------------------------------- */
.gs-hero {
  position: relative;
  overflow: hidden;
  padding: 118px 0 86px;
  border-bottom: 1px solid var(--stroke);
  background: #070910;
  color: #fff;
  isolation: isolate;
}

/* cinematic scene backdrop: four stills cross-fading with a slow camera push */
.gs-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #070910 url("/assets/gs/gs-01-canyon.webp") center 46% / cover no-repeat;
  pointer-events: none;
}
.no-webp .gs-scene { background-image: url("/assets/gs/gs-01-canyon-fb.jpg"); }
.gs-scene-viewport {
  position: absolute;
  left: -3.5%;
  right: -3.5%;
  top: -9%;
  height: 118%;
  transform: translate3d(0, var(--gs-par, 0px), 0);
  will-change: transform;
}
.gs-scene-layer {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center 46%;
  background-size: cover;
  opacity: 0;
  transform-origin: 50% 52%;
  animation: gs-scene-cycle 36s ease-in-out infinite;
  filter: brightness(1.18) saturate(1.04) contrast(1.02);
}
.gs-scene-1 {
  background-image: url("/assets/gs/gs-01-canyon.webp");
  animation-delay: 0s;
}
.gs-scene-2 {
  background-image: url("/assets/gs/gs-02-night.webp");
  animation-delay: 9s;
}
.gs-scene-3 {
  background-image: url("/assets/gs/gs-03-snow.webp");
  animation-delay: 18s;
}
.gs-scene-4 {
  background-image: url("/assets/gs/gs-05-gorge.webp");
  animation-delay: 27s;
}
/* fallback for browsers without webp */
.no-webp .gs-scene-1 { background-image: url("/assets/gs/gs-01-canyon-fb.jpg"); }
.no-webp .gs-scene-2 { background-image: url("/assets/gs/gs-02-night-fb.jpg"); }
.no-webp .gs-scene-3 { background-image: url("/assets/gs/gs-03-snow-fb.jpg"); }
.no-webp .gs-scene-4 { background-image: url("/assets/gs/gs-05-gorge-fb.jpg"); }

@keyframes gs-scene-cycle {
  0%   { opacity: 0; transform: scale(1.16) translate3d(1.4%, 0.8%, 0); }
  3.4% { opacity: 1; }
  21%  { opacity: 1; transform: scale(1.035) translate3d(0.15%, 0, 0); }
  25%  { opacity: 0; transform: scale(1.01) translate3d(-0.9%, -0.5%, 0); }
  100% { opacity: 0; transform: scale(1.01) translate3d(-0.9%, -0.5%, 0); }
}

/* drifting volumetric haze */
.gs-scene-haze {
  position: absolute;
  inset: -14%;
  background:
    radial-gradient(46% 34% at 22% 74%, rgba(255, 146, 84, 0.17), transparent 68%),
    radial-gradient(42% 32% at 76% 24%, rgba(96, 138, 255, 0.13), transparent 70%);
  filter: blur(34px);
  animation: gs-haze-drift 26s ease-in-out infinite alternate;
}
@keyframes gs-haze-drift {
  from { transform: translate3d(-1.6%, 1%, 0) scale(1.02); }
  to   { transform: translate3d(1.8%, -1.2%, 0) scale(1.06); }
}

.gs-scene-dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.75;
}

/* grade: keeps copy readable, darkens edges, adds brand glow */
.gs-scene-grade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 15, 0.9) 0%, rgba(7, 9, 15, 0.62) 26%, rgba(7, 9, 15, 0.1) 54%, rgba(7, 9, 15, 0.34) 80%, rgba(7, 9, 15, 0.68) 100%),
    linear-gradient(180deg, rgba(7, 9, 15, 0.55) 0%, rgba(7, 9, 15, 0) 32%, rgba(7, 9, 15, 0.34) 74%, #0b0d12 100%),
    radial-gradient(720px 360px at 10% -10%, rgba(232, 112, 42, 0.16), transparent 62%);
}
.gs-hero > .container { position: relative; z-index: 2; }

.gs-hero .gs-title { color: #fff; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45); }
.gs-hero .gs-title em { color: #ff9a5f; }
.gs-hero .gs-lede { color: rgba(255, 255, 255, 0.79); }
.gs-hero .gs-hero-note { color: rgba(255, 255, 255, 0.52); }
.gs-hero .gs-eyebrow { color: #ffa577; }
.gs-hero .gs-eyebrow::before { background: #ffa577; }
.gs-hero .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}
.gs-hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.38);
}
.gs-hero .gs-mock {
  background: rgba(12, 15, 22, 0.82);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.gs-hero .gs-mock-bar { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }
.gs-hero .gs-mock-col { border-color: rgba(255, 255, 255, 0.1); }

@media (prefers-reduced-motion: reduce) {
  .gs-scene-layer { animation: none; opacity: 0; transform: none; }
  .gs-scene-1 { opacity: 1; }
  .gs-scene-haze { animation: none; }
  .gs-scene-dust { display: none; }
  .gs-scene-viewport { transform: none; }
}
.gs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}
.gs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}
.gs-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}
.gs-title {
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.038em;
  font-weight: 640;
  margin: 0 0 22px;
}
.gs-title em { font-style: normal; color: var(--accent); }
.gs-lede {
  font-size: clamp(15px, 1.5vw, 17.5px);
  line-height: 1.68;
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0 0 30px;
}
.gs-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.gs-hero-note {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--text-faint, var(--text-dim));
  opacity: 0.85;
}

/* editor mock */
.gs-mock {
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--panel, var(--bg-soft));
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.gs-mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke);
  background: var(--bg-soft);
}
.gs-mock-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--stroke);
}
.gs-mock-title {
  margin-inline-start: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.gs-mock-body {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 96px;
  min-height: 268px;
}
.gs-mock-col {
  padding: 12px 10px;
  border-inline-end: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gs-mock-col:last-child { border-inline-end: 0; }
.gs-mock-head {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.7;
  margin-bottom: 2px;
}
.gs-mock-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-dim);
  padding: 3px 4px;
  border-radius: 5px;
}
.gs-mock-row.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}
.gs-mock-row i {
  width: 6px; height: 6px; border-radius: 2px;
  background: currentColor;
  opacity: 0.5;
  flex: 0 0 auto;
}
.gs-viewport {
  position: relative;
  background:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 42px 42px,
    radial-gradient(circle at 50% 62%, rgba(232,112,42,.16), transparent 62%),
    var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.gs-viewport svg { width: 62%; height: auto; opacity: 0.9; }
.gs-viewport-tag {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  opacity: 0.65;
}
.gs-mock-field {
  border: 1px solid var(--stroke);
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 10px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.gs-mock-field b { font-weight: 600; color: var(--text); }

/* ---- stats strip --------------------------------------------------------- */
.gs-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--stroke);
}
.gs-stat {
  padding: 34px 30px 34px 0;
  border-inline-end: 1px solid var(--stroke);
}
.gs-stat:last-child { border-inline-end: 0; }
.gs-stat:not(:first-child) { padding-inline-start: 30px; }
.gs-stat b {
  display: block;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.03em;
  font-weight: 620;
  margin-bottom: 6px;
}
.gs-stat span {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ---- generic section ----------------------------------------------------- */
.gs-section {
  padding: 86px 0;
  border-bottom: 1px solid var(--stroke);
}
.gs-head {
  max-width: 760px;
  margin-bottom: 44px;
}
.gs-head h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.028em;
  line-height: 1.12;
  font-weight: 620;
  margin: 0 0 14px;
}
.gs-head p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dim);
}

/* stage cards */
.gs-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.gs-stage {
  padding: 26px 24px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--bg-soft);
}
.gs-stage-num {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
}
.gs-stage h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.gs-stage p { margin: 0; font-size: 13.5px; line-height: 1.66; color: var(--text-dim); }

/* split */
.gs-split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 48px;
  align-items: start;
}
.gs-split h3 {
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 600;
}
.gs-split p { margin: 0 0 18px; color: var(--text-dim); font-size: 14.5px; line-height: 1.7; }
.gs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gs-list li {
  position: relative;
  padding-inline-start: 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}
.gs-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 7px;
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0.75;
}
.gs-list li b { color: var(--text); font-weight: 600; }

/* feature grid */
.gs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.gs-card {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 24px 22px;
  background: var(--bg-soft);
}
.gs-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.012em;
}
.gs-card p { margin: 0; font-size: 13px; line-height: 1.64; color: var(--text-dim); }
.gs-card-tag {
  display: inline-block;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* pipeline */
.gs-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  overflow: hidden;
}
.gs-flow-step {
  padding: 22px 18px;
  border-inline-end: 1px solid var(--stroke);
  background: var(--bg-soft);
}
.gs-flow-step:last-child { border-inline-end: 0; }
.gs-flow-step span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}
.gs-flow-step h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.gs-flow-step p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-dim); }

/* faq */
.gs-faq { display: grid; gap: 0; border-top: 1px solid var(--stroke); }
.gs-faq details {
  border-bottom: 1px solid var(--stroke);
  padding: 20px 0;
}
.gs-faq summary {
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.gs-faq summary::-webkit-details-marker { display: none; }
.gs-faq summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
}
.gs-faq details[open] summary::after { content: "−"; }
.gs-faq p {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.72;
  color: var(--text-dim);
  max-width: 78ch;
}

/* CTA */
.gs-cta {
  padding: 88px 0 100px;
  text-align: center;
  background:
    radial-gradient(700px 320px at 50% 120%, rgba(232, 112, 42, 0.14), transparent 70%);
}
.gs-cta h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  font-weight: 630;
}
.gs-cta p { margin: 0 0 28px; color: var(--text-dim); font-size: 15px; }
.gs-cta .gs-actions { justify-content: center; }

@media (max-width: 1000px) {
  .gs-hero-grid, .gs-split { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .gs-mock-body { grid-template-columns: 92px minmax(0, 1fr); }
  .gs-mock-col:last-child { display: none; }
  .gs-stages, .gs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-flow-step { border-bottom: 1px solid var(--stroke); }
}
@media (max-width: 640px) {
  .gs-hero { padding: 84px 0 56px; }
  .gs-section { padding: 58px 0; }
  .gs-stats { grid-template-columns: minmax(0, 1fr); }
  .gs-stat { border-inline-end: 0; border-bottom: 1px solid var(--stroke); padding: 22px 0; }
  .gs-stat:not(:first-child) { padding-inline-start: 0; }
  .gs-stat:last-child { border-bottom: 0; }
  .gs-stages, .gs-grid, .gs-flow { grid-template-columns: minmax(0, 1fr); }
  .gs-mock-body { grid-template-columns: minmax(0, 1fr); }
  .gs-mock-col:first-child { display: none; }
  .gs-cta { padding: 66px 0 74px; }
}
