/* =========================================================================
   LEMON 공식 홈페이지 — 디자인 토큰과 레이아웃

   앱(mobile/src/theme)의 토큰을 웹으로 옮긴 것입니다. 글자색·검정 버튼·캐릭터 색은
   앱과 같은 값을 씁니다. 웹에만 있는 값(모래 언덕, 섹션 배경)은 아래 "웹 전용"에 모읍니다.
   ========================================================================= */

:root {
  /* 앱과 같은 값 ------------------------------------------------------- */
  --ink: #1b1b4b;          /* 제목 */
  --body: #2b2b45;         /* 본문 */
  --muted: #8c8ca1;        /* 보조 설명 */
  --faint: #b6b6c6;
  --line: #ededed;
  --line-strong: #dfdfdf;
  --black: #141414;        /* 기본 버튼 */
  --black-strong: #000000;
  --white: #ffffff;

  /* 캐릭터 색 (mobile/src/theme/colors.ts 실측값) */
  --c-yellow: #ffdc02;
  --c-blue: #078efd;
  --c-green: #5fc100;
  --c-pink: #fd5794;
  --c-purple: #953af7;
  --c-orange: #fe6401;
  --c-mint: #35ffb0;
  --c-sky: #27c5ff;

  /* 웹 전용 ------------------------------------------------------------ */
  /* 히어로 — 깊은 우주와 은하 */
  --space-top: #05040f;
  --space-mid: #100d2c;
  --space-low: #1a1243;
  --space-edge: #070615;
  --star: #f4f2ff;
  --neb-violet: rgba(149, 58, 247, 0.52);
  --neb-blue: rgba(7, 142, 253, 0.44);
  --neb-rose: rgba(253, 87, 148, 0.36);
  --neb-teal: rgba(53, 255, 176, 0.26);

  /* 섹션 바탕 — 캐릭터 색을 아주 옅게 깐 것 */
  --bg-cream: #fffbf2;
  --bg-sky: #f1f7fe;
  --bg-rose: #fff5f8;
  --bg-leaf: #f3faf1;
  --bg-lilac: #f8f4fe;

  --footer-bg: #14142e;
  --footer-ink: #f6f5fb;
  --footer-muted: #9a9ab8;

  /* 뼈대 */
  --maxw: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius-card: 28px;
  --radius-pill: 999px;
  --shadow-card: 0 18px 44px rgba(27, 27, 75, 0.08);
  --shadow-lift: 0 26px 60px rgba(27, 27, 75, 0.14);
  --header-h: 68px;

  /* 섹션 전환 곡선 — PC 는 크게, 모바일은 작게 */
  --curve: clamp(28px, 6vw, 96px);
}

/* 기본 ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* 고정 헤더에 제목이 가리지 않게 */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  /* 본문과 푸터 사이 곡선에서 바탕이 비쳐 보이도록 푸터색을 페이지 바탕으로 둡니다 */
  background: var(--footer-bg);
  color: var(--body);
  font-family: Pretendard, Pretendard Variable, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: -0.015em;
  overflow-x: hidden;           /* 가로 스크롤 방지 */
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.14;
}

p { margin: 0; }

