/* ==========================================================================
   BREEZEWINGS — INTERACTIVE ADVERTISING
   page-specific styles only (tokens / nav / footer / lightbox come from core)
   ========================================================================== */

/* ---------- page base ---------- */
body.interactive {
  background: var(--ink);
}

/* tighter vertical rhythm than home: two cases + a game gallery */
body.interactive .section {
  padding-block: clamp(72px, 9vw, 132px);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  background: var(--ink-deep);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
  filter: saturate(0.94) contrast(1.03);
  opacity: 0;
  animation: hero-video-in 1.8s var(--ease) 0.2s forwards;
}

@keyframes hero-video-in {
  to { opacity: 1; }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 7, 9, 0.72) 0%, rgba(7, 7, 9, 0.14) 30%, rgba(7, 7, 9, 0) 55%, rgba(7, 7, 9, 0.88) 100%),
    linear-gradient(90deg, rgba(7, 7, 9, 0.62) 0%, rgba(7, 7, 9, 0.2) 44%, rgba(7, 7, 9, 0) 72%);
}

.hero-glow {
  position: absolute;
  right: 16%;
  top: 34%;
  width: 46vw;
  height: 46vw;
  max-width: 760px;
  max-height: 760px;
  transform: translate(50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 163, 95, 0.14), transparent 62%);
  filter: blur(24px);
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-edge {
  position: absolute;
  inset: clamp(12px, 1.6vw, 24px);
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(243, 239, 232, 0.07);
}

.hero-edge::before,
.hero-edge::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  border-color: rgba(243, 239, 232, 0.32);
  border-style: solid;
}

.hero-edge::before {
  left: -1px;
  top: -1px;
  border-width: 1px 0 0 1px;
}

.hero-edge::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 1px 1px 0;
}

.hero-inner {
  position: relative;
  z-index: 4;
  height: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--nav-h) var(--gutter) clamp(24px, 4vh, 46px);
  display: flex;
  flex-direction: column;
}

.hero-hud {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
}

.hero-hud-top {
  padding-top: clamp(14px, 2vh, 26px);
  color: var(--text-3);
}

.hero-tc,
.hero-rec,
.hero-meta {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

.hero-rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(243, 239, 232, 0.5);
}

.hero-rec i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e0624d;
  box-shadow: 0 0 10px rgba(224, 98, 77, 0.8);
  animation: rec-pulse 2.4s ease-in-out infinite;
}

@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.28; }
}

.hero-meta {
  margin-left: auto;
}

.hero-content {
  margin-top: auto;
  max-width: 1240px;
}

.hero-kicker {
  margin-bottom: clamp(18px, 3.4vh, 38px);
  color: rgba(243, 239, 232, 0.52);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(2.6rem, 8.1vw, 7.8rem);
  line-height: 1.08;
  letter-spacing: 0.07em;
  color: #f7f3ec;
  text-shadow: 0 24px 90px rgba(0, 0, 0, 0.34);
}

.hero-title .line-inner {
  transform: translate3d(0, 115%, 0);
  animation: hero-line-in 1.4s var(--ease) forwards;
  animation-delay: calc(0.22s + var(--d, 0s));
}

@keyframes hero-line-in {
  to { transform: none; }
}

.hero-fade {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  animation: hero-fade-in 1.2s var(--ease) forwards;
  animation-delay: calc(0.6s + var(--d, 0s));
}

@keyframes hero-fade-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(22px, 3.2vh, 34px);
  margin-top: clamp(24px, 4.2vh, 48px);
  max-width: 660px;
}

.hero-desc {
  max-width: 46ch;
  font-size: clamp(0.82rem, 0.95vw, 0.94rem);
  line-height: 1.95;
  color: rgba(243, 239, 232, 0.64);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 30px);
  flex-wrap: wrap;
}

.hero .link-arrow {
  color: rgba(243, 239, 232, 0.72);
}

.hero-hud-bottom {
  justify-content: space-between;
  align-items: flex-end;
  gap: clamp(18px, 3vw, 44px);
  margin-top: clamp(26px, 4vh, 50px);
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: rgba(243, 239, 232, 0.44);
  transition: color 0.4s;
  flex-shrink: 0;
}

