/**
 * Gyuni Player — scroll layout (deploy at site root with /assets/img/).
 * Black canvas, scroll-snap sections, reveal-on-scroll (rise from below).
 */

:root {
  --v2-bg: #000000;
  --v2-bg-soft: #0a0a0c;
  --v2-ink: #f2f3f7;
  --v2-muted: rgba(242, 243, 247, 0.72);
  --v2-faint: rgba(255, 255, 255, 0.08);
  --v2-line: rgba(255, 255, 255, 0.12);
  --v2-aqua: #27f0ff;
  --v2-vio: #8a6bff;
  --v2-pink: #ff4bd8;
  --v2-gold: #ffd26a;
  --v2-max: 1120px;
  --v2-pad: clamp(18px, 4vw, 40px);
  --v2-header-h: 56px;
  --v2-reveal-y: 52px;
  --v2-reveal-dur: 0.75s;
  --v2-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Stronger native settling: each section glides into the visual center when scrolling ends. */
html.snap-v2 {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scroll-padding-top: var(--v2-header-h);
}

html.snap-v2.v2-nav-jump {
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
}

/* file:// + Chrome: smooth scroll + hash can confuse opaque-origin navigation; keep native. */
html.snap-v2.v2-file-proto {
  scroll-behavior: auto;
}

@media (prefers-reduced-motion: reduce) {
  html.snap-v2 {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }
}

body.v2-body {
  margin: 0;
  min-height: 100%;
  color: var(--v2-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "SF Pro Display", "Apple SD Gothic Neo", Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: -0.015em;
  background: var(--v2-bg);
  overflow-x: hidden;
}

::selection {
  background: rgba(39, 240, 255, 0.25);
  color: var(--v2-ink);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--v2-aqua);
}

/* ---------- Fixed top bar ---------- */
.v2-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--v2-header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--v2-faint);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.v2-topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  width: 100%;
  max-width: calc(var(--v2-max) + var(--v2-pad) * 2);
  margin: 0 auto;
  padding: 0 var(--v2-pad);
}

.v2-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.v2-brand .mark {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: url("img/GP_icon_32x32.png") center / contain no-repeat;
}

.v2-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  font-weight: 550;
  color: var(--v2-muted);
}

.v2-nav a {
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}

.v2-nav a:hover,
.v2-nav a:focus-visible {
  color: var(--v2-ink);
  border-bottom-color: rgba(39, 240, 255, 0.45);
}

.v2-topbar-extras {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Language switcher (same behavior as classic site.css .lang) */
.v2-topbar .lang {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--v2-line);
  background: linear-gradient(180deg, rgba(10, 12, 20, 0.72), rgba(10, 12, 20, 0.35));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex: 0 0 auto;
}

.v2-topbar .lang-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: rgba(242, 243, 247, 0.82);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.v2-topbar .lang-label {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

.v2-topbar .lang-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--v2-ink);
}

.v2-topbar .lang-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(242, 243, 247, 0.7);
  margin-left: 2px;
}

.v2-topbar .lang-trigger:hover .lang-arrow {
  border-top-color: rgba(242, 243, 247, 0.92);
}

.v2-topbar .lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  min-width: 168px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--v2-line);
  background: linear-gradient(180deg, rgba(10, 12, 20, 0.94), rgba(10, 12, 20, 0.88));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  z-index: 120;
}

.v2-topbar .lang-dropdown a {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: rgba(242, 243, 247, 0.82);
  text-decoration: none;
}

.v2-topbar .lang-dropdown a:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--v2-ink);
}

/* ---------- Snap sections ---------- */
.v2-deck {
  padding-top: var(--v2-header-h);
}

.v2-panel {
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  scroll-margin-top: calc(var(--v2-header-h) + 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0 64px;
  position: relative;
}

.v2-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% 18%, rgba(39, 240, 255, 0.1), transparent 58%),
    radial-gradient(700px 480px at 50% 100%, rgba(138, 107, 255, 0.07), transparent 55%);
  opacity: 0.65;
  transition: opacity 0.6s ease;
}

.v2-panel__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(var(--v2-max) + var(--v2-pad) * 2);
  margin: 0 auto;
  padding: 0 var(--v2-pad);
}

