/* 홈 랜딩 전용. 공통 토큰·헤더 로고는 style.css */

body.home {
  overflow-x: hidden;
  background: linear-gradient(var(--cream), var(--bg) 680px) no-repeat, var(--bg);
}

/* 로고의 코랄 원을 배경 장식으로. 좁은 화면에서는 제목과 겹쳐서 뺀다 */
@media (min-width: 760px) {
  body.home {
    background:
      radial-gradient(circle at 12% 160px, color-mix(in srgb, var(--accent-2) 26%, transparent) 0 120px, transparent 121px),
      radial-gradient(circle at 88% 90px, color-mix(in srgb, var(--accent) 16%, transparent) 0 64px, transparent 65px),
      linear-gradient(var(--cream), var(--bg) 680px) no-repeat,
      var(--bg);
  }
}
body.home main { max-width: none; padding: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 헤더 */
body.home header.site { max-width: 1120px; padding-top: 16px; }
header.site nav { display: none; gap: 24px; margin-left: auto; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 0.93rem; font-weight: 600; }
header.site nav a:hover { color: var(--text); }
header.site .btn-small { margin-left: auto; }

@media (min-width: 760px) {
  header.site nav { display: flex; }
  header.site nav + .btn-small { margin-left: 0; }
}

.btn {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}
.btn-small { padding: 7px 16px; font-size: 0.88rem; }

/* 공통 섹션 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-gradient); }

.section { padding: 72px 0 0; }
.section-head { margin-bottom: 32px; }
.section-title, .home h2 { border: 0; padding: 0; margin: 0; font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.3; letter-spacing: -0.02em; }
.home h3 { margin: 0 0 6px; font-size: 1.15rem; letter-spacing: -0.01em; }
.home em { font-style: normal; color: var(--accent); }

/* 히어로 */
.hero { padding: 48px 0 0; text-align: center; }
.hero h1 { margin: 0 0 16px; font-size: clamp(2rem, 6.4vw, 3.6rem); line-height: 1.22; letter-spacing: -0.035em; font-weight: 800; }
.lead { margin: 0 auto 28px; max-width: 34em; color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.15rem); }
.br-wide { display: none; }
@media (min-width: 560px) { .br-wide { display: inline; } }

.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 156px;
  padding: 9px 20px 10px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}
.store small { font-size: 0.72rem; font-weight: 600; opacity: 0.7; }
.store.is-soon { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); cursor: default; }
.store-note { margin: 12px 0 0; color: var(--muted); font-size: 0.85rem; }

.hero-art { max-width: 1120px; margin: 40px auto 0; padding: 0 16px; }
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(20px, 3vw, 36px);
  box-shadow: 0 30px 60px -30px rgb(255 89 67 / 0.45);
}

