/* 헬록 홍보 페이지 공용 스타일. 색은 앱 tokens.json(light)의 값을 그대로 옮겨 쓴다. */
:root {
  color-scheme: light;
  --background: #FFFFFF;
  --surface: #F5F6F8;
  --inverse: #0B0B0C;
  --on-inverse: #FFFFFF;
  --primary: #FF1053;
  --on-primary: #FFFFFF;
  --primary-soft: #FFE8EE;
  --on-primary-soft: #C2003A;
  --secondary: #4A4F57;
  --text: #1A1C1E;
  --text-muted: #8A8F98;
  --text-disabled: #C5C9D0;
  --border: #E3E5E9;

  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-section: 96px;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-phone: 32px;

  /* 첫 화면과 본문 경계에 걸친 앱 아이콘 한 변 */
  --hero-icon: min(200px, 40vw);
  --radius-pill: 999px;

  /* 움직임 곡선(~/.claude/user_files/MOTION.md 토큰). 들어오는 움직임은 ease-out */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --page: 1080px;
  --gutter: 16px;
  --font: "Pretendard GOV Variable", "Pretendard GOV", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--on-primary-soft); text-underline-offset: 3px; }
a:hover { color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* 상단 이름표: 로고와 앱 이름 */
.brand { display: inline-flex; align-items: center; gap: var(--space-sm); color: inherit; text-decoration: none; font-size: 20px; font-weight: 700; }
.brand svg { width: 40px; height: 40px; flex: none; }

/* 언어 바꾸기 알약: 첫 화면과 처리방침 머리의 오른쪽 위. 손가락으로 누르기 쉽게 높이 44px */
.hero, .doc header { position: relative; }
.lang {
  position: absolute; top: var(--space-md); right: var(--gutter);
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-md);
  border: 1px solid var(--secondary); border-radius: var(--radius-pill);
  color: inherit; font-size: 14px; font-weight: 600; text-decoration: none;
}
/* 처리방침에서는 40px 로고와 같은 줄에 선다 */
.doc .lang { top: 38px; right: 0; }

/* 첫 화면: 앱 운동 화면의 검정 머리 띠를 옮긴 영역 */
/* 글자와 휴대폰 사진을 가운데 한 줄로 쌓는다. 두 줄 제목을 크게 쓰려고 옆 칸 배치를 쓰지 않는다 */
/* 첫 화면은 글자만 화면 높이를 채우고, 휴대폰은 스크롤을 내려야 보인다 */
.hero { background: var(--inverse); color: var(--on-inverse); }
.hero-grid { display: grid; gap: 56px; justify-items: center; text-align: center; }
.hero-text { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 0; }
.hero h1 { margin: 0; font-size: clamp(32px, 9vw, 88px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.hero .lead { margin: var(--space-xl) auto 0; max-width: 34em; font-size: 18px; color: var(--text-disabled); text-wrap: balance; }

/* App Store에서 받기 버튼 */
.store {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  margin-top: var(--space-xxl); min-height: 56px; padding: 0 var(--space-xl);
  border-radius: var(--radius-md); background: var(--primary); color: var(--on-primary);
  font-size: 20px; font-weight: 700; text-decoration: none;
}

/* 앱 운동 화면 머리의 볼륨, 세트, 운동 세 칸을 그대로 빌려 온 약속 세 줄 */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); width: 100%; max-width: 640px; margin: 56px auto 0; padding: 0 var(--space-md); text-align: center; }
.promises dt { font-size: 16px; color: var(--text-muted); }
.promises dd { margin: 4px 0 0; font-size: 18px; color: var(--text-muted); }
.promises b { font-size: clamp(40px, 11vw, 80px); line-height: 1.1; color: var(--on-inverse); font-variant-numeric: tabular-nums; margin-right: 4px; }

/* 999에서 0으로 굴러 내리는 숫자 칸(index.html 맨 아래 스크립트가 만든다).
   투명한 0이 자리 폭과 글자 기준선을 잡고, 그 위에 0~9 띠가 겹쳐 돈다. 띠는 9가 보이는 자리에서 출발한다 */