/* ---------- Scroll-driven reveal (Apple-style scrubbed entry) ---------- */
/* No filter:blur on media — scroll timelines often stop short of 100%, leaving screenshots soft. */
@keyframes v2-rise-copy {
  0% {
    opacity: 0;
    transform: translate3d(0, min(11rem, 22vh), 0) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes v2-rise-media {
  0% {
    opacity: 0;
    transform: translate3d(0, min(14rem, 28vh), 0) scale(0.9) rotateX(7deg);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateX(0deg);
  }
}

@keyframes v2-rise-block {
  0% {
    opacity: 0;
    transform: translate3d(0, min(10rem, 20vh), 0) scale(0.93);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes v2-rise-foot {
  0% {
    opacity: 0;
    transform: translate3d(0, 3.5rem, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Reveal motion is driven by site2.js (lerped scroll progress). No view() / IO one-shot. */
@media (prefers-reduced-motion: no-preference) {
  html.v2-js-scrub .v2-panel-grid {
    perspective: 1400px;
  }

  html.v2-js-scrub .reveal-target .v2-copy,
  html.v2-js-scrub .reveal-target .v2-media-col,
  html.v2-js-scrub .reveal-target .v2-dl-card,
  html.v2-js-scrub .reveal-target .v2-info-grid,
  html.v2-js-scrub .reveal-target .v2-foot-card,
  html.v2-js-scrub .reveal-target .v2-credit {
    animation: none !important;
    will-change: transform, opacity;
    opacity: 0;
  }

  html.v2-js-scrub .reveal-target .v2-media-col {
    transform-origin: center center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-target .v2-copy,
  .reveal-target .v2-media-col,
  .reveal-target .v2-dl-card,
  .reveal-target .v2-info-grid,
  .reveal-target .v2-foot-card,
  .reveal-target .v2-credit {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }
}

/* ---------- Panel copy / media grid ---------- */
.v2-panel-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
}

.v2-copy .big-no {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(242, 243, 247, 0.45);
  font-weight: 700;
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--v2-line);
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 16px;
}

.v2-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 750;
  text-wrap: balance;
}

.v2-copy p {
  margin: 0 0 18px;
  color: var(--v2-muted);
  line-height: 1.65;
  font-size: 15px;
  max-width: 58ch;
}

.v2-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.v2-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--v2-line);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(242, 243, 247, 0.85);
  font-size: 12px;
}

.v2-pill i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
}

.v2-pill.aqua i {
  background: rgba(39, 240, 255, 0.65);
  box-shadow: 0 0 16px rgba(39, 240, 255, 0.35);
}
.v2-pill.pink i {
  background: rgba(255, 75, 216, 0.65);
  box-shadow: 0 0 16px rgba(255, 75, 216, 0.28);
}
.v2-pill.vio i {
  background: rgba(138, 107, 255, 0.65);
  box-shadow: 0 0 16px rgba(138, 107, 255, 0.28);
}
.v2-pill.gold i {
  background: rgba(255, 210, 106, 0.7);
  box-shadow: 0 0 16px rgba(255, 210, 106, 0.22);
}

.v2-media-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v2-media-hint {
  font-size: 12px;
  color: rgba(242, 243, 247, 0.55);
}

.v2-stage {
  position: relative;
  border-radius: 0;
  overflow: visible;
}

.v2-stage-media {
  cursor: pointer;
  position: relative;
  transform: translateZ(0);
  transition: transform 0.2s ease;
  -webkit-touch-callout: none;
  user-select: none;
}

.v2-stage-media * {
  -webkit-touch-callout: none;
  user-select: none;
}

.v2-stage-media:focus-visible {
  outline: 3px solid rgba(39, 240, 255, 0.35);
  outline-offset: 6px;
}

.v2-stage-media.is-playing {
  transform: scale(1.02);
  z-index: 30;
}

.v2-stage-media.is-playing .v2-stage-img {
  opacity: 0;
}

.v2-stage-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  opacity: 1;
  border-radius: 0;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.65), 0 14px 36px rgba(0, 0, 0, 0.45);
  filter: saturate(108%) contrast(104%);
  transition: opacity 0.25s ease;
}

.v2-stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.94);
  z-index: 1;
}

.v2-stage-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--v2-line);
  background: rgba(12, 12, 14, 0.75);
  backdrop-filter: blur(12px);
  cursor: pointer;
  z-index: 2;
}

.v2-stage-close::before,
.v2-stage-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  background: rgba(242, 243, 247, 0.9);
  transform-origin: center;
}
.v2-stage-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.v2-stage-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* ---------- Download ---------- */
.v2-panel--download {
  min-height: min(100vh, 920px);
  min-height: min(100dvh, 920px);
  padding: 72px 0 80px;
}