.hero-scroll:hover {
  color: var(--gold);
}

.hs-line {
  position: relative;
  display: block;
  width: 68px;
  height: 1px;
  overflow: hidden;
  background: rgba(243, 239, 232, 0.16);
}

.hs-line i {
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  animation: scroll-line 2.6s var(--ease-io) infinite;
}

@keyframes scroll-line {
  0% { transform: translateX(-100%); }
  55% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

.hs-label {
  font-size: 0.56rem;
  letter-spacing: 0.24em;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  white-space: nowrap;
}

.hero-side {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  color: rgba(243, 239, 232, 0.28);
  flex-shrink: 0;
}

/* ---------- case section shell ---------- */
.case-head .head-main {
  gap: clamp(18px, 2.4vw, 26px);
}

.case-head .lead {
  max-width: 40ch;
}

/* ---------- case 01 · sticky phone narrative ---------- */
.narrative {
  display: grid;
  grid-template-columns: minmax(300px, 392px) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 128px);
  align-items: start;
  margin-top: clamp(20px, 4vw, 52px);
}

.narrative-media {
  position: sticky;
  top: calc(var(--nav-h) + clamp(14px, 3vh, 34px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 1.6vh, 18px);
}

.phone-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 163, 95, 0.2), rgba(143, 214, 196, 0.07) 42%, transparent 66%);
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
}

.phone-shell {
  position: relative;
  z-index: 1;
  transition: border-color 0.8s var(--ease), box-shadow 0.8s var(--ease);
  width: min(100%, 340px, calc((100svh - var(--nav-h) - 118px) * 0.461875));
  aspect-ratio: 739 / 1600;
  padding: clamp(7px, 0.7vw, 10px);
  border-radius: clamp(28px, 2.4vw, 40px);
  background: linear-gradient(160deg, #1a1a20 0%, #0a0a0d 58%, #050507 100%);
  border: 1px solid rgba(243, 239, 232, 0.16);
  box-shadow:
    0 48px 120px rgba(0, 0, 0, 0.62),
    0 6px 24px rgba(0, 0, 0, 0.5);
}

.phone-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(150deg, rgba(243, 239, 232, 0.14) 0%, transparent 24%, transparent 78%, rgba(243, 239, 232, 0.05) 100%);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.phone-stack {
  position: absolute;
  inset: clamp(7px, 0.7vw, 10px);
  border-radius: clamp(22px, 2vw, 32px);
  overflow: hidden;
  background: #000;
}

.phone-figure {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.85s var(--ease), transform 1.2s var(--ease);
  pointer-events: none;
  cursor: pointer;
}

.phone-figure.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.phone-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* lead step: warm the frame around the closing CTA moment */
.phone-shell.is-cta {
  border-color: rgba(215, 163, 95, 0.42);
  box-shadow:
    0 48px 120px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(215, 163, 95, 0.16),
    0 0 96px rgba(215, 163, 95, 0.16);
}

.phone-hud {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: clamp(10px, 1.4vh, 16px);
  border-top: 1px solid var(--line-soft);
}

.phone-count {
  color: var(--gold);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
}

.phone-label {
  color: var(--text-3);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
}

.phone-tip {
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  color: var(--text-4);
}

.narrative-steps {
  display: flex;
  flex-direction: column;
  padding-top: clamp(6px, 5vh, 64px);
  padding-bottom: clamp(6px, 5vh, 64px);
}

.n-step {
  min-height: min(72svh, 700px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(28px, 5vh, 56px);
  border-top: 1px solid var(--line-soft);
}

.n-step:first-child {
  border-top-color: transparent;
}

.n-step-media {
  display: none;
}

.n-step-no {
  color: var(--text-4);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  transition: color 0.5s var(--ease);
}

.n-step.is-active .n-step-no {
  color: var(--gold);
}

.n-step-title {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.4vw, 2.4rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.36;
  margin: clamp(14px, 2.2vh, 22px) 0 clamp(12px, 1.8vh, 18px);
  color: var(--text);
}

.n-step-title::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  margin-top: clamp(14px, 2vh, 20px);
  background: var(--gold);
  opacity: 0.75;
  transition: width 0.9s var(--ease);
}

.n-step.is-active .n-step-title::after {
  width: 56px;
}

.n-step-desc {
  max-width: 34em;
  font-size: clamp(0.92rem, 1vw, 1rem);
  line-height: 1.95;
  color: var(--text-2);
}

/* ---------- stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: clamp(26px, 3.4vw, 46px) clamp(12px, 2vw, 30px);
  text-align: center;
  border-left: 1px solid var(--line-soft);
}

.stat:first-child {
  border-left: 0;
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.6vw, 2.5rem);
  letter-spacing: 0.04em;
  color: var(--text);
}

.stat span {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--text-3);
}

/* ---------- case 02 · island ---------- */
.island-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 44px);
  margin-top: clamp(20px, 3vw, 40px);
}

