/* Pretendard 서브셋 폰트 — build_landing.py가 페이지 문구로 생성 */
@font-face {
  font-family: 'Pretendard Variable';
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url('pretendard-subset.woff2') format('woff2-variations');
}

:root {
  --bg: #0b0b0d;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.22);
}

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

body {
  background: var(--bg);
  overflow-x: hidden;
  font-family: 'Pretendard Variable', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  color: var(--fg);
  letter-spacing: -1px;
}

#wrapper { width: 100%; overflow: hidden; }

/* 피그마 캔버스: 1000 x 1700 (CTA는 별도 플로팅 레이어) */
#frame {
  width: 1000px;
  height: 1700px;
  position: relative;
  background: var(--bg);
  transform-origin: top left;
  overflow: visible; /* 짧은 화면에서 프레임이 좁아져도 옆 카드가 화면 끝까지 보이도록 */
}

/* ── 콜라보 표기: [파트너 로고] | [알라미] ── */
.lockup {
  position: absolute;
  top: 84px;
  left: 0;
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.lockup .divider { width: 2px; height: 40px; background: var(--line); }
/* 파트너 로고(화이트): inputs/partner-logo.svg */
.lockup .partner { height: 40px; width: auto; display: block; }
/* JP 'おこしてME' 텍스트 표기용 */
.lockup .brand-text { font-size: 38px; font-weight: 800; letter-spacing: 1px; }
/* 알라미 로고(화이트, 여백 잘라낸 viewBox): assets/alarmy-logo.svg */
.lockup .alarmy { height: 48px; width: auto; display: block; }

/* ── 헤드라인 ── */
.headline {
  position: absolute;
  top: 196px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 92px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -3px;
  white-space: nowrap;
}

.sub {
  position: absolute;
  top: 448px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--muted);
}

/* ── 미리보기: 가운데 고정 폰 프레임 + 뒤로 흐르는 영상 트랙 ──
   프레임은 움직이지 않고, 영상 카드들이 한 줄로 프레임을 통과함.
   프레임 바깥은 스포트라이트 마스크(블러 없는 단색 spread)로 어둡게 → 페이드 없이 가운데만 밝음 */
.stage {
  position: absolute;
  top: 588px;
  left: -1000px;
  width: 3000px;
  height: 953px; /* 폰 라인(오프셋 12 + 두께 10)이 잘리지 않도록 위아래 32px 여유 */
  overflow: hidden;
}
.track { position: absolute; inset: 0; }
.preview {
  position: absolute;
  top: 32px;
  left: 1250px;
  width: 500px;
  border-radius: 80px;
  overflow: hidden;
  display: block;
}
.preview img { width: 100%; height: auto; display: block; pointer-events: none; }

.phone {
  position: absolute;
  top: 32px;
  left: 1250px;
  width: 500px;
  height: 889px;
  border-radius: 80px;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 0 0 1200px rgba(11, 11, 13, 0.62);   /* 프레임 밖 어둡게 */
  outline: 10px solid rgba(255, 255, 255, 0.2);       /* 폰 외곽 라인 */
  outline-offset: 12px;
}

/* ── 진행 표시: 3개 세그먼트 (스토리형) — 알람이 3개라는 것과 지금 몇 번째인지 표시 ── */
.progress {
  position: absolute;
  top: 1576px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.progress i {
  position: relative;
  width: 72px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.progress i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}
.progress i.done::after { transform: scaleX(1); }
.progress i.on::after { animation: seg-fill var(--hold, 3680ms) linear forwards; }
@keyframes seg-fill { to { transform: scaleX(1); } }

/* ── 캡션 트랙: 카드와 같이 이동 (가운데 폭으로 클립) ── */
.captions {
  position: absolute;
  top: 1606px;
  left: 220px;
  width: 560px;
  height: 64px;
  overflow: hidden;
}
.cap {
  position: absolute;
  top: 0;
  left: 0;
  width: 560px;
  text-align: center;
  white-space: nowrap;
}
.cap-title {
  display: block;
  font-size: 40px;
  font-weight: 700;
  line-height: 56px;
  letter-spacing: -1px;
}

/* 카드·캡션 전환: 짧고 빠른 슬라이드 (0.32s, 빠르게 출발해 부드럽게 정지) */
.preview, .cap {
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.no-anim { transition: none !important; }

/* ── 하단 플로팅 CTA: ADS 3.0 Bottom Buttons (Primary + Secondary) ──
   스케일 프레임과 분리된 레이어, 고정 px 크기.
   Container: padding 8 24 / gap 8 → 아래는 Home Indicator(safe-area) */
.cta-float {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 8px 24px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.banner,
.mv-link {
  width: 100%;
  max-width: 420px;            /* 태블릿·데스크톱에서 과하게 늘어나지 않게 */
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
}
.banner span,
.mv-link span { padding: 0 6px; }   /* Space/space-6 */

/* Primary — Action/secondary 배경 + fg-on-surface-inverse, ButtonMedium_16 */
.banner {
  height: 52px;
  background: #f50026;  /* 알라미 레드 */
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
/* Secondary — 연회색 버튼 (Primary와 같은 크기) */
.mv-link {
  height: 52px;
  background: #e4e4e7;
  color: #18181b;
  font-size: 16px;
  font-weight: 700;
}
/* 플로팅 CTA에 콘텐츠가 가리지 않도록 하단 여백 확보 */
#wrapper { padding-bottom: calc(144px + env(safe-area-inset-bottom)); box-sizing: content-box; }

/* ── 진입 모션 ── */
.rise { opacity: 0; animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.15s; } .d3 { animation-delay: 0.25s; }
@keyframes rise { from { opacity: 0; margin-top: 24px; } to { opacity: 1; margin-top: 0; } }

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; }
  .preview, .cap { transition: none; }
}