/* 11월 제도 변경: 탑승권 모양 */
.ticket {
  --notch: 14px;
  display: grid;
  border-radius: 24px;
  background: var(--soft);
  overflow: hidden;
}
.ticket-stub {
  position: relative;
  padding: 24px 24px 20px;
  background: var(--brand-gradient);
  color: #fff;
}
.ticket-label { margin: 0; font-size: 0.8rem; font-weight: 700; opacity: 0.85; letter-spacing: 0.08em; }
.ticket-date { margin: 2px 0 6px; font-size: clamp(2.6rem, 8vw, 3.4rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ticket-date span { display: block; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.1em; opacity: 0.85; margin-bottom: 6px; }
.ticket-route { margin: 0; font-size: 0.9rem; font-weight: 700; }
.ticket-body { position: relative; padding: 24px; border-top: 2px dashed color-mix(in srgb, var(--accent) 35%, transparent); }
.ticket-body h2 { font-size: clamp(1.3rem, 3.4vw, 1.7rem); margin-bottom: 12px; }
.ticket-body p { margin: 0 0 8px; color: var(--muted); }
.ticket-body strong { color: var(--text); }
/* 절취선 양 끝의 반원 */
.ticket-body::before, .ticket-body::after {
  content: "";
  position: absolute;
  top: calc(var(--notch) * -1 - 1px);
  width: calc(var(--notch) * 2);
  height: calc(var(--notch) * 2);
  border-radius: 50%;
  background: var(--bg);
}
.ticket-body::before { left: calc(var(--notch) * -1); }
.ticket-body::after { right: calc(var(--notch) * -1); }

@media (min-width: 760px) {
  .ticket { grid-template-columns: 260px 1fr; }
  .ticket-stub { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
  .ticket-body { padding: 36px 40px; border-top: 0; border-left: 2px dashed color-mix(in srgb, var(--accent) 35%, transparent); }
  .ticket-body::before, .ticket-body::after { left: calc(var(--notch) * -1 - 1px); right: auto; }
  .ticket-body::before { top: calc(var(--notch) * -1); }
  .ticket-body::after { top: auto; bottom: calc(var(--notch) * -1); }
}

/* 단계 번호 (휴대폰 고정 섹션에서 사용) */
.feature-step { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; font-weight: 700; }
/* 외곽선(text-stroke)은 가변 폰트의 겹친 윤곽(예: 4)까지 그려져서 그라데이션 채움으로 쓴다 */
.feature-step span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

/* 영수증 스캔: 섹션을 길게 두고 무대를 고정한 뒤, 스크롤 진행도(--p, home.js)로 장면을 넘긴다 */
.scan { position: relative; height: 320vh; margin-top: 72px; }
.scan-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  overflow: hidden;
}
.scan-head { width: 100%; }
.scan-body { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }

.receipt {
  --tooth: 8px;
  position: relative;
  padding: 12px 10px 20px;
  background: #fffdf9;
  color: #2b2724;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Pretendard Variable", sans-serif;
  font-size: 0.68rem;
  line-height: 1.5;
  box-shadow: 0 18px 40px -20px rgb(0 0 0 / 0.35);
  transform: rotate(-1.5deg);
  /* 아래쪽 톱니 */
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x;
}
/* style.css의 p, li 글자 크기를 덮어써서 영수증 안에서는 부모 크기를 따른다 */
.receipt :where(p, li) { margin: 0; font-size: inherit; }
.receipt-store { text-align: center; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.08em; }
.receipt-store small { display: block; font-size: 0.62rem; font-weight: 500; letter-spacing: 0; color: #8a837e; }
.receipt-date { margin: 8px 0 6px !important; padding-bottom: 6px; border-bottom: 1px dashed #d8d1cb; color: #8a837e; }
.receipt-items { list-style: none; margin: 0; padding: 0; }
.receipt-items li, .receipt-total, .receipt-tax { display: flex; justify-content: space-between; gap: 8px; padding: 2px 4px; border-radius: 4px; transition: background-color 0.25s, color 0.25s; }
.receipt-items li span, .scan-list li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt-items li b, .scan-list li b { flex-shrink: 0; }
.receipt-items li.is-read { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.receipt-total { margin-top: 6px !important; padding-top: 6px; border-top: 1px dashed #d8d1cb; font-weight: 800; font-size: 0.8rem; }
.receipt-tax { color: #8a837e; }
.receipt-total.is-read, .receipt-tax.is-read { background: color-mix(in srgb, var(--accent) 16%, transparent); }

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--scan, 0) * 100%);
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px 3px color-mix(in srgb, var(--accent) 60%, transparent);
  opacity: var(--scan-on, 0);
}

.scan-result { min-width: 0; padding: 12px; border-radius: 20px; background: var(--soft); }
.scan-result-label { margin: 0 0 8px; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.scan-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 4px; min-height: 9.2em; }
.scan-list li {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.72rem;
  animation: chip-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.scan-refund { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 14px; background: var(--brand-gradient); color: #fff; }
.scan-refund > span { font-size: 0.75rem; font-weight: 700; opacity: 0.9; }
.scan-refund strong { font-size: clamp(1.6rem, 6vw, 2.6rem); line-height: 1.15; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.scan-note { margin: 8px 0 0; color: var(--muted); font-size: 0.68rem; line-height: 1.5; }

@keyframes chip-in {
  from { opacity: 0; transform: translateX(-16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 760px) {
  .scan-stage { gap: 40px; }
  .scan .wrap { max-width: 932px; }
  .scan-body { grid-template-columns: 340px minmax(0, 1fr); gap: 56px; align-items: center; }
  .receipt { padding: 24px 22px 30px; font-size: 0.85rem; }
  .receipt-store { font-size: 1.2rem; }
  .receipt-store small { font-size: 0.75rem; }
  .receipt-total { font-size: 1rem; }
  .scan-result { padding: 28px; border-radius: 28px; }
  .scan-result-label { font-size: 0.9rem; }
  .scan-list li { padding: 8px 12px; font-size: 0.9rem; }
  .scan-refund { padding: 16px 20px; }
  .scan-refund > span { font-size: 0.9rem; }
  .scan-note { font-size: 0.8rem; }
}

/* 휴대폰 고정 + 단계별 화면 전환
   모바일: 휴대폰은 화면 위쪽, 글은 그 아래 영역(--card-top)에 고정하고 단계마다 바꿔 끼운다.
   글이 휴대폰 위로 지나가지 않도록, 앞 글이 밀려 올라가기 시작하면 다음 단계로 넘긴다 (home.js) */
.story {
  --phone-top: 56px;
  --phone-h: 50svh;
  --card-top: calc(var(--phone-top) + var(--phone-h) + 24px);
  position: relative;
  display: grid;
  margin-top: 24px;
}
.story-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  grid-area: 1 / 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: var(--phone-top);
}
.story-steps { grid-area: 1 / 1; list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.story-step { min-height: 70vh; min-height: 70svh; }
.story-step:first-child { margin-top: var(--card-top); }
.story-card {
  position: sticky;
  top: var(--card-top);
  padding: 0 24px;
  transition: opacity 0.3s;
}
/* home.js가 단계를 고르기 시작한 뒤에만 나머지 글을 숨긴다 (스크립트가 없으면 모두 보인다) */
.story.is-ready .story-step:not(.is-active) .story-card { opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0s 0.3s; }
.story-card p:last-child { margin: 0; color: var(--muted); }
.home .story h3 { font-size: clamp(1.3rem, 3.6vw, 1.9rem); line-height: 1.3; margin-bottom: 10px; letter-spacing: -0.025em; }

.phone {
  height: var(--phone-h);
  aspect-ratio: 390 / 844;
  padding: 9px;
  border-radius: 46px;
  background: #1d1a19;
  box-shadow: 0 0 0 1.5px #3a3431 inset, 0 40px 80px -40px rgb(255 89 67 / 0.55);
}
.phone-screen { position: relative; height: 100%; overflow: hidden; border-radius: 38px; background: #fff; }
.screen {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: translateY(calc(var(--shift, 0px) * -1)) scale(0.98);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.screen.is-active { opacity: 1; transform: translateY(calc(var(--shift, 0px) * -1)); }
.screen.is-scrolling { transition: opacity 0.45s ease; }

.story-dots { position: absolute; right: 16px; top: 50%; translate: 0 -50%; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.story-dots li { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: height 0.3s, background-color 0.3s; }
.story-dots li.is-active { height: 22px; border-radius: 3px; background: var(--accent); }

@media (min-width: 760px) {
  .story { grid-template-columns: 1fr 1fr; max-width: 1120px; margin: 24px auto 0; padding: 0 16px; }
  .story-stage { grid-area: 1 / 2; align-items: center; padding-top: 0; }
  .story-steps { grid-area: 1 / 1; }
  .story-step { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
  .story-step:first-child { margin-top: 0; }
  .story-card { position: static; padding: 0; max-width: 440px; transition: opacity 0.4s; }
  .story-step:not(.is-active) .story-card,
  .story.is-ready .story-step:not(.is-active) .story-card { opacity: 0.25; visibility: visible; transition: opacity 0.4s; }
  .phone { height: auto; width: min(30vw, 320px); max-height: 82vh; border-radius: 54px; padding: 11px; }
  .phone-screen { border-radius: 44px; }
  .story-dots { right: 0; }
}

/* 동작 줄이기: 고정·스크럽 없이 최종 장면만 보여 준다 */
@media (prefers-reduced-motion: reduce) {
  .scan { height: auto; }
  .scan-stage { position: static; height: auto; padding: 24px 0; }
  .screen, .story-card { transition: none; }
}

/* 지원 공항: 출발 안내판 */
.board {
  list-style: none;
  margin: 0;
  padding: 8px;
  display: grid;
  gap: 4px;
  border-radius: 22px;
  background: #1d1a19;
  color: #f4f1ef;
}
.board li { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #262221; }
.board b { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.35rem; letter-spacing: 0.12em; color: var(--accent-2); }
.board span { font-weight: 700; }
.board small { color: #a8a29e; font-size: 0.85rem; }

@media (min-width: 760px) {
  .board { grid-template-columns: repeat(2, 1fr); }
}

/* 안심 포인트 */
.promises { list-style: none; display: grid; gap: 12px; margin: 0 auto; }
.promises li { padding: 24px; border: 1px solid var(--line); border-radius: 20px; }
.promises li::before { content: ""; display: block; width: 28px; height: 28px; margin-bottom: 16px; border-radius: 50%; background: var(--brand-gradient); }
.promises p { margin: 0; color: var(--muted); }

@media (min-width: 760px) {
  .promises { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

/* 다운로드 */
.cta { margin-top: 96px; padding: 72px 0 80px; background: var(--brand-gradient); color: #fff; text-align: center; }
.cta-icon { display: block; margin: 0 auto 20px; border-radius: 20px; box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.35); }
.home .cta h2 { color: #fff; margin-bottom: 28px; }
.cta .store.is-soon { color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.6); }
.cta .store:not(.is-soon) { background: #fff; color: #232322; }
.cta .store-note { color: rgb(255 255 255 / 0.85); }

/* 푸터 */
.home-footer { max-width: none; border: 0; padding: 40px 0 48px; }
.home-footer .brand { display: inline-block; margin-bottom: 12px; }
.home-footer p { margin: 4px 0; font-size: 0.85rem; }
.footer-links a { margin-right: 16px; }
.footer-links strong { color: var(--text); }

/* 모션: 첫 화면 순차 등장 + 스크롤 등장 (지원 브라우저만) */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .hero-art { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(n+4) { animation-delay: 0.18s; }
  .hero-art { animation-delay: 0.26s; }

  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* 가이드 카드: 카드 전체를 링크처럼 */
.guides li { position: relative; }
.guides h3 a { color: var(--text); text-decoration: none; }
.guides h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.guides li:hover { border-color: var(--accent); }
.guides li::before { content: "→"; display: grid; place-items: center; color: #fff; font-weight: 800; }

/* 홈 자주 묻는 질문 */
.home-faq > * { max-width: 800px; }
.home-faq summary { padding: 4px 0; font-size: 1.02rem; }
.home-faq details p { color: var(--muted); }
.faq-more { margin: 20px 0 0; color: var(--muted); font-size: 0.92rem; }