::selection { background: #ffe9a3; color: var(--ink); }

:focus-visible {
  outline: 3px solid #2b6cff;
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  padding: 10px 16px; border-radius: 12px;
  background: var(--black); color: #fff; font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}
.skip-link:focus-visible { transform: translateY(0); }

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

/* 본문 전체 — 푸터 위에 얹힌 하나의 면 */
.page {
  position: relative;
  z-index: 1;
  background: var(--bg-cream);
  border-bottom-left-radius: var(--curve);
  border-bottom-right-radius: var(--curve);
  overflow: hidden;              /* 곡선 밖으로 섹션이 삐져나오지 않게 */
}

/* 헤더 ------------------------------------------------------------------ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.28s ease, box-shadow 0.28s ease, backdrop-filter 0.28s ease;
}
.header::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0px);
  transition: background 0.28s ease, backdrop-filter 0.28s ease;
}
.header.is-stuck::before {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(27, 27, 75, 0.07);
}

/* 맨 위에서는 어두운 우주 위에 떠 있습니다 — 글자와 버튼을 밝은 쪽으로 바꿉니다 */
.header:not(.is-stuck) .brand span { color: #f4f3ff; }
.header:not(.is-stuck) .nav a { color: rgba(238, 237, 255, 0.82); }
.header:not(.is-stuck) .nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.header:not(.is-stuck) .btn {
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-fg: #f4f3ff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
  box-shadow: none;
}
.header:not(.is-stuck) .btn:hover { --btn-bg: rgba(255, 255, 255, 0.2); }
.header:not(.is-stuck) .burger { background: rgba(255, 255, 255, 0.12); box-shadow: none; }
.header:not(.is-stuck) .burger i { background: #f4f3ff; }

.header .wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  padding: 6px 8px 6px 0;
}
.brand img { width: 34px; height: 34px; }
.brand span {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  color: var(--body);
  transition: background 0.18s ease, color 0.18s ease;
}
.nav a:hover { background: rgba(27, 27, 75, 0.06); color: var(--ink); }

/* 버튼 ------------------------------------------------------------------ */
.btn {
  --btn-bg: var(--black);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding-inline: 26px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease,
    background 0.2s ease;
  box-shadow: 0 8px 20px rgba(20, 20, 20, 0.16);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(20, 20, 20, 0.22); }
.btn:active { transform: translateY(0) scale(0.975); box-shadow: 0 6px 14px rgba(20, 20, 20, 0.18); }

.btn--sm { height: 42px; padding-inline: 18px; font-size: 15px; }
.btn--ghost {
  --btn-bg: rgba(255, 255, 255, 0.86);
  --btn-fg: var(--ink);
  box-shadow: 0 8px 20px rgba(27, 27, 75, 0.1);
  border: 1px solid rgba(27, 27, 75, 0.08);
}
.btn--ghost:hover { --btn-bg: #fff; }

/* 준비 중 표시가 붙는 버튼 */
.btn[data-pending]::after {
  content: "준비 중";
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.22);
}
.btn--ghost[data-pending]::after { background: rgba(27, 27, 75, 0.08); color: var(--muted); }

/* 햄버거 ---------------------------------------------------------------- */
.burger {
  display: none;
  width: 42px; height: 42px;
  border: 0; border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 16px rgba(27, 27, 75, 0.1);
  cursor: pointer;
  position: relative;
}
.burger i {
  position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.24s ease, opacity 0.18s ease;
}
.burger i:nth-child(1) { top: 15px; }
.burger i:nth-child(2) { top: 20px; }
.burger i:nth-child(3) { top: 25px; }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 99;
  padding: 10px var(--gutter) 22px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(27, 27, 75, 0.12);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  display: grid;
  gap: 2px;
  transform-origin: top;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.26s;
}
.mobile-nav[hidden] {
  display: grid;                    /* 애니메이션을 위해 display 대신 가시성으로 숨깁니다 */
  opacity: 0; visibility: hidden;
  transform: translateY(-10px) scaleY(0.96);
  pointer-events: none;
}
.mobile-nav a {
  padding: 13px 10px;
  border-radius: 14px;
  font-weight: 600;
  color: var(--ink);
}
.mobile-nav a:hover { background: rgba(27, 27, 75, 0.05); }
.mobile-nav .btn { margin-top: 10px; width: 100%; }

/* =========================================================================
   히어로 — 캐릭터들이 헤엄치는 우주

   언덕 위에 앉히는 대신 **깊은 우주에 풀어 둡니다**.
   겹은 뒤에서 앞으로 이렇게 쌓입니다.
     우주 바탕 → 나선 은하 → 성운 → 은하수 띠 → 별·유성(캔버스)
     → 먼 행성 → 캐릭터(먼 겹) → 가운데 행성 → 캐릭터(중간·가까운 겹)
     → 고리 행성 → 캐릭터(앞 겹) → 어둠(비네트) → 결(그레인)
   별과 유성은 캔버스 한 장에 모아 그려서 노드가 늘지 않습니다.
   움직임은 transform 과 opacity 만 쓰고, rAF 는 hero.js 한 곳에서만 돕니다.
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  isolation: isolate;
  overflow: hidden;
  background: var(--space-top);
}

.scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* 마우스에 따라 전체가 아주 조금 따라옵니다 */
  will-change: transform;
}

/* 우주 바탕 — 위는 거의 검고, 아래로 가며 은하 쪽으로 물듭니다 */
.sky {
  position: absolute;
  inset: -4%;
  background:
    radial-gradient(58% 44% at 16% 14%, rgba(39, 197, 255, 0.16) 0%, rgba(39, 197, 255, 0) 70%),
    radial-gradient(52% 42% at 86% 70%, rgba(149, 58, 247, 0.22) 0%, rgba(149, 58, 247, 0) 68%),
    radial-gradient(40% 34% at 62% 96%, rgba(253, 87, 148, 0.14) 0%, rgba(253, 87, 148, 0) 70%),
    linear-gradient(172deg, var(--space-top) 0%, var(--space-mid) 46%, var(--space-low) 78%, var(--space-edge) 100%);
}

/* 멀리 보이는 나선 은하 — 아주 느리게 돕니다 */
.galaxy {
  position: absolute;
  left: 58%;
  top: -16%;
  width: 54vw;
  height: 54vw;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(255, 252, 240, 0.5) 0%, rgba(255, 240, 214, 0.16) 18%, rgba(149, 58, 247, 0) 62%),
    conic-gradient(from 0deg,
      rgba(214, 233, 248, 0.16) 0deg, rgba(214, 233, 248, 0) 46deg,
      rgba(199, 170, 255, 0.18) 104deg, rgba(199, 170, 255, 0) 150deg,
      rgba(214, 233, 248, 0.14) 212deg, rgba(214, 233, 248, 0) 258deg,
      rgba(255, 221, 236, 0.14) 320deg, rgba(255, 221, 236, 0) 360deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 36%, rgba(0, 0, 0, 0.35) 62%, transparent 78%);
  mask-image: radial-gradient(closest-side, #000 36%, rgba(0, 0, 0, 0.35) 62%, transparent 78%);
  filter: blur(14px);
  mix-blend-mode: screen;
  opacity: 0.5;
  transform: rotate(-8deg) skewY(-14deg);
}

/* 성운 — 색이 번지는 옅은 구름 */
.neb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  mix-blend-mode: screen;
}
.neb--violet { left: -8%;  top: 30%; width: 48vw; height: 32vw; background: var(--neb-violet); opacity: 0.4; }
.neb--blue   { right: -6%; top: 2%;  width: 42vw; height: 26vw; background: var(--neb-blue);   opacity: 0.42; }
.neb--rose   { left: 30%;  top: 62%; width: 46vw; height: 24vw; background: var(--neb-rose);   opacity: 0.38; }
.neb--teal   { left: 6%;   top: 74%; width: 34vw; height: 18vw; background: var(--neb-teal);   opacity: 0.3; }