.i-step {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.4vw, 16px);
  padding-top: clamp(18px, 2.2vw, 28px);
  border-top: 1px solid var(--line);
}

.i-step-no {
  color: var(--gold);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
}

.i-step-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.04rem, 1.3vw, 1.3rem);
  line-height: 1.52;
  letter-spacing: 0.04em;
  color: var(--text);
}

.i-step-desc {
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--text-2);
}

.film-shell {
  margin-top: clamp(52px, 8vw, 108px);
}

.film-media {
  position: relative;
}

.film-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  white-space: nowrap;
  border: 1px solid rgba(243, 239, 232, 0.32);
  border-radius: 999px;
  background: rgba(7, 7, 9, 0.58);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease),
    color 0.5s var(--ease), opacity 0.5s var(--ease), visibility 0.5s;
}

.film-play:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(7, 7, 9, 0.72);
}

.film-play.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.fp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  padding-left: 2px;
}

.island-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.film-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

.film-sound {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

.film-sound i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(215, 163, 95, 0.7);
}

/* ---------- island shots ---------- */
.island-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 40px) clamp(18px, 3vw, 48px);
  margin-top: clamp(18px, 2.6vw, 36px);
}

.island-frame {
  display: block;
}

.island-img {
  position: relative;
  overflow: hidden;
  background: #0a0a0c;
  border: 1px solid var(--line-soft);
}

.island-img img {
  width: 100%;
  height: auto;
  filter: saturate(0.96) brightness(0.94);
  transition: transform 1.3s var(--ease), filter 0.8s var(--ease);
}

.island-frame:hover .island-img img {
  transform: scale(1.035);
  filter: saturate(1.04) brightness(1);
}

.island-cap {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 14px;
  padding-bottom: 2px;
}

.ic-no {
  color: var(--gold);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

.ic-title {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--text-2);
}

/* ---------- closing ---------- */
.closing {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.closing-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.closing-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
  filter: brightness(0.26) saturate(0.72);
  transform: scale(1.06);
}

.closing-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 7, 9, 0.9) 0%, rgba(7, 7, 9, 0.5) 32%, rgba(7, 7, 9, 0.92) 100%),
    radial-gradient(62% 52% at 50% 48%, rgba(7, 7, 9, 0.08), rgba(7, 7, 9, 0.76));
}

.closing-inner {
  position: relative;
  padding-block: clamp(100px, 16vh, 200px);
}

.closing-title {
  margin-top: clamp(28px, 4vw, 48px);
  font-weight: 200;
  letter-spacing: 0.05em;
}

.closing-desc {
  margin-top: clamp(24px, 3vw, 36px);
  max-width: 42ch;
}

.closing-actions {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  margin-top: clamp(32px, 4vw, 52px);
  flex-wrap: wrap;
}

.btn-lg {
  padding: 19px 34px;
  font-size: 0.84rem;
}

.closing-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: clamp(64px, 9vw, 130px);
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .narrative {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: clamp(36px, 5vw, 72px);
  }
  .island-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 3.4vw, 44px);
  }
}

