/* ==========================================================================
   캐시슬라이드 홈페이지 개편 — 프로토타입 B
   기준 화면: 1440px (Figma). 값 대부분은 Figma 수치 그대로이고,
   좁은 화면에서는 clamp() 와 아래쪽 미디어쿼리로 줄어듭니다.
   ========================================================================== */

:root {
  /* 색 */
  --page: #f7f7f8;            /* Cool Neutral/99 */
  --white: #fff;
  --ink: #171717;
  --label: #171719;           /* Label/Normal */
  --label-neutral: rgb(46 47 51 / .88);
  --sub: #4e4e54;
  --muted: #616161;
  --blue: #2d83e9;
  --yellow: #ffe500;
  --line: #e0e0e0;
  --hairline: #eee;
  --gnb-bg: #171717;
  --gnb-text: #bdbdbd;
  --footer-text: #aeb0b6;     /* Cool Neutral/80 */

  /* 글꼴 */
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --font-app: "Spoqa Han Sans Neo", var(--font);

  /* 치수 */
  --gnb-h: 64px;
  --gutter: 20px;                              /* 화면 가장자리 최소 여백 */
  --section-y: clamp(88px, 11.67vw, 168px);    /* 섹션 위아래 여백 (1440에서 168) */
  --r-xl: clamp(32px, 4.45vw, 64px);           /* 큰 카드 모서리 (1440에서 64) */
  --art-scale: 1;                              /* 혜택 카드 안 그림 배율 (미디어쿼리에서 줄어듦) */
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--gnb-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--page);
  line-height: 1.5; word-break: keep-all; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