/* 은하수 — 화면을 비스듬히 지나는 옅은 띠 */
.milkyway {
  position: absolute;
  left: -20%;
  top: 6%;
  width: 142%;
  height: 54%;
  transform: rotate(-13deg);
  background: linear-gradient(
    180deg,
    rgba(214, 233, 248, 0) 0%,
    rgba(214, 233, 248, 0.06) 40%,
    rgba(236, 226, 255, 0.13) 51%,
    rgba(214, 233, 248, 0.05) 63%,
    rgba(214, 233, 248, 0) 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  filter: blur(22px);
  mix-blend-mode: screen;
}

/* 별과 유성 — 캔버스 한 장에 모아 그립니다 (hero.js) */
.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* 행성 ------------------------------------------------------------------ */
.planet {
  position: absolute;
  will-change: transform;
}
.planet svg { display: block; width: 100%; height: auto; overflow: visible; }

.planet--small  { right: 16%; top: 10%;    width: clamp(40px, 4.6vw, 78px); opacity: 0.92; }
.planet--mid    { left: 4%;   top: 12%;    width: clamp(92px, 11.5vw, 184px); }
.planet--ringed { right: -6%; bottom: -20%; width: clamp(300px, 40vw, 640px); }

/* 캐릭터가 모여 있는 깊이 한 겹 */
.chars {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.chr {
  position: absolute;
  /* left/bottom/width 는 스크립트가 넣습니다 */
  transform-origin: 50% 50%;
  /* 제자리에서 숨 쉬듯 오르내리기만 합니다. CSS 가 하므로 합성만으로 돌아가고,
     자바스크립트는 이 친구들을 매 프레임 건드리지 않습니다. */
  animation: breathe var(--beat, 7s) var(--off, 0s) ease-in-out infinite alternate;
}
@keyframes breathe {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, calc(var(--rise, 5px) * -1), 0); }
}

