/* ═══ 히어로 ═══════════════════════════════════════════════════
   좌측 텍스트 / 우측 제품 화면. 화면 주변에 사람들이 남긴 말이
   흩어져 있고, 영상 위에도 몇 개가 큼직하게 떠 있다 - 그 말들에
   붙은 시각(방금·어제·3시간 전)이 이 서비스의 정체성이다. */
.hero { position: relative; background: var(--warm);
  padding-top: clamp(26px, 4vh, 52px); padding-bottom: clamp(30px, 5vh, 58px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; right: -12%; top: -18%; width: 84vw; height: 86%;
  background: radial-gradient(48% 56% at 50% 44%, rgba(229,9,20,.09), transparent 68%);
  pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0,.78fr) minmax(0,1.22fr);
  gap: clamp(26px, 3.4vw, 54px); align-items: center;
}
@media (max-width: 1040px) { .hero-grid { grid-template-columns: 1fr; gap: 34px; } }

/* 본문이 항상 위. 화면 영역은 자체 레이어에 갇히므로 그 안의 말풍선이
   어떤 좌표를 갖더라도 왼쪽 텍스트를 덮을 수 없다. */
.hero-copy { position: relative; z-index: 2; }
.hero-right { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(29px, 3.5vw, 47px); line-height: 1.18; letter-spacing: -.042em; }
.hero h1 b { font-weight: 800; color: var(--accent); }
/* 지원 OTT 이름이 들어가는 자리. 이름마다 글자 수가 달라 그냥 바꾸면
   뒤의 '에서'가 튄다. 폭도 함께 전환해 미끄러지듯 이어지게 한다. */
.hero h1 .ott {
  display: inline-block; white-space: nowrap; vertical-align: bottom;
  transition: opacity .26s var(--ease), transform .26s var(--ease), width .3s var(--ease);
}
.hero h1 .ott.swap { opacity: 0; transform: translateY(-.26em); }

/* 지원 범위 고지. 헤드라인에서 다른 서비스 이름이 도는 만큼 바로 아래에
   붙여, 큰 글자만 보고 오해한 채로 넘어가지 않게 한다. */
.hero-beta { display: inline-flex; align-items: center; gap: 8px; margin-top: 15px;
  font-size: 12.5px; color: var(--muted); }
.beta-tag { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .08em;
  padding: 3px 7px; border-radius: 5px; background: rgba(229,9,20,.1); color: var(--accent-d);
  flex: 0 0 auto; }
.hero-sub { margin-top: 20px; font-size: clamp(14.5px, 1.15vw, 16.5px); color: var(--muted);
  max-width: 34ch; line-height: 1.72; }
.hero-cta { margin-top: 30px; }

/* 설치 버튼. 크롬 마크 자체가 이미 원형이라 별도 흰 배지 없이 그대로 올린다. */
.btn--chrome { padding: 15px 26px 15px 18px; font-size: 16px; }
.chrome-ic {
  width: 20px; height: 20px;
  display: grid; place-items: center; flex: 0 0 auto;
}
.chrome-ic img { width: 100%; height: 100%; }
/* 빨간 버튼 위에서만 로고의 빨간 쐐기가 배경에 묻혀 경계가 흐려진다 —
   배지 없이 로고 윤곽을 따라가는 얇은 흰 테두리로 대비만 보정한다. */
.btn--primary .chrome-ic img { filter:
  drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff)
  drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff); }
.hero-note { margin-top: 11px; font-size: 12.5px; color: var(--faint); }

.hero-chips { margin: 22px 0 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px; }
.hero-chips li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  background: var(--raise); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2); white-space: nowrap;
}
.hero-chips svg { color: var(--accent); flex: 0 0 auto; }

/* 화면 주변에 흩어진 말들.
   좌표는 히어로 전체가 아니라 '우측 화면 영역'(.hero-right)을 기준으로
   잡는다. 그래야 왼쪽 본문 텍스트와 구조적으로 겹칠 수 없다. */
.bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 4;
  transition: opacity .3s var(--ease); }
/* 비교 분할선이 살아 있는 동안엔 장식 말풍선을 걷는다 - 화면 가장자리에
   걸친 것이 '원본' 쪽 위에 남아 있으면 비교가 혼탁해진다. */
.hero-right:has(.stage.split-on) .bubbles { opacity: 0; }
.bubble {
  position: absolute; padding: 9px 13px; border-radius: 13px;
  background: var(--raise); border: 1px solid var(--line);
  box-shadow: 0 8px 22px -8px rgba(16,16,24,.22);
  font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap;
  animation: bob 6.5s var(--ease) infinite;
}
.bubble em { display: block; font-style: normal; margin-top: 3px;
  font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--faint); }