.odo-col {
  position: relative; display: inline-block; color: transparent;
  /* 줄 높이 1.1em 중 숫자 모양은 위에서 0.18em~0.91em 사이에 있다. 창을 그 둘레로 좁히고 끝을 흐려
     굴러가는 동안 옆 숫자가 덜 보이게 한다 */
  clip-path: inset(0.1em 0);
  mask-image: linear-gradient(transparent 9%, #000 15%, #000 85%, transparent 91%);
}
.odo-strip { position: absolute; top: 0; left: 0; right: 0; color: var(--on-inverse); transform: translateY(calc(-100% + 1.1em)); }
/* 앞 두 자리: 폭을 차지하지 않고 마지막 0의 왼쪽에 겹쳐 붙어, 사라져도 0의 자리가 바뀌지 않는다 */
.promises b { position: relative; display: inline-block; }
.odo-lead { position: absolute; top: 0; right: 100%; white-space: nowrap; }

/* 앱 아이콘: 절반은 검정 첫 화면에, 절반은 흰 본문에 걸친다. 모서리는 아이콘 SVG의 rx 230/1024와 같다 */
.hero-icon-wrap { justify-self: center; width: var(--hero-icon); margin-bottom: calc(var(--hero-icon) / -2); }
.hero-icon { border-radius: 22.46%; box-shadow: 0 24px 48px rgba(11, 11, 12, 0.28); transform-style: preserve-3d; }
.hero-icon img { width: 100%; }

/* 첫 화면 움직임. 움직임 줄이기를 켠 사람에게는 위치 이동과 스크롤 연동을 뺀다(아래 reduce 블록) */
@media (prefers-reduced-motion: no-preference) {
  /* 처음 열 때 제목, 설명, 출시 알약, 약속 칸이 차례로 떠오른다(한 번뿐인 홍보 화면이라 UI보다 길게 600ms) */
  .hero-text > * { animation: hero-rise 600ms var(--ease-out) both; }
  .hero-text > :nth-child(2) { animation-delay: 60ms; }
  .hero-text > :nth-child(3) { animation-delay: 120ms; }
  .hero-text > :nth-child(4) { animation-delay: 180ms; }

  /* 스크롤 연동: 내리는 만큼 글자는 위로 빠지며 흐려지고, 앱 아이콘은 눕혀진 채 올라와 화면 가운데쯤에서 똑바로 선다.
     스크롤 속도가 곧 곡선이라 둘 다 linear로 둔다. 스크롤 타임라인이 없는 브라우저는 이 블록을 건너뛰어 정지 화면 그대로다.
     마우스 기울기(vanilla-tilt)는 안쪽 .hero-icon의 transform을 쓰므로 스크롤 움직임은 바깥 틀에 건다 */
  @supports (animation-timeline: view()) {
    .hero-text { animation: hero-leave linear both; animation-timeline: view(); animation-range: exit 0% exit 80%; }
    .hero-icon-wrap {
      transform-origin: 50% 100%;
      animation: icon-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 50%;
    }
  }
}
/* 움직임 줄이기: 위치 이동은 빼고 글자가 투명도로만 나타난다 */
@media (prefers-reduced-motion: reduce) {
  .hero-text > * { animation: hero-fade 200ms var(--ease-out) both; }
}
@keyframes hero-fade { from { opacity: 0; } }
@keyframes hero-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes hero-leave { to { opacity: 0; transform: translateY(-48px) scale(0.96); } }
@keyframes icon-rise { from { transform: perspective(1000px) translateY(64px) rotateX(24deg) scale(0.9); } }

/* 휴대폰 화면 사진 공통 */
.shot { border-radius: var(--radius-phone); box-shadow: 0 0 0 1px var(--border), 0 24px 48px rgba(11, 11, 12, 0.18); background: var(--background); }

main section { padding: var(--space-section) 0 0; }
/* 첫 절은 경계에 걸친 앱 아이콘 아래 절반만큼 더 띄운다 */
main section:first-child { padding-top: calc(var(--hero-icon) / 2 + var(--space-section)); }

h2 { margin: 0; font-size: clamp(28px, 6vw, 40px); line-height: 1.25; font-weight: 700; }
h3 { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 700; }
.section-lead { margin: var(--space-md) 0 0; max-width: 36em; font-size: 18px; color: var(--secondary); }
p { margin: 0; }

/* 차별점 두 가지 */
.diff { display: grid; gap: var(--space-xxl); margin-top: 48px; align-items: start; }
.diff-items { display: grid; gap: var(--space-xl); }
.diff-item { padding: var(--space-xl); border-radius: var(--radius-lg); background: var(--surface); }
.diff-item p { margin-top: var(--space-xs); color: var(--secondary); }
.diff-item .star { color: var(--primary); letter-spacing: 2px; font-size: 20px; }
.diff .shot { width: min(300px, 78vw); justify-self: center; }

/* 주요 기능: 화면 사진과 설명 */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--space-md); margin: 48px 0 0; padding: 0; list-style: none; }
.features h3 { margin-top: var(--space-lg); }
.features p { margin-top: 4px; color: var(--secondary); }
.features .shot { border-radius: var(--radius-lg); }
.more { display: grid; gap: var(--space-md); margin: 48px 0 0; padding: 0; list-style: none; }
.more li { padding: var(--space-lg) var(--space-xl); border-radius: var(--radius-lg); background: var(--surface); }
.more p { margin-top: 4px; color: var(--secondary); }

/* 기록 저장 방식 */
.storage { margin-top: 48px; padding: 40px var(--space-xl); border-radius: var(--radius-lg); background: var(--primary-soft); }
.storage ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-xl); }
.storage p { color: var(--secondary); margin-top: 4px; }

/* 지원·문의 */
.contact { margin-top: var(--space-xxl); font-size: 20px; font-weight: 700; }
.faq { margin-top: 40px; display: grid; gap: var(--space-sm); }
.faq details { border-radius: var(--radius-md); background: var(--surface); padding: var(--space-md) var(--space-lg); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: var(--space-sm); color: var(--secondary); }

.footer { margin-top: var(--space-section); padding: 40px 0 56px; background: var(--surface); color: var(--secondary); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: var(--space-md) var(--space-xl); align-items: center; justify-content: space-between; }
.footer nav { display: flex; flex-wrap: wrap; gap: var(--space-xl); }
.footer a { color: var(--text); font-weight: 600; }

/* 개인정보 처리방침 본문 */
.doc { max-width: 720px; }
.doc header { padding: 40px 0 0; }
.doc h1 { margin: 48px 0 0; font-size: clamp(30px, 7vw, 40px); line-height: 1.25; }
.doc .date { margin-top: var(--space-sm); color: var(--secondary); }
.doc h2 { margin-top: 48px; font-size: 22px; line-height: 1.4; }
.doc p, .doc ul { margin: var(--space-sm) 0 0; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 4px; }

@media (min-width: 720px) {
  .features { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .more { grid-template-columns: repeat(2, 1fr); }
  .storage ul { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .hero .lead { font-size: 20px; }
  .diff { grid-template-columns: 1fr 320px; }
}