/* 몸통 — 그림은 모양(알파)으로만 쓰고, 색은 원색 한 가지로 채웁니다 */
.chr-body,
.chr-fig > .chr-body {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;          /* 캐릭터 그림은 정사각형입니다 */
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.chr .eyes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* 공기 원근 — 뒤에 있을수록 옅습니다. 흐림(filter)은 쓰지 않습니다:
   겹 안의 그림이 움직이면 그 겹 전체를 매 프레임 다시 그리게 되어 가장 비쌉니다. */
.chars[data-chars="far"] { opacity: 0.6; }
.chars[data-chars="mid"] { opacity: 0.82; }
.chars[data-chars="near"] { opacity: 0.95; }

/* 건너오는 친구들만 스크립트가 움직입니다 */
.chars--swim .chr {
  animation: none;
  will-change: transform, opacity;
}

/* 바깥을 어둡게 — 가운데 글이 또렷해집니다 */
.space-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(64% 46% at 50% 50%, rgba(6, 6, 20, 0.3) 0%, rgba(6, 6, 20, 0) 74%),
    radial-gradient(126% 94% at 50% 46%, rgba(5, 4, 16, 0) 54%, rgba(5, 4, 16, 0.58) 100%),
    linear-gradient(180deg, rgba(5, 4, 16, 0.42) 0%, rgba(5, 4, 16, 0) 20%);
}

/* 아주 옅은 결 — 그라디언트의 띠 자국을 덮고 인쇄물 같은 질감을 줍니다 */
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .galaxy { animation: none; }
  .chr, .planet, .neb, .chars, .scene { transition: none !important; animation: none !important; }
}

/* 히어로 글 ------------------------------------------------------------- */
.hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(30px, 7vh, 80px) clamp(170px, 32vh, 360px);
  text-align: center;
}

.hero h1 {
  font-size: clamp(27px, 3.9vw, 54px);
  line-height: 1.24;
  letter-spacing: -0.045em;
  color: #ffffff;
  /* 어두운 우주 위라 글 뒤에 옅은 빛을 깔아 또렷하게 둡니다 */
  text-shadow: 0 2px 30px rgba(8, 8, 28, 0.8), 0 0 70px rgba(130, 120, 255, 0.32);
}

.hero-sub {
  margin: clamp(12px, 1.8vh, 20px) auto 0;
  font-size: clamp(14px, 1.08vw, 17px);
  font-weight: 700;
  color: rgba(234, 233, 255, 0.84);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 18px rgba(8, 8, 28, 0.75);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: clamp(24px, 3.4vh, 38px);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(62px, 9vh, 116px);
  z-index: 3;
  transform: translateX(-50%);
  color: rgba(226, 226, 255, 0.5);
  animation: nudge 2.2s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  55% { transform: translateX(-50%) translateY(7px); }
}
@media (prefers-reduced-motion: reduce) { .scroll-hint { animation: none; } }

/* =========================================================================
   섹션 공통
   ========================================================================= */
