/* ===== Enbowl 홈(index) 전용 스타일 — toss.im 구조 ===== */
:root {
  --text: #191F28;
  --sub: #8B95A1;
  --body: #4E5968;
  --orange: #FF7200;
  --orange-deep: #E55F00;
  --gray-bg: #F9FAFB;
  --line: #E5E8EB;
  --paper: #FFFFFF;
  --sk-1: #EAEDF0;
  --sk-2: #F2F4F6;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', -apple-system, sans-serif;
  background: var(--paper); color: var(--text);
  font-weight: 400; line-height: 1.8; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ===== 스크롤 리빌 (초기 숨김은 html.js일 때만 → 무JS/크롤러는 최종상태 노출) ===== */
.js .rv {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.js .rv.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.rd1 { transition-delay: .1s; }
.rd2 { transition-delay: .2s; }
.rd3 { transition-delay: .3s; }
.js .rv-phone {
  opacity: 0; transform: translateY(40px) scale(.96);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
  transition-delay: .3s;
}
.js .rv-phone.in { opacity: 1; transform: none; }

/* ===== nav (헤더) ===== */
.site-nav { background: transparent; }
.nav-inner {
  max-width: 1000px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 22px; font-weight: 800; font-style: italic; letter-spacing: -0.03em; color: var(--orange); }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { font-size: 14px; font-weight: 600; color: var(--body); }
.nav-links a:hover { color: var(--orange); }

/* ===== 1) 히어로 (100vh) ===== */
.hero {
  position: relative; min-height: max(620px, 100vh);
  display: flex; flex-direction: column; overflow: hidden;
  background: #FFFFFF;
}
.hero-content {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 24px 8vh; position: relative; z-index: 3;
}
.hero h1 {
  font-size: clamp(28px, 7vw, 42px); font-weight: 700; letter-spacing: -1.8px;
  line-height: 1.35; color: var(--text);
}
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; justify-content: center; }

/* 스토어 버튼: 히어로/CTA 모두 다크 (#191F28) — app-links.js가 채운 .app-btn 오버라이드 */
.app-dl .app-btn {
  background: #191F28; color: #fff; border-radius: 11px;
  padding: 13px 26px; font-size: 15px; font-weight: 600;
}
.app-dl .app-btn:hover { background: #0D1116; }

/* ===== 히어로 볼 (실제 볼 누끼 이미지) — 흰 배경, 공간감은 그림자만으로 =====
   그림자 튜닝 지점: --sh-rgb(색) / --sh-op(전체 진하기 배수) */
.hero-balls { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; --sh-rgb: 30, 40, 55; --sh-op: 1; }
.hb { position: absolute; width: var(--s); height: var(--s); }
.hb picture { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.hb .hb-img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* 그림자: 볼 크기비율(--r)로 폭·투명도·blur·오른쪽오프셋 계산. 색/진하기는 위 전역 변수 */
.hb-shadow {
  position: absolute; bottom: -5%; left: calc(50% + var(--r) * 6%); transform: translateX(-50%);
  width: calc(75% + var(--r) * 20%); height: calc((75% + var(--r) * 20%) * 0.26); border-radius: 50%;
  background: rgba(var(--sh-rgb), calc((0.13 + var(--r) * 0.17) * var(--sh-op)));
  filter: blur(calc(9px + var(--r) * 12px)); z-index: 0;
}
/* 흰 배경에서 밝은 볼(화이트/아이보리) 경계 살리기 — 이 둘만 (.hb-glow) */
.hb-glow .hb-img { filter: drop-shadow(0 2px 6px rgba(30,40,55,.18)); }

/* ===== 스크롤 화살표 ===== */
.scroll-arrow {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 4; color: #C1C8D0; display: flex; animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(-5px); } 50% { transform: translateX(-50%) translateY(5px); } }

/* ===== 가운데정렬 섹션 (카피 / 통계 / 지공사 / CTA) ===== */
.sec { padding: 88px 32px; }
.sec.gray { background: var(--gray-bg); }
.sec-inner { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow { font-size: 14px; font-weight: 700; color: var(--orange); letter-spacing: -0.02em; margin-bottom: 14px; }
.sec h2 { font-size: clamp(22px, 6vw, 28px); font-weight: 700; letter-spacing: -1.2px; line-height: 1.35; color: var(--text); }
.lede { font-size: 16px; font-weight: 400; color: var(--body); line-height: 1.8; margin-top: 14px; }
.lede.muted { color: var(--sub); }

/* ===== 통계 ===== */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; width: 100%; max-width: 460px; }
.stat { text-align: center; }
.stat .num { font-size: clamp(26px, 8vw, 34px); font-weight: 700; letter-spacing: -1px; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 13px; color: var(--sub); margin-top: 8px; }

/* ===== CTA ===== */
.cta-actions { margin-top: 28px; }

/* ===== 기능 섹션 (4·5·6) 좌우 분할 ===== */
.feat { display: flex; align-items: center; padding: 120px 32px; }
.feat.gray { background: var(--gray-bg); }
.feat.dark { background: #1A1F26; }
.feat.dark .feat-title { color: #FFFFFF; }
.feat.dark .feat-body { color: #98A2B3; }
.feat-grid {
  max-width: 1080px; width: 100%; margin: 0 auto;
  display: grid; grid-template-columns: 45% 55%; gap: 48px; align-items: center;
}
.feat-grid.reverse { grid-template-columns: 55% 45%; }
.feat-grid.reverse .feat-text { order: 2; }
.feat-grid.reverse .feat-phone { order: 1; }
.feat-text { align-self: center; text-align: left; }
.feat-phone { display: flex; justify-content: center; align-items: center; }
.feat-label { font-size: 15px; font-weight: 600; color: var(--orange); }
.feat-title { font-size: clamp(26px, 6vw, 40px); font-weight: 700; letter-spacing: -1.6px; line-height: 1.4; color: var(--text); margin-top: 14px; }
.feat-body { font-size: 17px; font-weight: 400; color: var(--body); line-height: 1.75; margin-top: 36px; }

/* ===== 폰 목업 (300×620, 얇은 프레임) — 실제 앱 스크린샷 ===== */
.phone { width: 300px; height: 620px; background: #2C3138; border-radius: 48px; padding: 6px; box-shadow: 0 24px 70px rgba(0,0,0,.16); margin: 0 auto; }
.scr { position: relative; background: #fff; border-radius: 42px; overflow: hidden; height: 100%; }
.scr picture { display: block; width: 100%; height: 100%; }
.scr-img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

/* ===== footer ===== */
footer { border-top: 1px solid var(--line); padding: 48px 32px; background: var(--paper); }
.foot-inner { max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.foot-brand .logo { display: inline-block; margin-bottom: 8px; }
.foot-brand p { font-size: 13px; color: var(--sub); }
.foot-links { display: flex; gap: 32px; flex-wrap: wrap; }
.foot-col h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.foot-col a { display: block; font-size: 13px; color: var(--sub); margin-bottom: 10px; }
.foot-col a:hover { color: var(--orange); }
.foot-bottom { max-width: 1000px; margin: 36px auto 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--sub); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ===== 반응형 ===== */
@media (max-width: 900px) {
  .feat { padding: 72px 20px; }
  .feat-grid, .feat-grid.reverse { grid-template-columns: 1fr; gap: 36px; }
  .feat-grid.reverse .feat-text { order: 1; }
  .feat-grid.reverse .feat-phone { order: 2; }
  .feat-text { align-self: auto; }
  .phone { width: 260px; height: 540px; }

  /* ── 히어로 볼 모바일 전면 재조정 (index·brand 공통 — .hb/.hero-balls 재사용) ──
     문제: 볼 크기가 px 고정이라 좁은 화면에서 폭의 ~80%를 덮어 제목을 가림.
     해결: ① 크기 vw 기준(가장 큰 볼 ≤38vw, 가장 작은 볼 ~8%)
           ② 노출 7개만(나머지 hide-sm)  ③ 전부 세로 55% 아래(하단 밴드)에만
           ④ 히어로 높이 확보 + 제목/버튼은 상단 정렬 → 볼과 절대 안 겹침 */
  .hero { min-height: max(760px, 100vh); }
  .hero-content { justify-content: flex-start; padding: 13vh 24px 0; }

  .hb.hide-sm { display: none; }                       /* 7개만 남기고 숨김 */
  .hb {                                                 /* 크기: px 고정 → 화면폭 비율 */
    width:  clamp(28px, calc(var(--r) * 38vw), var(--s));
    height: clamp(28px, calc(var(--r) * 38vw), var(--s));
  }
  /* 노출 7개 모바일 좌표: 전부 하단 45% 밴드에 흩뿌림, 일부 가장자리 클립.
     큰 볼일수록 아래(bottom 작게)·작을수록 위. 세로 55% 위로는 올라오지 않음.
     inline left/right/bottom 을 덮어야 하므로 !important. */
  .hb.mp1 { left: 58%  !important; right: auto !important; bottom: 1%  !important; }
  .hb.mp2 { left: 6%   !important; right: auto !important; bottom: -3% !important; }
  .hb.mp3 { left: 34%  !important; right: auto !important; bottom: 15% !important; }
  .hb.mp4 { left: 73%  !important; right: auto !important; bottom: 8%  !important; }
  .hb.mp5 { left: 62%  !important; right: auto !important; bottom: 24% !important; }
  .hb.mp6 { left: 3%   !important; right: auto !important; bottom: 22% !important; }
  .hb.mp7 { left: 37%  !important; right: auto !important; bottom: 32% !important; }
}
@media (max-width: 768px) {
  .sec { padding: 64px 20px; }
  footer { padding: 40px 20px; }
}

/* ===== 모션 최소화: 애니메이션 끄고 최종 상태로 즉시 표시 ===== */
@media (prefers-reduced-motion: reduce) {
  .js .rv, .js .rv-phone { opacity: 1 !important; transform: none !important; }
  .scroll-arrow { animation: none; }
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