@media (max-width: 900px) {
  .hero {
    height: auto;
    min-height: 100svh;
  }
  .hero-inner {
    min-height: 100svh;
  }
  .hero-title {
    font-size: clamp(2.3rem, 10.2vw, 4.1rem);
    line-height: 1.14;
    letter-spacing: 0.05em;
  }
  .hero-meta,
  .hero-side {
    display: none;
  }
  .hero-hud-bottom {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 18px;
    margin-top: clamp(32px, 6vh, 56px);
  }
  .hero-tags {
    order: 3;
    width: 100%;
  }
  .hero-bottom {
    max-width: none;
  }

  .narrative {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: clamp(8px, 3vw, 20px);
  }

  .narrative-media {
    display: none;
  }

  .narrative-steps {
    padding-top: 0;
    padding-bottom: 0;
  }

  .n-step {
    min-height: 0;
    padding-block: clamp(36px, 6vh, 56px);
    border-top: 1px solid var(--line-soft);
  }

  .n-step:first-child {
    border-top-color: var(--line-soft);
  }

  .n-step-media {
    display: block;
    width: min(322px, 86vw);
    margin: 0 auto clamp(24px, 4vh, 36px);
    border-radius: 26px;
    overflow: hidden;
    background: #0a0a0c;
    border: 1px solid var(--line);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.48);
  }

  .n-step-media img {
    width: 100%;
    height: auto;
  }

  .n-step-title {
    font-size: clamp(1.4rem, 5.6vw, 1.9rem);
  }

  .stat-strip {
    grid-template-columns: 1fr 1fr;
    margin-top: clamp(40px, 8vw, 72px);
  }

  .stat {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }

  .stat:nth-child(1),
  .stat:nth-child(2) {
    border-top: 0;
  }

  .stat:nth-child(even) {
    border-left: 1px solid var(--line-soft);
  }

  .island-grid {
    grid-template-columns: 1fr;
  }

  .closing {
    min-height: 80svh;
  }

  .closing-meta {
    margin-top: 56px;
  }
}

@media (max-width: 600px) {
  .hero-kicker {
    margin-bottom: 18px;
  }
  .hero-hud-top {
    gap: 16px;
  }
  .hero-tc {
    font-size: 0.56rem;
  }
  .hero-meta {
    display: none;
  }
  .hero-scroll .hs-label {
    display: none;
  }
  .hs-line {
    width: 44px;
  }
  .tag {
    font-size: 0.54rem;
    padding: 6px 11px;
  }
  .island-steps {
    grid-template-columns: 1fr;
  }
  .film-cap {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .n-step-media {
    width: min(300px, 84vw);
  }
  .phone-tip {
    display: none;
  }
}

/* ---------- playable demos ---------- */
.demo-block {
  margin-top: clamp(48px, 7vw, 96px);
  padding-top: clamp(24px, 3.4vw, 40px);
  border-top: 1px solid var(--line);
}

.demo-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
  padding-bottom: clamp(22px, 3vw, 36px);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: clamp(24px, 3.6vw, 44px);
}

.demo-head-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.4rem, 2.3vw, 2.1rem);
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: var(--text);
}

.demo-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.demo-note {
  max-width: 42ch;
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--text-2);
  text-align: left;
}