em { font-style: normal; color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--yellow); color: var(--ink); font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- 헤더 ---------- */
.gnb { position: sticky; top: 0; z-index: 50; background: var(--gnb-bg); transition: background-color .35s ease; }
.gnb__inner {
  width: min(100%, 1148px); height: var(--gnb-h); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.gnb__logo { display: inline-flex; align-items: center; gap: 8px; justify-self: start; }
.gnb__icon { width: 26px; height: 26px; border-radius: 7px; }
.gnb__wordmark { width: 96.6px; height: 17px; transition: filter .35s ease; }
.gnb__nav { display: flex; gap: 38px; height: 100%; }
.gnb__nav a {
  display: flex; align-items: center; color: var(--gnb-text);
  font-size: 16px; font-weight: 500; letter-spacing: -.17px; transition: color .35s ease;
}
.gnb__nav a:hover, .gnb__nav a[aria-current="true"] { color: #fff; }
.gnb__util { justify-self: end; display: flex; align-items: center; gap: 8px; }
/* 헤더 버튼: 작은 회색 버튼. 높이와 모서리는 앱 아이콘(26px, 7px)과 같게 */
.gnb__cta {
  display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 7px;
  background: rgb(255 255 255 / .16); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: -.17px; white-space: nowrap;
  transition: background-color .35s ease, color .35s ease, transform .2s ease;
}
.gnb__cta:hover { background: rgb(255 255 255 / .24); }
.gnb__cta:active { transform: scale(.97); }
.gnb__menu { display: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; transition: color .35s ease; }
.gnb__menu svg { width: 24px; height: 24px; }
/* 밝은 헤더: 헤더 바로 아래가 흰 배경 섹션일 때 (main.js 가 is-light 를 붙였다 뗌). 히어로 · 푸터 위에서는 어두운 헤더 */
.gnb.is-light { background: var(--white); }
.gnb.is-light .gnb__wordmark { filter: brightness(0); }
.gnb.is-light .gnb__nav a { color: #767676; }
.gnb.is-light .gnb__nav a:hover, .gnb.is-light .gnb__nav a[aria-current="true"] { color: var(--ink); }
.gnb.is-light .gnb__cta { background: rgb(0 0 0 / .06); color: var(--ink); }
.gnb.is-light .gnb__cta:hover { background: rgb(0 0 0 / .1); }
.gnb.is-light .gnb__menu { color: var(--ink); }

/* 모바일 메뉴 */
.drawer {
  position: fixed; inset: 0; z-index: 60; background: var(--gnb-bg); color: #fff; padding: 0 24px 32px;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
}
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer__top { height: var(--gnb-h); display: flex; align-items: center; justify-content: space-between; flex: none; }
.drawer .gnb__menu { display: grid; margin-right: -8px; }
.drawer nav { display: flex; flex-direction: column; margin-top: 24px; }
.drawer nav a { padding: 14px 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
body.is-locked { overflow: hidden; }

/* ---------- 히어로 (시안: 스텝업 강조) ----------
   왼쪽 큰 헤드라인 · 오른쪽 큰 펭귄을 같은 높이 중앙에 둠. 배경은 CSS 로 그린 하늘 · 구름 · 눈밭.
   펭귄 걷기 · 걸음 수 · 동전은 main.js "히어로" */
.hero { position: relative; overflow: hidden; min-height: clamp(520px, 58.06vw, 836px); display: flex; background: #4ec2ff; } /* 그라데이션 없는 하늘색 한 가지 */
.hero__sky { position: absolute; inset: 0; pointer-events: none; }
.hero__ground { position: absolute; left: -20%; right: -20%; bottom: 0; height: 37%; background: #fff; border-radius: 50% 50% 0 0 / 90px 90px 0 0; }
.hero__inner { position: relative; width: min(100% - 2 * var(--gutter), 1152px); margin: 0 auto; display: grid; grid-template-columns: 54fr 46fr; align-items: center; gap: 24px; padding: clamp(72px, 7vw, 100px) 0 clamp(96px, 11.8vw, 170px); } /* 아래 여백을 더 줘서 카피와 펭귄을 눈밭 위쪽으로 올림 */
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero h1 { font-size: clamp(36px, 5vw, 72px); font-weight: 700; line-height: 1.4; letter-spacing: -.035em; color: #111; white-space: nowrap; }
.hero .store-btns { margin-top: clamp(24px, 2.78vw, 40px); padding-top: 0; }
.hero .store-btn--solid { box-shadow: 0 10px 26px -16px rgb(20 80 130 / .5), 0 0 0 1px rgb(20 80 130 / .06); }
/* 오른쪽 무대: 펭귄 하나가 기준 (왼쪽 카피와 세로 중앙이 같음). 동전은 펭귄 둘레에 얹음 */
.hero__stage { display: flex; justify-content: center; align-items: center; }
.hero__walker { position: relative; width: clamp(200px, 22.9vw, 330px); }
/* 펭귄: 파일의 빈 여백을 잘라 낸 범위(main.js 의 PENGUIN_VIEWBOX)와 같은 비율 */
.hero__penguin { position: relative; width: 100%; min-height: 0; aspect-ratio: 475 / 623; }
.hero__penguin svg { position: absolute; inset: 0; display: block; }
/* 캐시 동전: main.js 가 is-pop 을 붙였다 뗌. 동전은 계속 빙글 도는 채로(Lottie 반복)
   한 번에 쭉 솟아오르며 감속하고, 다 올라가기 전에 서서히 사라짐. 세 가지 변화를 따로 돌려 끊김 없이 이어지게 함:
   위치(hero-cash-rise) · 크기(hero-cash-scale) · 투명도(hero-cash-fade). 이동 거리는 동전 크기 기준(%) */
.hero__cash { position: absolute; width: 30%; aspect-ratio: 1; opacity: 0; pointer-events: none; }
.hero__cash--1 { right: -17%; top: 24%; }
.hero__cash--2 { left: -19%; top: 36%; }
.hero__cash--3 { right: -24%; top: 50%; width: 24%; }
.hero__cash.is-pop {
  animation:
    hero-cash-rise var(--cash-time, .8s) cubic-bezier(.16, .84, .3, 1),
    hero-cash-scale var(--cash-time, .8s) cubic-bezier(.2, .8, .2, 1),
    hero-cash-fade var(--cash-time, .8s) linear;
}
@keyframes hero-cash-rise { from { translate: 0 45%; } to { translate: 0 -135%; } }
@keyframes hero-cash-scale { 0% { scale: .25; } 32% { scale: 1.08; } 50% { scale: 1; } 100% { scale: .82; } }
@keyframes hero-cash-fade { 0% { opacity: 0; } 14% { opacity: 1; } 48% { opacity: 1; } 100% { opacity: 0; } }
/* 가운데 정렬 버전 (hero--center): 텍스트 위 · 펭귄 아래로 세로 배치 */
/* 펭귄을 더 내리려고 히어로 높이를 조금 키움 (1440에서 880) */
.hero--center { min-height: clamp(540px, 61.1vw, 880px); }
.hero--center .hero__inner { grid-template-columns: 1fr; justify-items: center; align-content: center; gap: clamp(48px, 8.06vw, 116px); padding: clamp(72px, 8.9vw, 128px) 0 clamp(20px, 1.95vw, 28px); } /* 텍스트 위 여백을 넉넉히 */
.hero--center .hero__copy { align-items: center; text-align: center; }
.hero--center h1 { font-size: clamp(34px, 4.45vw, 64px); font-weight: 800; line-height: 1.28; color: #fff; }
/* 헤드라인 두 줄, 스토어 버튼 없음 */
.hero--center .store-btns { display: none; }
.hero--center .hero__walker { width: clamp(190px, 22.9vw, 330px); }
.hero--center .hero__ground { height: 25%; }
/* 구름은 헤드라인 높이를 피해서 지나감: 두 개는 헤드라인 위, 하나는 헤드라인과 펭귄 사이 */
/* 등장: 카피가 차례로 떠오름 */
.js .hero__copy > * { opacity: 0; translate: 0 22px; animation: hero-in .9s var(--ease) forwards; }
.js .hero__copy > :nth-child(2) { animation-delay: .12s; }
@keyframes hero-in { to { opacity: 1; translate: 0 0; } }

/* ---------- 섹션 공통 ---------- */
.section { padding: var(--section-y) var(--gutter); }
.section--white { background: var(--white); }

/* 52px 타이틀 두 종류: 줄 높이·자간만 다름 (Figma 값) */
.headline, .section-title {
  font-size: clamp(28px, 3.62vw, 52px); font-weight: 700; text-align: center; color: var(--ink);
}
/* 좁은 화면에서만 켜지는 줄바꿈 */
.br-narrow { display: none; }
/* 한 덩어리로 붙어 다니는 구절: 덩어리 사이에서만 줄이 바뀜 */
.keep { display: inline-block; }
.headline { line-height: 1.45; letter-spacing: -.03em; }
.section-title { line-height: 1.38; letter-spacing: -.022em; }

/* 앱 아이콘 + 이름 */
.app-name { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 700; line-height: 29.7px; letter-spacing: -.17px; }
.app-name img { width: 36px; height: 36px; border-radius: 9.9px; }

/* 스크롤 등장 (JS 가 켜져 있을 때만 숨겨 둠) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .12s; }

/* ---------- 브랜드 소개 · 앱 카드 ---------- */
.apps { padding-top: 0; }
.apps .headline { padding: var(--section-y) 0 clamp(72px, 10.28vw, 148px); }
.apps__grid { width: min(100%, 1152px); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.app-card { border-radius: 38px; overflow: hidden; background: var(--page); display: flex; flex-direction: column; }
/* 이미지 비율(1129×1076)을 그대로 지켜서 어떤 폭에서도 잘리지 않게 함 */
.app-card__media { position: relative; aspect-ratio: 1129 / 1076; background: var(--panel); overflow: hidden; }
.app-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.app-card__body { flex: 1; padding: 52px 52px 60px; display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.app-card__copy { display: flex; flex-direction: column; gap: 16px; }
.app-card__copy h3 { font-size: 36px; font-weight: 700; line-height: 49.68px; letter-spacing: -.792px; }
.app-card__copy p { font-size: 17px; font-weight: 500; line-height: 28.05px; letter-spacing: -.255px; color: var(--sub); }

.store-btns { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--white); color: var(--ink);
  font-size: 18px; font-weight: 600; line-height: 29.7px; letter-spacing: -.36px; white-space: nowrap;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.store-btn:hover { border-color: #bdbdbd; box-shadow: 0 6px 18px -10px rgb(0 0 0 / .25); transform: translateY(-1px); }
.store-btn:active { transform: none; }
.store-btn__icon { flex: none; width: 24px; height: 24px; display: grid; place-items: center; }
.store-btn__icon img { max-width: none; }
/* 어두운 카드 위에 놓이는 테두리 없는 흰 버튼 (제품 카드) */
.store-btn--solid { padding: 10px 18px 10px 16px; border: 0; }
.store-btn--solid:hover { box-shadow: 0 8px 22px -10px rgb(0 0 0 / .6); }

/* ---------- 혜택 ---------- */
.benefits { padding-bottom: clamp(120px, 16.67vw, 240px); }
.benefits__list { width: min(100%, 1160px); margin: clamp(48px, 5.56vw, 80px) auto 0; display: flex; flex-direction: column; gap: 40px; }
.benefit { background: var(--white); border-radius: var(--r-xl); padding: clamp(16px, 2.78vw, 40px); }
.benefit__panel {
  position: relative; overflow: hidden; height: calc(490px * var(--art-scale));
  border-radius: clamp(22px, 3.47vw, 50px); background: var(--panel);
}
.benefit__desc { padding: clamp(24px, 2.78vw, 40px) clamp(8px, 3.47vw, 50px) clamp(12px, 2.08vw, 30px); display: flex; flex-direction: column; gap: 4px; }
.benefit__desc h3 { font-size: clamp(21px, 2.23vw, 32px); font-weight: 700; line-height: 1.5; letter-spacing: -.0282em; color: var(--label); }
.benefit__desc p { font-size: clamp(15px, 1.53vw, 22px); font-weight: 500; line-height: 1.5; letter-spacing: -.0282em; color: var(--label-neutral); }
/* 첫 카드만 한 단계 큰 글자 (Figma 값) */
.benefit--lead .benefit__desc { gap: 7px; }
.benefit--lead .benefit__desc h3 { font-size: clamp(22px, 2.5vw, 36px); }
.benefit--lead .benefit__desc p { font-size: clamp(16px, 1.67vw, 24px); }

/* 패널 안 그림: Figma 의 1080×490 좌표를 그대로 쓰고 통째로 배율만 줄임 */
.art {
  position: absolute; left: 50%; top: 50%; width: 1080px; height: 490px;
  translate: -50% -50%; scale: var(--art-scale);
}

/* 매일로또 */
.lotto__label { position: absolute; left: 0; right: 0; top: 46.1px; text-align: center; font-size: 18px; line-height: 25.49px; letter-spacing: -.4634px; color: #242424; }
.lotto__amount { position: absolute; left: 0; right: 0; top: 78.67px; text-align: center; font-size: 42px; font-weight: 700; line-height: 50.979px; letter-spacing: -.6952px; color: #000; font-variant-numeric: tabular-nums; }
.lotto__img { position: absolute; left: 50%; top: calc(50% + 59.77px); width: 358.4px; height: 358.4px; translate: -50% -50%; }
.lotto__fallback, .lotto__layer { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.lotto__img.is-ready .lotto__fallback { display: none; }

/* 퀴즈 */
.quiz__emoji { position: absolute; left: 50%; top: calc(50% - 83px); width: 192px; height: 168px; translate: -50% -50%; overflow: hidden; }
.quiz__fallback { position: absolute; left: -52.45%; top: -98.52%; width: 186.75%; height: 211.86%; max-width: none; }
/* 얼굴 애니메이션(Lottie, 1000×1000 판)을 이모지 자리에 맞춰 얹음. 크기·위치는 --face-* 로 조절 */
.quiz__face { position: absolute; left: 50%; top: 50%; width: var(--face-size, 118%); aspect-ratio: 1; translate: calc(-50% + var(--face-x, 0px)) calc(-50% + var(--face-y, 0px)); }
.quiz__emoji.is-ready { overflow: visible; }
.quiz__emoji.is-ready .quiz__fallback { display: none; }
.quiz__line { position: absolute; left: 0; right: 0; top: 286.41px; text-align: center; font-size: 35.42px; font-weight: 700; line-height: 48.3px; letter-spacing: -.805px; color: #17171a; white-space: nowrap; }
.quiz__line--blank { top: 345.55px; display: flex; align-items: center; justify-content: center; gap: 6.44px; }
.quiz__blanks { display: flex; gap: 6.44px; }
/* 빈칸: 46px 자리에 테두리가 바깥으로 살짝(3.13%) 나오는 그림 */
.quiz__blank { position: relative; flex: none; width: 46px; height: 46px; }
.quiz__blank img { position: absolute; inset: -3.13%; width: 106.26%; height: 106.26%; max-width: none; }

/* 럭키빙고 — 404×404 판, 124 칸 9개(간격 16). 상태는 .bingo 에 붙는 클래스로 바뀜:
   (없음) 아이콘 판 → is-filled 9칸 체크 → is-lined 줄 8개 → is-finale 판 전체가 한 번 통통.
   칸마다 --d(채워지는 순서 지연), 줄마다 --ld(그어지는 순서 지연)를 main.js 가 넣어 줌 */
.bingo {
  position: absolute; left: 50%; top: 50%; width: 404px; height: 404px; translate: -50% -50%;
  display: grid; grid-template-columns: repeat(3, 124px); gap: 16px;
}
/* 마무리: 판 전체가 한 번 통통. 맨 처음 버전(0.7초)에서 길이만 늘림 */
.bingo.is-finale { animation: bingo-finale 1.1s var(--ease); }
@keyframes bingo-finale { 35% { scale: 1.035; } }
/* 줄: 칸 아래에 깔려 있어 칸 사이 틈으로만 보임. 위치는 Figma 값.
   그어지는 방향: 가로줄은 왼쪽→오른쪽, 세로줄은 위→아래, 대각선 두 개는 위쪽 모서리에서 아래로 */
.bingo__line { position: absolute; }
.bingo__line::before {
  content: ""; position: absolute; inset: 0; background: var(--blue);
  transition: transform .68s cubic-bezier(.4, 0, .2, 1) var(--ld, 0s);
}
.bingo__line--h1, .bingo__line--h2, .bingo__line--h3 { left: 0; width: 404px; height: 6px; }
.bingo__line--h1::before, .bingo__line--h2::before, .bingo__line--h3::before { transform: scaleX(0); transform-origin: left; }
.bingo__line--h1 { top: 51px; }
.bingo__line--h2 { top: 199px; }
.bingo__line--h3 { top: 339px; }
.bingo__line--v1, .bingo__line--v2, .bingo__line--v3 { top: 0; width: 6px; height: 404px; }
.bingo__line--v1::before, .bingo__line--v2::before, .bingo__line--v3::before { transform: scaleY(0); transform-origin: top; }
.bingo__line--v1 { left: 60px; }
.bingo__line--v2 { left: 200px; }
.bingo__line--v3 { left: 342px; }
/* 대각선: 바깥 틀을 돌려 놓고 안쪽 막대만 한쪽 끝에서 늘림 */
.bingo__line--d1, .bingo__line--d2 { left: 50%; top: 50%; width: 404px; height: 6px; translate: calc(-50% - .04px) calc(-50% + .29px); }
.bingo__line--d1 { rotate: -45deg; }   /* 오른쪽 위 → 왼쪽 아래 */
.bingo__line--d1::before { transform: scaleX(0); transform-origin: right; }
.bingo__line--d2 { rotate: 45deg; }    /* 왼쪽 위 → 오른쪽 아래 */
.bingo__line--d2::before { transform: scaleX(0); transform-origin: left; }
.bingo.is-lined .bingo__line::before { transform: none; }
/* 칸: 아이콘이 작아지며 사라지는 동안 체크가 올라오고(둘이 겹침), 테두리가 천천히 들어옴.
   한 칸의 변화(약 0.7초)가 칸 사이 간격(--d)보다 길어서 옆 칸과 맞물려 이어짐 */
.bingo__box {
  position: relative; width: 124px; height: 124px; padding: 12px 9.95px 10px;
  border: 4px solid transparent; border-radius: 24.875px; background: var(--white);
  display: grid; place-items: center;
  transition: border-color .5s ease var(--d, 0s);
}
.bingo.is-filled .bingo__box { border-color: var(--blue); animation: bingo-pop .7s cubic-bezier(.4, 0, .2, 1) var(--d, 0s) backwards; }
@keyframes bingo-pop { 0% { scale: 1; } 42% { scale: 1.06; } 100% { scale: 1; } }
.bingo__icon { flex: none; position: relative; transition: opacity .32s ease var(--d, 0s), scale .42s cubic-bezier(.4, 0, .6, 1) var(--d, 0s); }
img.bingo__icon { max-width: none; }
.bingo__icon img { position: absolute; max-width: none; }
.bingo__icon--lotto { width: 93px; height: 93px; }
.bingo__icon--lotto img { left: 12.33%; top: 24.34%; width: 74.44%; height: 48.38%; }
.bingo__icon--flower { width: 68px; height: 68px; }
.bingo__icon--flower img { left: 8.82%; top: 10.29%; width: 82.36%; height: 79.93%; }
.bingo__icon--button { width: 98px; height: 98px; overflow: hidden; }
.bingo__icon--button img { left: calc(50% + .32px); top: 27.38px; width: 59.053px; height: 43.235px; translate: -50% 0; }
.bingo.is-filled .bingo__icon { opacity: 0; scale: .5; }
.bingo__check {
  position: absolute; left: 29.96px; top: calc(50% - .15px); width: 59.7px; height: 59.7px; max-width: none; translate: 0 -50%;
  opacity: 0; scale: .55;
  /* --check-lag: 아이콘이 사라지기 시작한 뒤 체크가 올라오기까지 (main.js 의 BINGO_CHECK_LAG 와 같은 값) */
  transition: opacity .3s ease calc(var(--d, 0s) + var(--check-lag, .14s)), scale .6s cubic-bezier(.34, 1.36, .64, 1) calc(var(--d, 0s) + var(--check-lag, .14s));
}
.bingo.is-filled .bingo__check { opacity: 1; scale: 1; }
/* 한 바퀴 끝나고 아이콘 판으로 돌아갈 때는 순서 없이 한꺼번에 부드럽게 */
.bingo.is-rewinding .bingo__line::before, .bingo.is-rewinding .bingo__box, .bingo.is-rewinding .bingo__icon, .bingo.is-rewinding .bingo__check {
  transition-delay: 0s; transition-duration: .45s; transition-timing-function: ease; animation: none;
}

/* 게임 카드 */
.benefit__panel--games { display: flex; align-items: center; }
.games { --gap: calc(28.596px * var(--art-scale)); }
.game-card {
  position: relative; flex: none; overflow: hidden;
  width: calc(271.66px * var(--art-scale)); height: calc(336px * var(--art-scale));
  border-radius: calc(25.021px * var(--art-scale));
}
.game-card--blue { background: #62adff; }
.game-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-card p {
  position: absolute; left: calc(21.45px * var(--art-scale)); bottom: calc(21.45px * var(--art-scale));
  display: flex; flex-direction: column; color: #fff; font-family: var(--font-app); font-weight: 700;
  font-size: calc(28.596px * var(--art-scale)); line-height: 1.5; letter-spacing: -.025em; white-space: nowrap;
}
.game-card p span + span { margin-top: -.1875em; }

/* ---------- 혜택 카드: 좌우 분할 버전 (기본) ----------
   왼쪽 설명 520 · 오른쪽 그림 632, 높이 700 (Figma "서비스 스토리 카드") */
.benefit__split { display: none; }
.benefits--split { background: var(--white); }
.benefits--split .benefits__list { width: min(100%, 1152px); margin-top: clamp(56px, 8.34vw, 120px); gap: clamp(32px, 5.56vw, 80px); }
.benefits--split .benefit {
  display: grid; grid-template-columns: 520fr 632fr; padding: 0; overflow: hidden;
  border-radius: clamp(28px, 3.47vw, 50px); background: var(--white);
}
.benefits--split .benefit__desc { display: none; }
/* 설명: 연회색 바탕에 파란 제목 + 큰 본문(문단 1~2개). 줄바꿈은 index.html 의 <br> 위치 그대로 */
.benefits--split .benefit__split { display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 120px 40px 160px 70px; background: var(--page); }
.benefit__split h3 { font-size: clamp(24px, 2.5vw, 36px); font-weight: 700; line-height: 1.5; letter-spacing: -.0282em; color: var(--blue); }
.benefit__split-body { display: flex; flex-direction: column; gap: 28px; }
.benefit__split p { font-size: clamp(23px, 2.78vw, 40px); font-weight: 700; line-height: 1.5; letter-spacing: -.0282em; color: var(--label); white-space: nowrap; }
.benefits--split .benefit__panel { height: calc(700px * var(--art-scale)); border-radius: 0; background: var(--panel-split, var(--panel)); }
/* 그림 크기 · 위치도 분할 카드 기준 값으로 */
.benefits--split .lotto__label { top: -34.85px; font-size: 23.172px; line-height: 36.414px; letter-spacing: -.6621px; }
.benefits--split .lotto__amount { top: 7.39px; font-size: 60px; line-height: 72.828px; letter-spacing: -.9931px; color: #242424; }
.benefits--split .lotto__img { top: calc(50% + 85.39px); width: 512px; height: 512px; }
.benefits--split .quiz__emoji { top: calc(50% - 93.24px); width: 220.247px; height: 191.519px; }
.benefits--split .quiz__line { top: 288.41px; }
.benefits--split .quiz__line--blank { top: 347.55px; }

/* ---------- 혜택 카드 집중 ----------
   화면 중앙에 가장 가까운 카드에 JS 가 is-active 를, 목록에 has-focus 를 붙임 → 나머지 카드는 사라짐.
   그 카드가 화면 중앙에 정확히 도착하는 순간 is-playing 이 붙고, 그때 그림 모션이 시작됨 */
.js .benefit { transition: opacity .5s ease, transform .9s var(--ease), scale .6s var(--ease); }
.js .benefits__list.has-focus .benefit:not(.is-active) { opacity: 0; scale: .97; pointer-events: none; }

/* 스크롤 걸림: 마우스 · 트랙패드는 main.js "혜택 카드 스크롤 걸림"에서 처리.
   터치 기기는 브라우저 기본 스냅을 씀 (손가락을 뗀 곳이 카드 중앙 근처면 중앙에 맞춰짐) */
@media (hover: none) and (pointer: coarse) {
  html { scroll-snap-type: y proximity; }
  .benefit { scroll-snap-align: center; }
}
.js .benefit.reveal { transform: none; } /* 카드는 위치 이동 없이 서서히 나타나기만 함 (중앙 계산이 어긋나지 않게) */

/* 에셋 등장: 카드가 중앙에 도착(is-playing)하면 패널 안 그림이 아래에서 떠오르며 나타나고, 벗어나면 다시 사라짐 */
.js .benefit__panel > * { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .9s var(--ease); }
.js .benefit.is-playing .benefit__panel > * { opacity: 1; transform: none; }

/* 매일로또: 카드 애니메이션 반복과 당첨금 카운트업은 main.js. 한 바퀴 끝나고 다시 시작할 때 카드가 잠깐 사라졌다 나타남 */
.lotto__img { transition: opacity .25s ease; }
.lotto__img.is-swapping { opacity: 0; }

/* 퀴즈: 얼굴 이모지는 Lottie 가 반복 재생(main.js), 빈칸은 차례로 통통 튐 (반복) */
.js .benefit.is-playing .quiz__blank { animation: blank-pulse 2.4s ease-in-out infinite; }
.js .benefit.is-playing .quiz__blank:nth-child(1) { animation-delay: .9s; }
.js .benefit.is-playing .quiz__blank:nth-child(2) { animation-delay: 1.15s; }
.js .benefit.is-playing .quiz__blank:nth-child(3) { animation-delay: 1.4s; }
@keyframes blank-pulse { 0%, 30%, 100% { translate: 0 0; } 15% { translate: 0 -7px; } }

/* 럭키빙고: 채워지는 순서와 반복은 main.js "럭키빙고" */

/* 게임마당: 카드가 중앙에 도착한 뒤에만 흐름 (계속 반복) */
.js .benefit:not(.is-playing) .games .marquee__set { animation-play-state: paused; }

/* ---------- 옆으로 흐르는 줄 (게임 카드 · 쇼핑몰 로고) ---------- */
.marquee { display: flex; width: 100%; overflow: hidden; }
.marquee__set { display: flex; flex: none; gap: var(--gap); padding-right: var(--gap); }
.marquee.is-running .marquee__set { animation: marquee var(--dur, 40s) linear infinite; }
.marquee.is-running[data-reverse] .marquee__set { animation-direction: reverse; }
/* 쇼핑몰 로고 줄은 마우스를 올리면 멈춤. 게임 카드는 집중 중에 마우스가 카드 위에 있는 경우가 많아 멈추지 않음 */
.logos:hover .marquee__set, .marquee.is-paused .marquee__set { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- 캐시 교환 ---------- */
.exchange__grid, .ads__grid { width: min(100%, 1152px); margin: clamp(56px, 8.34vw, 120px) auto 0; display: grid; grid-template-columns: 1fr 1fr; }
.exchange__grid { gap: 32px; }
.info-card { border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column; background: var(--page); } /* 바탕색은 틈으로 흰 선이 비치지 않게 하는 용도 */
.info-card__media { --media-h: clamp(260px, 33.34vw, 480px); position: relative; overflow: hidden; height: var(--media-h); background: var(--panel); }
/* 앱 화면: Figma 좌표(패널 높이 480 기준) 그대로 그리고, 패널 높이 비율(--phone-scale, main.js 가 넣음)만큼 통째로 줄임 */
.phone {
  position: absolute; left: 50%; top: 18.75%; width: 330px; height: 446px; translate: -50% 0;
  scale: var(--phone-scale, 1); transform-origin: center top;
  border: 7.137px solid rgb(175 180 207 / .6); border-radius: 32px; background: var(--white); overflow: hidden;
}
.phone__screen { position: absolute; inset: -7.137px; }
.phone__banknote { position: absolute; left: 50%; top: 67px; width: 100px; height: 100px; translate: -50% 0; }
.phone__title { position: absolute; left: 0; right: 0; top: 182px; text-align: center; font-size: 28px; font-weight: 700; line-height: 1.42; letter-spacing: -.5px; color: #212121; }
.phone__meta { position: absolute; left: 0; right: 0; top: 288px; text-align: center; font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: -.5px; color: #616161; }
.phone__label { position: absolute; left: 22px; top: 45.93px; font-family: var(--font-app); font-size: 20.412px; font-weight: 700; line-height: 1.5; letter-spacing: -.8505px; color: #9facbb; }
.phone__categories { position: absolute; left: -6px; top: 82.96px; width: 342px; height: 211.714px; max-width: none; }
.info-card__body { flex: 1; padding: 44px 44px 72px; background: var(--page); display: flex; flex-direction: column; gap: 12px; }
.info-card__body h3 { font-size: clamp(24px, 2.23vw, 32px); font-weight: 700; line-height: 1.4; letter-spacing: -.0282em; color: var(--label); }
.info-card__body p { font-size: clamp(17px, 1.53vw, 22px); font-weight: 500; line-height: 1.5; letter-spacing: -.0282em; color: var(--label-neutral); }

/* ---------- 광고 문의 ---------- */
.ads__grid { gap: 20px; }
.link-card {
  position: relative; min-height: 304.3px; padding: 46px 46px 110px; border-radius: 38px;
  background: rgb(30 30 32 / .9); color: #fff; display: flex; flex-direction: column; gap: 16px;
  transition: background-color .25s ease, translate .35s var(--ease);
}
.link-card:hover { background: rgb(30 30 32); translate: 0 -4px; }
.link-card h3 { font-size: clamp(24px, 2.23vw, 32px); font-weight: 700; line-height: 1.375; letter-spacing: -.0253em; }
.link-card p { font-size: clamp(16px, 1.39vw, 20px); line-height: 1.4; letter-spacing: -.012em; color: #eaebec; opacity: .8; }
.link-card__chip {
  position: absolute; right: 40px; bottom: 34px; width: 64px; height: 64px; border-radius: 50%;
  background: var(--yellow); display: grid; place-items: center; transition: scale .3s var(--ease);
}
.link-card__chip img { transition: translate .3s var(--ease); }
.link-card:hover .link-card__chip { scale: 1.08; }
.link-card:hover .link-card__chip img { translate: 2px -2px; }

/* ---------- 이런 제품도 있어요 ---------- */
.products { padding-top: clamp(84px, 10.98vw, 158px); padding-bottom: clamp(120px, 16.67vw, 240px); }
.products__list { width: min(100%, 1135px); margin: clamp(56px, 8.34vw, 120px) auto 0; display: flex; flex-direction: column; gap: clamp(32px, 5.56vw, 80px); }
/* 카드 바탕을 텍스트 영역과 같은 색으로 깔아 둠: 이미지와 텍스트 영역 사이에 소수점 픽셀 틈이 생겨도(아이폰 사파리) 흰 선이 비치지 않게 */
.product { display: grid; grid-template-columns: 483fr 652fr; min-height: 700px; border-radius: var(--r-xl); overflow: hidden; background: #141415; }
.product__body { background: #141415; color: #fff; display: flex; align-items: center; padding: 112px 58px 112px 62px; }
.product__inner { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 62px; }
.product__text { display: flex; flex-direction: column; gap: 32px; }
.product .app-name { font-size: 24px; }
.product .app-name img { width: 40px; height: 40px; border-radius: 11px; }
.product__copy { display: flex; flex-direction: column; gap: 16px; }
.product__copy h3 { font-size: clamp(34px, 3.48vw, 50px); font-weight: 700; line-height: 1.28; letter-spacing: -.04em; white-space: nowrap; }
.product__copy p { font-size: 18px; line-height: 1.45; letter-spacing: -.285px; color: #bdbdbd; }
.product .store-btns { padding-top: 0; }
.product__media { position: relative; background: var(--panel); overflow: hidden; display: flex; align-items: center; }
.product__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.logo-rows { width: 100%; display: flex; flex-direction: column; gap: 22px; padding-bottom: 20px; }
.logos { --gap: 22px; }
.logos li { flex: none; }
.logos img { width: 112px; height: 112px; border-radius: 35.7%; }

/* ---------- 자주 묻는 질문 ---------- */
.faq__list { width: min(100%, 1100px); margin: clamp(48px, 5.56vw, 80px) auto 0; border-top: 1px solid var(--hairline); }
.faq__item { border-bottom: 1px solid var(--hairline); }
.faq__item + .faq__item { margin-top: 10px; }
.faq__q {
  width: 100%; min-height: 82px; padding: 20px 12.5px 20px 4px; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  font-size: 19px; font-weight: 600; line-height: 27.55px; letter-spacing: -.19px; color: var(--ink);
}
.faq__icon { flex: none; width: 13px; height: 13px; transition: rotate .35s var(--ease); }
.faq__item.is-open .faq__icon { rotate: 45deg; }
.faq__a { display: grid; grid-template-rows: 1fr; }
.faq__a-inner { overflow: hidden; }
/* 답변: 목록 폭을 채우되 오른쪽 X 버튼 자리(버튼 13 + 여백)는 비워 두고, 단어 중간에서 줄이 바뀌지 않게 */
.faq__a p { padding: 0 62px 28px 4px; word-break: keep-all; font-size: 17px; line-height: 29.75px; letter-spacing: -.17px; color: var(--muted); }
.faq__a p + p { margin-top: -16px; }
/* 접기/펼치기는 JS 가 켜져 있을 때만 (꺼져 있으면 답변이 모두 보임) */
.js .faq__a { transition: grid-template-rows .4s var(--ease); }
.js .faq__item:not(.is-open) .faq__a { grid-template-rows: 0fr; }
.js .faq__a-inner { transition: visibility .4s; }
.js .faq__item:not(.is-open) .faq__a-inner { visibility: hidden; }

/* ---------- 푸터 ---------- */
.footer { background: var(--label); color: var(--footer-text); }
.footer__inner { width: min(100%, 1148px); margin: 0 auto; padding: 73px 24px 64px; }
.footer__wordmark { width: 125px; height: 22px; }
.footer__policy { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; font-weight: 600; line-height: 23.8px; letter-spacing: -.17px; }
.footer__policy .is-strong { font-weight: 800; }
.footer__info { margin-top: 28px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 22.1px; letter-spacing: -.17px; }
.footer__info p { display: flex; flex-wrap: wrap; gap: 0 8px; }
.footer__info i { font-style: normal; color: #d6d6d6; }
.footer__copy { margin-top: 27px; font-size: 13px; line-height: 22.1px; letter-spacing: -.17px; }
.footer a { transition: color .2s ease; }
.footer a:hover { color: #fff; }

/* ==========================================================================
   좁은 화면
   ========================================================================== */
@media (max-width: 1180px) {
  :root { --art-scale: .82; }
  /* 제품 카드: 좌우 → 위아래 (이미지가 위) */
  .product { grid-template-columns: 1fr; min-height: 0; }
  .product__media { order: -1; }
  .product__body { padding: 56px 48px; }
  .product__inner { gap: 40px; }
  .product__media { height: 420px; }
  .br-wide { display: none; }
  /* 혜택 좌우 분할 → 위아래 (그림이 위) */
  .benefits--split .benefit { grid-template-columns: 1fr; background: var(--page); } /* 바탕색은 그림과 설명 사이 틈으로 흰 선이 비치지 않게 하는 용도 */
  .benefits--split .benefit__panel { order: -1; }
  .benefits--split .benefit__split { padding: 48px 48px 56px; gap: 16px; }
  /* 카드가 위아래로 쌓이면 설명은 문단마다 한 줄 */
  .benefit__split p br { display: none; }
  .benefit__split-body { gap: 6px; }
}
@media (max-width: 960px) {
  .gnb__inner { grid-template-columns: 1fr auto; }
  .gnb__nav { display: none; }
  .gnb__menu { display: grid; }
}
@media (max-width: 860px) {
  :root { --art-scale: .64; }
  /* 히어로: 카피 위 · 펭귄 아래 */
  .hero__inner { grid-template-columns: 1fr; gap: 0; padding: 48px 0 40px; }
  .hero__walker { width: clamp(170px, 46vw, 260px); margin-top: 36px; }
  .hero__ground { height: 22%; border-radius: 50% 50% 0 0 / 48px 48px 0 0; }
  .hero--center .hero__inner { gap: 44px; padding: 72px 0 40px; }
  .hero--center .hero__walker { width: clamp(170px, 46vw, 260px); }
  .hero--center .hero__ground { height: 22%; }
  .apps__grid, .ads__grid { grid-template-columns: 1fr; }
  .link-card__chip { right: 34px; }
}
@media (max-width: 720px) {
  .exchange__grid { grid-template-columns: 1fr; gap: 20px; }
  .info-card__media { --media-h: clamp(220px, 60vw, 480px); }
  .info-card__body { padding: 32px 28px 44px; }
}
/* 쿠폰 교환 카드 설명: 강제 줄바꿈이 꺼지는 모바일에서 두 줄로 나뉠 때 "빠르게 교환 가능해요" 앞에서 줄이 바뀌게.
   앞 구절이 한 줄에 다 들어가는 폭(약 385px 이상)에서만 적용 — 더 좁으면 세 줄이 되므로 자연스러운 줄바꿈에 맡김 */
@media (min-width: 385px) and (max-width: 560px) {
  .keep-coupon { display: inline-block; }
}
@media (max-width: 560px) {
  :root { --art-scale: .46; --gutter: 16px; }
  .headline br, .app-card__copy p br, .info-card__body p br, .link-card p br { display: none; }
  /* 앱 소개 제목: 모바일에서는 세 줄로. 글자는 기존 28px, 첫 줄이 안 들어가는 좁은 화면에서만 폭에 맞춰 줄어듦 (첫 줄 너비 ≈ 글자 크기 × 11.7) */
  .apps .headline { font-size: min(28px, calc((100vw - 32px) / 12)); }
  .app-card { border-radius: 28px; }
  .app-card__body { padding: 32px 24px 36px; gap: 24px; }
  .app-card__copy h3 { font-size: 28px; line-height: 1.38; }
  .app-card__copy p { font-size: 16px; line-height: 1.6; }
  /* 스토어 버튼 두 개가 한 줄에 들어가도록 조금 줄임 */
  .store-btns { flex-wrap: nowrap; }
  .store-btn, .store-btn--solid { gap: 6px; padding: 8px 12px 8px 10px; font-size: 15px; line-height: 26px; }
  .benefits__list, .benefits--split .benefits__list, .products__list { gap: 20px; }
  .br-narrow { display: inline; }
  .benefits--split .benefit__split { padding: 32px 24px 36px; gap: 10px; }
  .benefit__split-body { gap: 10px; }
  /* 혜택 카드 설명: 가장 긴 문단도 한 줄에 들어가도록 화면 폭에 맞춰 글자 크기를 정함 */
  .benefit__split p { font-size: clamp(15px, 4.7vw, 22px); }
  .benefit__split-body { gap: 4px; }
  .link-card { padding: 32px 28px 104px; border-radius: 28px; min-height: 0; }
  .link-card__chip { right: 28px; bottom: 28px; width: 56px; height: 56px; }
  .product__body { padding: 40px 28px; }
  .product__inner { gap: 28px; }
  .product__text { gap: 22px; }
  .product__copy p { font-size: 16px; line-height: 1.6; }
  .product__media { height: 320px; }
  .logos { --gap: 14px; }
  .logo-rows { gap: 14px; padding-bottom: 0; }
  .logos img { width: 84px; height: 84px; }
  .faq__q { font-size: 17px; min-height: 68px; padding-block: 16px; }
  .faq__a p { padding-right: 50px; font-size: 15px; line-height: 1.7; }
  .footer__inner { padding-top: 56px; }
}

/* 혜택 카드 그림 배율(--art-scale)과 캐시 교환 카드의 앱 화면 배율(--phone-scale)은
   main.js "화면 폭에 비례하는 배율"이 화면 폭에 맞춰 숫자로 넣어 줌. 위의 단계별 값은 JS 가 꺼져 있을 때 쓰는 값 */

/* 움직임 줄이기 설정을 켠 사용자에게는 모션을 끔 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .benefit { transition: none; }
  .js .hero__copy > * { opacity: 1; translate: none; animation: none; }
  .hero__cash.is-pop { animation: none; }
  .js .benefit__panel > * { opacity: 1; transform: none; transition: none; }
  .js .benefit.is-playing .quiz__blank { animation: none; }
  .bingo__line::before, .bingo__check, .bingo__box, .bingo__icon { transition: none; }
  .bingo.is-filled .bingo__box, .bingo.is-finale { animation: none; }
  .js .faq__a, .faq__icon, .link-card, .link-card__chip, .link-card__chip img { transition: none; }
}