@keyframes bob {
  0%,100% { transform: translateY(0) rotate(var(--rot)); }
  50%     { transform: translateY(-8px) rotate(var(--rot)); }
}
/* 화면 위쪽 빈 줄(스위치 왼쪽)과 화면 좌우 가장자리에만 앉힌다.
   가장자리에 걸친 것은 어두운 화면 위에 놓여 오히려 잘 읽힌다. */
.bubble:nth-child(1) { --rot: -2.5deg; left: -3%;  top: -1%;  animation-delay: 0s; }
.bubble:nth-child(2) { --rot: 2deg;    left: -2%;  top: 40%;  animation-delay: .9s; }
.bubble:nth-child(3) { --rot: 1.5deg;  left: -4%;  bottom: 13%; animation-delay: 1.8s; }
.bubble:nth-child(4) { --rot: -2deg;   right: -1%; bottom: 3%;  animation-delay: 2.6s; }
.bubble:nth-child(5) { --rot: -1.5deg; right: 4%;  top: 72%;  animation-delay: 1.3s; }
/* 폭이 줄면 텍스트와 화면 사이 여백이 사라지므로 왼쪽 것부터 접는다. */
@media (max-width: 1340px) { .bubble:nth-child(1), .bubble:nth-child(3) { display: none; } }
@media (max-width: 1140px) { .bubble:nth-child(5) { display: none; } }
@media (max-width: 1040px) { .bubbles { display: none; } }