.section {
  position: relative;
  padding-block: clamp(72px, 11vw, 150px);
}
.section--cream { background: var(--bg-cream); }
.section--sky { background: var(--bg-sky); }
.section--rose { background: var(--bg-rose); }
.section--leaf { background: var(--bg-leaf); }
.section--lilac { background: var(--bg-lilac); }
.section--white { background: #fff; }

/* 섹션끼리 곡선으로 이어집니다 — 앞 섹션 아래가 둥글게 깎여 뒤가 드러납니다 */
.section--curve-top {
  border-top-left-radius: var(--curve);
  border-top-right-radius: var(--curve);
  margin-top: calc(var(--curve) * -1);
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding-inline: 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-pill);
  background: rgba(27, 27, 75, 0.06);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.eyebrow b { width: 8px; height: 8px; border-radius: 50%; background: var(--c-yellow); }

.h2 { font-size: clamp(32px, 5vw, 62px); }
.h3 { font-size: clamp(22px, 2.6vw, 30px); }

.lead {
  margin-top: 18px;
  max-width: 46ch;
  font-size: clamp(16px, 1.3vw, 19px);
  color: #45455f;
}

/* 서비스 한 줄 선언 */
.statement {
  text-align: center;
}
.statement .h2 {
  max-width: 20ch;
  margin-inline: auto;
  line-height: 1.22;
}
.statement .lead { margin-inline: auto; text-align: center; }

/* 기능 섹션 ------------------------------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 86px);
  align-items: center;
}
.feature--flip .feature-media { order: -1; }

.feature-body .lead { max-width: 40ch; }

.bullets {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}
.bullets li {
  position: relative;
  padding-left: 26px;
  font-size: 16.5px;
  color: #45455f;
}
/* 앞 표시는 체크로 둡니다 — 색 점 세 개가 세로로 서면 신호등처럼 보입니다 */
.bullets li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
}

.note {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(27, 27, 75, 0.07);
  font-size: 14.5px;
  color: #55556f;
}
.note b { color: var(--ink); }

/* 휴대폰 목업 ----------------------------------------------------------- */
.feature-media {
  display: flex;
  justify-content: center;
  position: relative;
  isolation: isolate;
  /* 마우스를 따라 기울 때 깊이가 생기도록 */
  perspective: 1100px;
}

/* 휴대폰 뒤에 깔리는 빛무리 — 화면이 둥둥 떠 보이게 합니다 */
.feature-media::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: min(420px, 92%);
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--halo, rgba(255, 220, 2, 0.3)), transparent 72%);
  filter: blur(6px);
}

/* 겉칸 — 화면에 들어올 때 비스듬히 올라와 반듯해지고,
   그 뒤로는 좌우로 천천히 흔들리며 떠 있습니다. */
.phone-wrap {
  position: relative;
  z-index: 1;
  transform-style: preserve-3d;
  will-change: transform;
}
.reveal.is-in .phone-wrap {
  animation:
    phoneIn 1.3s ease-in-out both,
    phoneSway 7.5s ease-in-out 1.3s infinite;
}
/* 마주 보는 섹션은 반대쪽에서 들어오고 박자도 다릅니다 */
.feature--flip .phone-wrap { --from-x: -46px; }
.feature--flip .reveal.is-in .phone-wrap {
  animation:
    phoneIn 1.3s ease-in-out both,
    phoneSway 8.8s ease-in-out 1.3s infinite;
}
/* 들어올 때 — 옆에서 들어와 **좌우로 두어 번 흔들리다** 제자리에 섭니다 */
@keyframes phoneIn {
  0% {
    opacity: 0;
    transform: translate3d(var(--from-x, 56px), 62px, 0) rotate(7deg) scale(0.9);
  }
  35% {
    opacity: 1;
    transform: translate3d(calc(var(--from-x, 56px) * -0.3), 0, 0) rotate(-3deg) scale(1.02);
  }
  58% {
    transform: translate3d(calc(var(--from-x, 56px) * 0.16), 0, 0) rotate(1.6deg) scale(1);
  }
  78% {
    transform: translate3d(calc(var(--from-x, 56px) * -0.07), 0, 0) rotate(-0.7deg);
  }
  92% {
    transform: translate3d(calc(var(--from-x, 56px) * 0.03), 0, 0) rotate(0.3deg);
  }
  100% { opacity: 1; transform: none; }
}
@keyframes phoneSway {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  25% { transform: translate3d(10px, -9px, 0) rotate(0.9deg); }
  50% { transform: translate3d(0, -16px, 0) rotate(0deg); }
  75% { transform: translate3d(-10px, -9px, 0) rotate(-0.9deg); }
}