.v2-panel--download .v2-dl-card {
  max-width: 42em;
  margin: 0 auto;
  padding: 36px 32px;
  border-radius: 24px;
  border: 1px solid var(--v2-line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.v2-panel--download h3 {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 750;
}

.v2-dl-lead,
.v2-dl-copy,
.v2-dl-cta {
  margin: 0 0 14px;
  color: var(--v2-muted);
  line-height: 1.6;
  font-size: 15px;
}

.v2-dl-cta {
  font-weight: 600;
  color: rgba(242, 243, 247, 0.88);
}

.v2-dl-cta a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.v2-dl-cta a:hover {
  color: var(--v2-aqua);
}

.v2-dl-store {
  font-size: 0.95rem;
  font-weight: 650;
  color: rgba(242, 243, 247, 0.65);
  margin: 0 0 12px;
}

.v2-dl-badge {
  display: block;
  width: min(426px, 100%);
  height: auto;
  margin-top: 8px;
}

.v2-dl-promo {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 600;
  color: rgba(242, 243, 247, 0.88);
}

/* ---------- Footer ---------- */
/* Footer should settle like other sections. */
.v2-footer {
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0 64px;
  position: relative;
  background: var(--v2-bg);
}

/* Same ambient wash as .v2-panel — avoids a visible seam vs other sections. */
.v2-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% 18%, rgba(39, 240, 255, 0.1), transparent 58%),
    radial-gradient(700px 480px at 50% 100%, rgba(138, 107, 255, 0.07), transparent 55%);
  opacity: 0.65;
  transition: opacity 0.6s ease;
}

.v2-footer .v2-panel__inner {
  max-width: calc(var(--v2-max) + var(--v2-pad) * 2);
}

.v2-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.v2-foot-card {
  padding: 22px 20px;
  border-radius: 18px;
  border: 1px solid var(--v2-line);
  background: rgba(255, 255, 255, 0.03);
}

.v2-foot-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}

.v2-foot-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--v2-muted);
}

.v2-credit {
  margin: 36px 0 0;
  text-align: center;
  font-size: 12px;
  color: rgba(242, 243, 247, 0.4);
}

/* Visually hidden label text (scrim close control) */
.v2-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Mobile nav toggle ---------- */
.v2-nav-check {
  position: fixed;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

.v2-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--v2-line);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  position: relative;
}

.v2-nav-toggle::before,
.v2-nav-toggle::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--v2-ink);
  border-radius: 2px;
}
.v2-nav-toggle::before {
  top: 14px;
}
.v2-nav-toggle::after {
  bottom: 14px;
}

.v2-drawer {
  display: none;
}

@media (max-width: 900px) {
  /* Mobile priority: reliable section navigation over snap behavior. */
  html.snap-v2 {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }

  .v2-topbar .wrap {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 10px 12px;
  }

  .v2-nav-toggle {
    order: 0;
    flex: 0 0 auto;
  }

  .v2-brand {
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
  }

  .v2-nav--desktop {
    order: 2;
  }

  .v2-topbar-extras {
    order: 3;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .v2-panel-grid {
    grid-template-columns: 1fr;
  }

  /* iOS/Safari: 3D perspective + rotateX on the media column often leaves <img> unpainted. */
  html.v2-js-scrub .v2-panel-grid {
    perspective: none;
  }

  html.v2-js-scrub .reveal-target .v2-media-col {
    will-change: auto;
  }

  .v2-stage-img {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  .v2-info-grid {
    grid-template-columns: 1fr;
  }

  .v2-nav-toggle {
    display: block;
  }

  .v2-nav--desktop {
    display: none;
  }

  .v2-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    visibility: hidden;
  }

  #v2-nav:checked ~ .v2-drawer {
    pointer-events: auto;
    visibility: visible;
  }

  .v2-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.22s ease;
    cursor: pointer;
  }

  #v2-nav:checked ~ .v2-drawer .v2-scrim {
    opacity: 1;
  }

  .v2-nav-side {
    position: absolute;
    top: 0;
    right: 0;
    width: min(300px, 86vw);
    height: 100%;
    background: #0e0e12;
    border-left: 1px solid var(--v2-line);
    padding: calc(var(--v2-header-h) + 16px) 20px 24px;
    transform: translateX(100%);
    transition: transform 0.28s var(--v2-reveal-ease);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  #v2-nav:checked ~ .v2-drawer .v2-nav-side {
    transform: translateX(0);
  }

  .v2-nav-side a {
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--v2-faint);
    color: var(--v2-muted);
  }

  .v2-nav-side a:hover {
    color: var(--v2-ink);
  }
}