/* 반짝임 - 밝은 여백이 비어 보이지 않게 아주 절제해서 */
.sparks { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.sparks i { position: absolute; color: rgba(229,9,20,.3);
  animation: twinkle 3.6s var(--ease) infinite; }
@keyframes twinkle { 0%,100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
.sparks i:nth-child(1) { left: 17%; top: 12%; animation-delay: 0s; }
.sparks i:nth-child(2) { right: 8%;  top: 8%;  animation-delay: 1.1s; }
.sparks i:nth-child(3) { left: 15%; top: 78%; animation-delay: 2.2s; }
.sparks i:nth-child(4) { right: 12%; top: 84%; animation-delay: 1.6s; }
@media (max-width: 1040px) { .sparks { display: none; } }

/* 상태 캡슐 - 스위치를 대신한다. 썸(빨간 알약)이 현재 상태 쪽으로
   미끄러지며, 마우스가 플레이어 좌/우 경계를 넘을 때마다 함께 움직여
   '지금 무엇을 보고 있는지'를 말한다. */
.hero-mode { position: relative; z-index: 4; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.hero-mode-hint { font-size: 12.5px; color: var(--faint); }
.hero-mode-caps { position: relative; display: grid; grid-auto-flow: column;
  grid-auto-columns: 1fr; padding: 4px; border-radius: 999px;
  background: var(--raise); border: 1px solid var(--line);
  box-shadow: 0 3px 10px -4px rgba(16,16,24,.16); }
.hero-mode-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px); border-radius: 999px; background: var(--accent);
  box-shadow: 0 4px 12px -4px rgba(229,9,20,.55);
  transition: transform .4s var(--spring), background .3s var(--ease),
              box-shadow .3s var(--ease); }
.hero-mode.is-off .hero-mode-thumb { transform: translateX(100%);
  background: #16161c; box-shadow: 0 4px 12px -4px rgba(0,0,0,.4); }
.hero-mode-seg { position: relative; z-index: 1; padding: 6px 15px; text-align: center;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
  color: var(--muted); transition: color .3s var(--ease); }
.hero-mode:not(.is-off) .hero-mode-seg--rx { color: #fff; }
.hero-mode.is-off .hero-mode-seg--og { color: #fff; }

.hero-screen {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 272px;
  /* 행을 컨테이너 높이(고정 비율)에 못박는다. auto 로 두면 행이 패널
     내용만큼 자라서, 채팅이 쌓일수록 스테이지·이미지가 함께 커져
     cover 이미지가 서서히 확대됐다 채팅 정리 때 되돌아오기를 반복했고,
     끄기(패널 0px)에선 글이 세로로 줄바꿈되며 행이 수천 px 로 터져
     이미지가 특정 영역으로 확대됐다. */
  grid-template-rows: 100%;
  aspect-ratio: 16/8.6; min-height: 330px;
  transition: grid-template-columns .42s var(--ease), box-shadow .5s var(--ease);
}
/* Replix 가 켜져 있으면 화면이 붉게 발광한다 - 상태 전환이 카드의
   기운으로도 읽히는 시각 장치. 꺼지면 .screen 의 기본 그림자로 식는다. */
.hero-screen:not(.off) { box-shadow: 0 2px 4px rgba(16,16,24,.06),
  0 16px 34px -12px rgba(16,16,24,.22), 0 60px 110px -38px rgba(16,16,24,.46),
  0 0 76px -12px rgba(229,9,20,.45); }
.hero-screen .panel { min-height: 0; overflow: hidden; }
@media (max-width: 900px) { .hero-screen { grid-template-columns: 1fr 196px; } }
@media (max-width: 560px) { .hero-screen { grid-template-columns: 1fr 156px; } }

/* ─── 탄막 모드 (HP-123 · HP-240) ─────────────────────────────
   확장 features/danmaku.js 의 실제 스펙을 옮겼다. 레인 4개를 상단
   40% 안에 몰아 자막존과 인물 시선권을 비우고, 탄막마다 속도를 달리
   해서(기준의 0.6~1.6배) 컨베이어벨트처럼 보이지 않게 한다. 진입
   지연은 같은 순간 도착한 채팅이 한 줄로 몰리는 것을 흩는다. */
.dm-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 4; }
.dm {
  position: absolute; left: 100%; top: var(--top, 5%);
  transform: translate(0, var(--jit, 0px));
  white-space: nowrap;
  font-size: 13.5px; font-weight: 700; line-height: 1.25; color: #fff;
  opacity: .92;
  text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 0 7px rgba(0,0,0,.7);
  will-change: transform;
}
.dm.fly { animation: dm-fly var(--dur, 7s) linear var(--delay, 0s) forwards; }
@keyframes dm-fly { to { transform: translate(var(--shift, -140%), var(--jit, 0px)); } }
/* 뒤늦은 스포일러 채점으로 회수될 때 - 블러로 읽기를 먼저 막고 페이드를
   조금 늦게 시작해 여운을 남긴다(확장과 같은 타이밍). */
.dm.retract { transition: filter .2s ease, opacity .55s ease .1s; filter: blur(6px); opacity: 0; }

/* 플레이어 컨트롤 줄 */
.ctrlbar { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.ctrl-ics { display: flex; align-items: center; gap: 11px; color: rgba(255,255,255,.82); }
.ctrl-ics--r { margin-left: auto; }
@media (max-width: 620px) { .ctrl-ics--r { display: none; } }

/* 꺼진 상태 = 원래 화면. 우리가 얹은 것만 걷힌다. */
.hero-screen.off { grid-template-columns: 1fr 0px; }
.hero-screen.off .panel { opacity: 0; }
.hero-screen .panel { transition: opacity .28s var(--ease); }
.hero-screen.off .heat { opacity: 0; height: 0; margin-bottom: 0; }
.hero-screen .heat { transition: opacity .3s var(--ease), height .38s var(--ease), margin-bottom .38s var(--ease); }
.hero-screen.off .floaters, .hero-screen.off .dm-layer { opacity: 0; }
.hero-screen .floaters, .hero-screen .dm-layer { transition: opacity .25s var(--ease); }
.hero-screen.off .timecode em { opacity: 0; }

/* 라이브 수치 스트립 */
.strip {
  background: var(--warm); border-top: 1px solid var(--line);
  padding-block: 26px 28px;
}
/* 2칸으로 줄였다(2026-08-05) — 실데이터로 채울 수 있는 지표가 이 둘뿐이라(하한선 미달 시
   .strip 전체를 숨긴다, js/stats.js) grid 4열을 유지하면 빈 칸 2개가 남는다. */
.strip-in { display: flex; justify-content: center; gap: clamp(40px, 8vw, 96px); }
.stat { display: grid; gap: 4px; text-align: center; }
.stat b { font-size: clamp(21px, 2.3vw, 30px); font-weight: 800; color: var(--ink);
  letter-spacing: -.04em; line-height: 1; }
.stat span { font-size: 13px; color: var(--muted); }
.stat--live b { color: var(--accent); }

/* ═══ 히어로 v18-B: 큰 타이포 + 붉은 후광 (2026-08-12) ═══════════
   기존 .hero(플레이어·비교·버블)를 대체. 카피만 중앙 정렬.
   기존 .hero 스타일은 남겨 두고(감춰진 요소가 git 이력에 있어 되돌릴 수
   있다), 새 .hero-slim 클래스로 분리. */

.hero-slim {
  position: relative; overflow: hidden;
  padding: clamp(80px, 14vh, 160px) 0 clamp(56px, 8vh, 90px);
  text-align: center;
  background: linear-gradient(175deg, var(--warm) 0%, #fef2f2 40%, var(--warm) 100%);
}
.hero-slim h1 {
  font-size: clamp(40px, 7vw, 84px); position: relative; z-index: 1;
  line-height: .98;
}
.hero-slim h1 b { color: var(--accent); }
.hero-slim-sub {
  font-size: clamp(15px, 1.3vw, 19px); color: var(--muted);
  margin-top: 22px; max-width: 480px; margin-inline: auto;
  position: relative; z-index: 1;
}
.hero-slim-cta {
  margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: relative; z-index: 1;
}
.hero-slim .hero-chips { justify-content: center; position: relative; z-index: 1; }
.hero-slim .hero-note { position: relative; z-index: 1; }

.hero-slim-glow {
  position: absolute; left: 50%; top: 20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(229,9,20,.06) 0%, transparent 70%);
  transform: translateX(-50%); pointer-events: none;
}

/* ═══ 제품 소개 섹션 (#intro, 2026-08-12) ═══════════════════════
   히어로에서 내려온 제품 화면 — 영상 + 채팅 패널. */

.intro-head { text-align: center; margin-bottom: 36px; }
.intro-head h2 { font-size: clamp(22px, 3.2vw, 32px); }
.intro-head p { color: var(--muted); font-size: 15px; margin-top: 10px;
  max-width: 520px; margin-inline: auto; }

/* intro-screen 은 base.css 의 .screen + .hero-screen 을 재사용한다.
   hero.js 가 #feed·#floaters·#heat·#splitStage 를 잡아 시뮬레이션을 돌린다. */
.intro-screen { max-width: 960px; margin: 0 auto; }

/* ═══ 원본↔Replix 토글 (2026-08-12) ═══════════════════════════
   세그먼트 컨트롤: [넷플릭스 | Replix]. Replix 가 기본 활성.
   hero.js 가 heroScreen 에 .off 를 토글해 패널·탄막·히트맵을 접는다. */

.hero-toggle {
  display: flex; align-items: center; position: relative;
  width: 220px; height: 38px; margin: 0 auto 24px;
  background: var(--soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 3px; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  -webkit-appearance: none; appearance: none;
}
.hero-toggle-seg {
  flex: 1; text-align: center; position: relative; z-index: 1;
  transition: color .25s var(--ease); line-height: 32px;
}
.hero-toggle-seg--og { color: var(--faint); }
.hero-toggle-seg--rx { color: #fff; }
.hero-toggle-thumb {
  position: absolute; top: 3px; right: 3px;
  width: calc(50% - 3px); height: calc(100% - 6px);
  border-radius: 7px; background: var(--accent);
  box-shadow: 0 2px 8px rgba(229,9,20,.3);
  transition: transform .3s var(--ease);
}
/* 원본 활성 상태 */
.hero-toggle.is-orig .hero-toggle-thumb { transform: translateX(calc(-100% - 3px)); }
.hero-toggle.is-orig .hero-toggle-seg--og { color: #fff; }
.hero-toggle.is-orig .hero-toggle-seg--rx { color: var(--faint); }
.hero-toggle.is-orig .hero-toggle-thumb { background: var(--ink); }

/* hero-screen .off — 패널·탄막·히트맵·이모지가 접힌다 */
.hero-screen.off .panel { width: 0; min-width: 0; padding: 0; border: 0; overflow: hidden;
  transition: width .4s var(--ease), min-width .4s var(--ease), padding .4s var(--ease); }
.hero-screen.off .dm-layer,
.hero-screen.off .floaters,
.hero-screen.off .heat { opacity: 0; transition: opacity .3s var(--ease); }
.hero-screen .panel { transition: width .4s var(--ease), min-width .4s var(--ease), padding .4s var(--ease); }
.hero-screen .dm-layer,
.hero-screen .floaters,
.hero-screen .heat { transition: opacity .3s var(--ease); }

/* 사용자 타이핑 시뮬레이션 — 입력창 활성 + 전송 버튼 */
.panel-input.input-active {
  border-top-color: rgba(229,9,20,.3);
  background: rgba(229,9,20,.04);
  color: var(--s-text);
}
.hero-send {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff;
  margin-left: auto; flex-shrink: 0;
  animation: send-pop .25s var(--ease);
}
@keyframes send-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── 모바일 대응 ── */
@media (max-width: 680px) {
  .intro-screen { max-width: 100%; }
  .hero-screen { grid-template-columns: 1fr 140px; }
  .hero-screen .panel { max-height: 100%; }
  .hero-screen .feed { max-height: 200px; overflow: hidden; }
  .hero-screen .panel-ep,
  .hero-screen .panel-head .ep-chip { font-size: 10px; }
}
@media (max-width: 480px) {
  .hero-slim { padding: clamp(56px, 10vh, 80px) 0 clamp(40px, 6vh, 56px); }
  .hero-slim h1 { font-size: clamp(32px, 9vw, 48px); }
  .hero-slim-sub { font-size: 15px; }
  .hero-chips { flex-wrap: wrap; gap: 10px 16px; font-size: 12px; }

  .hero-toggle { width: 190px; height: 34px; font-size: 12px; }

  .intro-screen { border-radius: 10px; }
  .hero-screen { grid-template-columns: 1fr !important; }
  .hero-screen .panel { display: none; }
  .hero-screen .stage { border-radius: 10px; }
}