.demo-full {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(215, 163, 95, 0.38);
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.4s var(--ease), background-color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.demo-full:hover {
  color: #111009;
  background: var(--gold);
  border-color: var(--gold);
}

.demo-phone-rig {
  display: flex;
  justify-content: center;
}

.demo-frame {
  position: relative;
  overflow: hidden;
  background: #0a0a0c;
  border: 1px solid var(--line);
}

.demo-frame-phone {
  --bez: clamp(7px, 0.7vw, 10px);
  width: min(400px, 100%);
  aspect-ratio: 390 / 844;
  padding: var(--bez);
  border-radius: clamp(28px, 2.4vw, 38px);
  background: linear-gradient(160deg, #1a1a20 0%, #0a0a0d 58%, #050507 100%);
  border-color: rgba(243, 239, 232, 0.16);
  box-shadow: 0 44px 110px rgba(0, 0, 0, 0.6), 0 6px 22px rgba(0, 0, 0, 0.5);
}

.demo-frame-wide {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
}

.demo-frame-phone .demo-cover,
.demo-frame-phone .demo-iframe,
.demo-frame-phone .demo-loading {
  inset: var(--bez);
  border-radius: clamp(20px, 1.8vw, 28px);
  overflow: hidden;
}

.demo-frame-wide .demo-cover,
.demo-frame-wide .demo-iframe,
.demo-frame-wide .demo-loading {
  inset: 0;
}

.demo-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vh, 26px);
  cursor: pointer;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.demo-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.demo-cover-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 7, 9, 0.5) 0%, rgba(7, 7, 9, 0.14) 42%, rgba(7, 7, 9, 0.78) 100%),
    radial-gradient(72% 62% at 50% 46%, rgba(7, 7, 9, 0.08), rgba(7, 7, 9, 0.44));
}

.demo-badge {
  position: absolute;
  top: clamp(14px, 2vw, 22px);
  left: clamp(14px, 2vw, 22px);
  z-index: 2;
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  border: 1px solid rgba(215, 163, 95, 0.4);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(7, 7, 9, 0.4);
}

.demo-cover-note {
  position: absolute;
  bottom: clamp(16px, 2.2vw, 24px);
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-size: 0.54rem;
  letter-spacing: 0.18em;
  color: var(--text-3);
}

.demo-start {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 26px;
  border: 1px solid rgba(243, 239, 232, 0.36);
  border-radius: 999px;
  background: rgba(7, 7, 9, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease),
    background-color 0.45s var(--ease), transform 0.45s var(--ease);
}

.demo-start:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: rgba(215, 163, 95, 0.16);
  transform: translateY(-2px);
}

.ds-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 50%;
  padding-left: 2px;
}

.demo-iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 0;
  background: #05070c;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease);
  z-index: 2;
}

.demo-frame.is-ready .demo-iframe {
  opacity: 1;
  pointer-events: auto;
}

.demo-frame.is-ready .demo-cover,
.demo-frame.is-loading .demo-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.demo-frame.is-error .demo-cover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.demo-loading {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(7, 7, 9, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: var(--text-3);
}

.demo-loading i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: demo-pulse 1.1s ease-in-out infinite;
}

@keyframes demo-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.demo-frame.is-loading .demo-loading {
  opacity: 1;
  visibility: visible;
}

.demo-tip {
  margin-top: 16px;
  text-align: center;
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  color: var(--text-4);
}

/* keep right-aligned captions clear of the fixed chapter rail */
@media (min-width: 1201px) {
  .film-cap {
    padding-right: 64px;
  }
}

@media (max-width: 900px) {
  .demo-block {
    margin-top: clamp(40px, 7vw, 64px);
    padding-top: 24px;
  }
  .demo-head {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
  }
  .demo-head-side {
    align-items: flex-start;
    gap: 16px;
  }
  .demo-frame-phone {
    width: 100%;
  }
  .demo-start {
    padding: 14px 22px;
    font-size: 0.74rem;
  }
  .demo-badge {
    font-size: 0.48rem;
    padding: 5px 10px;
  }
}

@media (max-width: 600px) {
  .demo-cover {
    gap: 14px;
  }
  .demo-start {
    padding: 12px 18px;
    font-size: 0.7rem;
    gap: 10px;
  }
  .ds-icon {
    width: 26px;
    height: 26px;
  }
  .demo-cover-note {
    font-size: 0.5rem;
  }
  .demo-tip {
    font-size: 0.52rem;
  }
  /* 16:9 cover is short on phones: keep just the play button */
  .demo-frame-wide .demo-badge,
  .demo-frame-wide .demo-cover-note {
    display: none;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-video {
    opacity: 1;
    animation: none;
  }
  .hero-title .line-inner,
  .hero-fade {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .hs-line i {
    animation: none;
    transform: none;
  }
}