/* 속칸 — 마우스가 올라오면 그 쪽으로 기울고 반듯해집니다 */
.phone {
  position: relative;
  z-index: 1;
  width: min(292px, 74vw);
  aspect-ratio: 393 / 852;
  border-radius: 46px;
  padding: 10px;
  background: linear-gradient(155deg, #3a3a52 0%, #14141f 38%, #0b0b14 62%, #3c3c56 100%);
  box-shadow:
    0 40px 70px -28px rgba(20, 20, 46, 0.55),
    0 18px 30px -18px rgba(20, 20, 46, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.07) inset;
  transform:
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    rotate(var(--tilt, -3deg))
    scale(var(--sc, 1));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.feature-media.is-hover .phone {
  --tilt: 0deg;
  --sc: 1.035;
  /* 마우스를 따라갈 때는 바로 반응해야 합니다 */
  transition: transform 0.14s ease-out, box-shadow 0.4s ease;
  box-shadow: 0 56px 90px -30px rgba(20, 20, 46, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

/* 화면 유리에 비치는 빛 */
.phone::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 3;
  border-radius: 36px;
  pointer-events: none;
  background: linear-gradient(var(--glare, 118deg), rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.08) 18%, rgba(255, 255, 255, 0) 38%);
  transition: background 0.2s ease-out;
}
/* 윗부분 노치 */
.phone::after {
  content: "";
  position: absolute;
  top: 20px; left: 50%;
  width: 96px; height: 24px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #07070e;
  z-index: 4;
}

.phone-screen {
  width: 100%; height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #fafafa;
  position: relative;
}
/* 화면 안의 그림 크기는 styles/app-ui.css 가 정합니다 */

/* 휴대폰 옆에 떠 있는 작은 쪽지 — 그 기능의 한마디를 적어 둡니다 */
.chip {
  position: absolute;
  /* 옆에 앉은 캐릭터보다 앞에 둡니다 — 뒤에 두면 글자가 가려집니다 */
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 30px rgba(27, 27, 75, 0.14);
  border: 1px solid rgba(27, 27, 75, 0.06);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  animation: bob 5.6s ease-in-out infinite;
}
.chip b {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--dot, var(--c-yellow));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot, var(--c-yellow)) 22%, transparent);
}
.chip--a { left: -6%; top: 14%; }
.chip--b { right: -8%; top: 44%; animation-delay: -2.2s; }
.chip--c { left: -2%; bottom: 14%; animation-delay: -3.6s; }

@media (max-width: 620px) {
  .chip { font-size: 12px; padding: 8px 11px; }
  .chip--a { left: -2%; }
  .chip--b { right: -2%; }
  .chip--c { left: 0; }
}

/* 휴대폰 옆에 앉아 있는 캐릭터 */
.sidekick {
  position: absolute;
  width: clamp(64px, 9vw, 110px);
  z-index: 2;
  animation: bob 4.6s ease-in-out infinite;
}
.sidekick > img { filter: drop-shadow(0 12px 16px rgba(176, 142, 92, 0.26)); }
.sidekick--br { right: -2%; bottom: 3%; }
.sidekick--tl { left: -4%; top: 3%; animation-duration: 5.4s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sidekick, .chip { animation: none; }
  .reveal.is-in .phone-wrap { animation: none; }
  .phone { transition: none; }
}

/* 카드 묶음 ------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 46px;
}
.card {
  padding: 26px 24px 28px;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(27, 27, 75, 0.05);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.card img { width: 54px; margin-bottom: 14px; }
.card h3 { font-size: 19px; margin-bottom: 7px; }
.card p { font-size: 15px; color: #55556f; }

/* 마무리 CTA + 곡선 ------------------------------------------------------ */
.cta {
  position: relative;
  padding-block: clamp(80px, 12vw, 164px) clamp(96px, 13vw, 170px);
  background: linear-gradient(180deg, #fff7e2 0%, #ffeec6 100%);
  text-align: center;
  overflow: hidden;
}
.cta .h2 { font-size: clamp(30px, 5vw, 60px); max-width: 16ch; margin-inline: auto; }
.cta .lead { margin-inline: auto; text-align: center; }
.cta .hero-cta { margin-top: 32px; }

.cta-crowd {
  position: relative;
  height: clamp(96px, 13vw, 160px);
  margin-top: 36px;
}
.cta-crowd .chr-fig {
  margin-left: calc(clamp(54px, 7vw, 96px) / -2);
  animation: bob 5s ease-in-out infinite;
}

/* 푸터 ------------------------------------------------------------------ */
.footer {
  position: relative;
  z-index: 0;
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding-block: clamp(54px, 7vw, 86px) 34px;
}
.footer a { color: var(--footer-muted); transition: color 0.18s ease; }
.footer a:hover { color: #fff; }

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: clamp(32px, 5vw, 70px);
  padding-bottom: 38px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 38px; height: 38px; }
.footer-brand span { font-size: 23px; font-weight: 800; letter-spacing: -0.06em; color: #fff; }
.footer-tag { margin-top: 14px; color: var(--footer-muted); font-size: 15px; max-width: 26ch; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.footer-cols h4 { color: #fff; font-size: 14px; letter-spacing: 0; margin-bottom: 14px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-cols li { font-size: 14.5px; }

.pending {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: var(--footer-muted);
  font-size: 11px;
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  color: var(--footer-muted);
  font-size: 13.5px;
}
.footer-bottom .spacer { margin-left: auto; }

/* 푸터 캐릭터 — 본문보다 덜 움직입니다 */
.footer-chars {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}
.footer-chars .chr-fig { animation: bob 7s ease-in-out infinite; }
.footer-chars .chr-fig:nth-child(2) { animation-delay: -2s; }
.footer-chars .chr-fig:nth-child(3) { animation-delay: -4s; }
@media (prefers-reduced-motion: reduce) {
  .footer-chars .chr-fig, .cta-crowd .chr-fig { animation: none; }
}

/* =========================================================================
   스크롤 등장
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================================
   반응형
   ========================================================================= */
@media (max-width: 1040px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .nav { display: none; }
  .header .btn { display: none; }
  .burger { display: block; }

  .feature { grid-template-columns: 1fr; gap: 34px; }
  .feature--flip .feature-media { order: 0; }
  .feature-media { order: -1; }         /* 모바일에서는 그림이 먼저 옵니다 */

  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn { width: 100%; }
  .hero-copy { padding-bottom: clamp(160px, 34vh, 280px); }
  .phone { width: min(260px, 70vw); }
}

/* 눈 깜빡임 — 두 번 깜빡이고 쉽니다. 두 눈은 같이 감깁니다.
   눈 높이(ry)를 직접 줄입니다. SVG 도형에 CSS transform 을 걸면 브라우저가 무시하는
   경우가 있어서, 모양 속성을 바꾸는 쪽이 확실합니다. (viewBox 100 기준 값입니다)
   감는 동안은 0.15초쯤 — 더 짧으면 눈에 띄지 않습니다. */
.eye {
  animation: blink 3.8s infinite;
}
@keyframes blink {
  0%, 85% { ry: 5.66; }
  85.8% { ry: 2.6; }      /* 내려오는 눈꺼풀 — 감길 때가 뜰 때보다 빠릅니다 */
  86.6% { ry: 0.45; }
  88.2% { ry: 0.45; }     /* 아주 잠깐 머뭅니다 */
  89.4% { ry: 2.2; }
  90.8% { ry: 5.1; }
  91.6% { ry: 5.66; }     /* 뜨면서 살짝 넘쳤다 돌아옵니다 */
  95.4% { ry: 5.66; }
  96.1% { ry: 0.5; }      /* 가끔 두 번 깜빡입니다 */
  97.6% { ry: 4.9; }
  98.4%, 100% { ry: 5.66; }
}
/* 눈 위의 작은 빛점 — 감길 때 같이 사라집니다 (타이밍은 .eye 와 같습니다) */
.eye-hi {
  animation: blink-hi 3.8s infinite;
}
@keyframes blink-hi {
  0%, 85% { ry: 1.47; }
  85.8% { ry: 0.68; }
  86.6% { ry: 0.1; }
  88.2% { ry: 0.1; }
  89.4% { ry: 0.57; }
  90.8% { ry: 1.32; }
  91.6% { ry: 1.47; }
  95.4% { ry: 1.47; }
  96.1% { ry: 0.13; }
  97.6% { ry: 1.27; }
  98.4%, 100% { ry: 1.47; }
}
@media (prefers-reduced-motion: reduce) { .eye, .eye-hi { animation: none; } }

/* 좁은 화면의 우주 ------------------------------------------------------
   행성이 글을 덮지 않도록 더 바깥으로 밀고, 흐림은 가볍게 줄입니다. */
@media (max-width: 760px) {
  .planet--ringed { right: -26%; bottom: -8%; width: 80vw; }
  .planet--mid    { left: -7%; top: 9%; width: 30vw; }
  .planet--small  { right: 13%; top: 7%; width: 11vw; }
  .neb { filter: blur(42px); }
  .galaxy { left: 44%; top: -10%; width: 86vw; height: 86vw; opacity: 0.42; }
  .milkyway { opacity: 0.72; }
}

/* 캐릭터 한 명 — 그림 위에 눈을 얹기 위한 자리 -------------------------
   (scripts/character.js 가 이 모양으로 만듭니다. 눈 없는 그림만 깔면 안 됩니다) */
.chr-fig {
  position: relative;
  display: block;
  line-height: 0;
}

.chr-fig > .eyes {
  /* 그림은 정사각형입니다. 높이를 100% 로 두면 칸이 늘어난 자리(예: 세로로 늘어난 칸)에서
     눈이 엉뚱한 데로 갑니다 — 그래서 가로폭에 정사각형으로 맞춥니다. */
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  pointer-events: none;
}

/* 옆에 앉은 캐릭터는 제자리에 띄워 둡니다 (.chr-fig 의 relative 보다 앞서야 합니다) */
.feature-media .sidekick { position: absolute; }

/* 띠 · 마지막 무리 · 옆 캐릭터 · 푸터 — 크기는 바깥에서 정합니다 */

.cta-crowd .chr-fig { position: absolute; bottom: 0; width: clamp(54px, 7vw, 96px); }

.footer-chars .chr-fig { width: 40px; opacity: 0.92; }

/* 푸터 열이 둘뿐일 때 — 넓게 폅니다 */
.footer-cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 460px; }
@media (max-width: 620px) { .footer-cols--2 { max-width: none; } }

/* =========================================================================
   약관 · 개인정보처리방침 같은 글 페이지
   ========================================================================= */
.doc {
  background: #fff;
  padding-block: calc(var(--header-h) + clamp(40px, 6vw, 72px)) clamp(56px, 8vw, 96px);
}
.doc .wrap { max-width: 820px; }

.doc-head { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(28px, 4vw, 42px); }
.doc-meta { margin-top: 12px; color: var(--muted); font-size: 14.5px; }

.doc h2 {
  margin-top: 46px;
  font-size: clamp(19px, 2vw, 23px);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.doc h3 { margin-top: 26px; font-size: 17px; }
.doc p { margin-top: 12px; color: #45455f; }
.doc ul, .doc ol { margin: 12px 0 0; padding-left: 20px; color: #45455f; }
.doc li { margin-top: 7px; }
.doc li::marker { color: var(--faint); }

.doc table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 15px;
}
.doc thead th {
  text-align: left;
  padding: 11px 12px;
  background: var(--bg-cream);
  color: var(--ink);
  font-weight: 700;
  border-bottom: 1px solid var(--line-strong);
}
.doc td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: #45455f; vertical-align: top; }

/* 넓은 표는 그 안에서만 옆으로 밀립니다 */
.doc .scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 아직 채우지 못한 자리 */
.doc .blank {
  display: inline-block;
  min-width: 90px;
  padding: 1px 8px;
  border-radius: 6px;
  background: #fff4d6;
  color: #8a6a12;
  font-size: 13.5px;
  font-weight: 700;
}

.doc-nav {
  display: flex;
  gap: 10px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
