/* Wayary — wayary.com. 구성은 영상 앱 소개(video/src/Film.tsx), 색은 앱(lib/app/theme.dart):
   코랄(오늘 경로)과 파랑(지나간 날 얼룩)을 옅게 깔고, 돌아보기 한 칸만 진한 코랄. */
@font-face { font-family: "Pretendard"; font-weight: 400; font-display: swap; src: url("/fonts/Pretendard-Regular.363b0aad.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 600; font-display: swap; src: url("/fonts/Pretendard-SemiBold.4c3a9b34.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 700; font-display: swap; src: url("/fonts/Pretendard-Bold.ab924143.woff2") format("woff2"); }

:root {
  --coral: #ff5a36;
  --coral-ink: #c23a1c;
  --blue-wash: #edf2ff;
  --coral-wash: #ffede6;
  --bg: #ffffff;
  --low: #f6f7f9;
  --ink: #17191c;
  --ink-2: #5b6168;
  --ink-3: #8a9199;
  --line: #e6e8ec;
  --gutter: clamp(20px, 5vw, 56px);
  --wide: 1180px;
  --side: max(var(--gutter), calc((100% - var(--wide)) / 2));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.7 "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 8px; }

/* 머리 */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding: 22px var(--side); }
.legal .top { position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand__name { font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.01em; }
.brand__say { color: var(--ink-3); font-size: 0.9375rem; }

/* ── 폰 목업(3D) ──
   치수는 영상의 Phone(392×825, 화면 여백 10, 모서리 50/42)을 em으로(1em = 폰 너비/24.5).
   앞면 뒤로 금속 판 16장(build.py가 색을 계산)을 쌓아 두께 2.4em — 기울이면 옆면과 버튼이 보인다. */
.phone {
  --pw: 340px; --rx: 0deg; --ry: 0deg; --rz: 0deg;
  position: relative;
  width: var(--pw);
  aspect-ratio: 392 / 825;
  font-size: calc(var(--pw) / 24.5);
  perspective: 150em;
  flex: none;
}
.phone__3d {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz));
}
.phone__layer, .phone__back, .phone__front { position: absolute; inset: 0; border-radius: 3.125em; }
.phone__back { background: #2a2e34; box-shadow: 0 2.4em 4.6em rgba(23, 25, 28, 0.26), 0 0.6em 1.4em rgba(23, 25, 28, 0.16); }
.phone__front {
  padding: 0.625em;
  background: #0c0d0f;
  /* 앞면 가장자리: 밝은 금속 띠 한 줄 */
  box-shadow: inset 0 0 0 0.11em #e4e7eb, inset 0 0 0 0.2em #3b4047;
  transform: translateZ(0.02em);
}
.phone__screen { position: relative; width: 100%; height: 100%; border-radius: 2.625em; overflow: hidden; background: #fff; }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; }
.phone__cam { position: absolute; top: 0.55em; left: 50%; width: 0.9em; height: 0.9em; margin-left: -0.45em; border-radius: 50%; background: #0c0d0f; box-shadow: inset 0 0 0 0.14em #22262b; }
.phone__glare {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.07) 26%, rgba(255, 255, 255, 0) 40%);
}
/* 옆면 버튼: 옆면에 붙인 판(오른쪽 전원, 왼쪽 음량) */
.phone__btn {
  position: absolute; width: 1.2em; border-radius: 0.3em;
  background: linear-gradient(90deg, #8d939b, #e3e6ea 50%, #8d939b);
}
.phone__btn--power { left: 100%; top: 25%; height: 9%; transform-origin: 0 50%; transform: translateX(0.06em) rotateY(90deg) translateX(0.6em); }
.phone__btn--vol { right: 100%; top: 19%; height: 14%; transform-origin: 100% 50%; transform: translateX(-0.06em) rotateY(-90deg) translateX(-0.6em); }
.phone__shadow {
  position: absolute; left: 12%; right: 12%; bottom: -5%; height: 9%;
  background: radial-gradient(closest-side, rgba(23, 25, 28, 0.28), rgba(23, 25, 28, 0));
  filter: blur(0.7em);
}
.phone--tilt-r { --ry: -20deg; --rx: 5deg; }
.phone--tilt-l { --ry: 18deg; --rx: 5deg; }

/* 폰 안 강조(영상: 코랄 3px 박스 7% 채움 / 흰 점 + 파문) */
.hit { position: absolute; pointer-events: none; }
.hit--box { border: 3px solid var(--coral); border-radius: 12px; background: rgba(255, 90, 54, 0.07); }
.hit--dot { width: 0; height: 0; }
.hit--dot::before, .hit--dot::after { content: ""; position: absolute; left: 0; top: 0; border-radius: 50%; translate: -50% -50%; }
.hit--dot::before { width: 18px; height: 18px; background: #fff; box-shadow: 0 0 0 4px var(--coral), 0 0 10px rgba(255, 90, 54, 0.6); }
.hit--dot::after { width: 18px; height: 18px; border: 2px solid var(--coral); opacity: 0; }
.hit__anchor { position: absolute; left: 0; top: 50%; width: 1px; height: 1px; }
.hit__anchor--right { left: auto; right: 0; }
.hit--dot .hit__anchor { left: 0; top: 0; }

/* ── 첫 화면 ── */
.hero {
  position: relative;
  text-align: center;
  padding: calc(74px + clamp(16px, 5vw, 56px)) var(--gutter) 0;
  overflow: hidden;
  background:
    radial-gradient(55% 48% at 14% 6%, rgba(255, 90, 54, 0.2), rgba(255, 90, 54, 0) 72%),
    radial-gradient(50% 42% at 88% 16%, rgba(61, 123, 255, 0.14), rgba(61, 123, 255, 0) 72%),
    linear-gradient(180deg, #fff4ef 0%, #fff8f6 55%, #ffffff 100%);
}
.hero > * { position: relative; }
.hero__icon { width: 84px; height: 84px; margin: 0 auto 28px; border-radius: 20px; box-shadow: 0 12px 32px rgba(255, 90, 54, 0.32); }
h1 {
  font-weight: 700;
  font-size: clamp(2.75rem, 1.5rem + 5.2vw, 5.5rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}
.hero__sub { margin: 24px auto 0; max-width: 34em; color: var(--ink-2); font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); }
.wide-only { display: none; }
@media (min-width: 720px) { .wide-only { display: inline; } }

/* 스토어 버튼(검은 배지 모양) */
.stores { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.store {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 58px; padding: 0 24px 0 20px; border-radius: 16px;
  font-weight: 600; font-size: 1.0625rem; text-decoration: none; white-space: nowrap;
}
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store--ready { background: var(--ink); color: #fff; box-shadow: 0 8px 20px rgba(23, 25, 28, 0.18); transition: background-color 0.15s, transform 0.15s; }
.store--ready:hover { background: #33373d; }
.store--ready:active { transform: scale(0.98); }
.store--soon { background: rgba(255, 255, 255, 0.7); color: var(--ink-2); box-shadow: inset 0 0 0 1px #d5d9df; cursor: default; }
.store--soon svg { color: var(--ink-3); }
.store--soon .store__soon { color: var(--ink-3); font-weight: 400; }

/* 첫 화면 폰 셋(가운데 홈, 뒤 양옆) — 아래는 다음 칸으로 녹아듦 */
.hero__stage {
  position: relative;
  height: calc(clamp(220px, 27vw, 360px) * 1.66);
  margin: clamp(48px, 7vw, 80px) auto 0;
  max-width: var(--wide);
  -webkit-mask-image: linear-gradient(to bottom, #000 66%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 66%, transparent 99%);
}
.hero__stage .phone { position: absolute; left: 50%; top: 0; translate: -50% 0; }
.hero__stage .phone--fan-c { --pw: clamp(220px, 27vw, 360px); --rx: 6deg; z-index: 2; }
.hero__stage .phone--fan-l, .hero__stage .phone--fan-r { --pw: clamp(190px, 23vw, 310px); top: 9%; }
.hero__stage .phone--fan-l { --ry: 26deg; --rx: 6deg; --rz: -3deg; translate: calc(-50% - clamp(150px, 21vw, 300px)) 0; }
.hero__stage .phone--fan-r { --ry: -26deg; --rx: 6deg; --rz: 3deg; translate: calc(-50% + clamp(150px, 21vw, 300px)) 0; }

/* ── 기능 한 가지 = 글 + 기울인 폰 + 코랄 선 ── */
.label { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em; }
.label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
h2 {
  margin-top: 14px;
  font-weight: 700;
  font-size: clamp(2.125rem, 1.4rem + 2.6vw, 3.75rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
}
.feat__sub { margin-top: 18px; max-width: 19em; color: var(--ink-2); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); }
/* 선이 시작하는 점: 제목 끝(글이 왼쪽) 또는 제목 왼쪽 바깥(글이 오른쪽) — 영상과 같음 */
.feat h2 { position: relative; }
.lead-dot { display: inline-block; width: 10px; height: 10px; margin-left: 0.4em; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 90, 54, 0.16); vertical-align: 0.2em; }
.lead-dot--start { position: absolute; left: -28px; bottom: 0.5em; margin: 0; }

.feat {
  position: relative;
  padding: clamp(64px, 10vw, 128px) var(--side);
  display: grid;
  gap: 48px;
  justify-items: center;
}
/* 위아래 칸이 이어지게: 흰 → 파랑 → 코랄 → 흰 */
.feat:nth-of-type(2) { background: linear-gradient(180deg, #ffffff 0%, var(--blue-wash) 100%); }
.feat:nth-of-type(3) { background: linear-gradient(180deg, var(--blue-wash) 0%, var(--coral-wash) 100%); }
.feat:nth-of-type(4) { background: linear-gradient(180deg, var(--coral-wash) 0%, #fff6f2 100%); }
.feat .phone { --pw: clamp(250px, 70vw, 330px); --ry: -10deg; --rx: 4deg; }
.feat__text { justify-self: stretch; }
@media (min-width: 900px) {
  .feat { grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
  .feat .phone { --pw: clamp(300px, 29vw, 372px); }
  .feat--text-left .phone { --ry: -20deg; --rx: 5deg; }
  .feat--text-right .phone { --ry: 18deg; --rx: 5deg; }
  .feat--text-left .feat__text { padding-left: clamp(0px, 4vw, 60px); }
  .feat--text-right .feat__text { padding-left: clamp(16px, 4vw, 72px); }
}
@media (max-width: 899px) {
  .feat--text-right .phone { order: 2; }
  .feat .lead-dot { display: none; }
}

/* 선: app.js가 글 끝 점 → 폰 안 강조로 그림 */
.leads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 3; }
.leads path { fill: none; stroke: var(--coral); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(255, 90, 54, 0.45)); }

/* 그려지기 전/후 */
.js .feat .hit { opacity: 0; transition: opacity 0.35s, transform 0.45s cubic-bezier(.2, .9, .3, 1.2); transform: scale(0.96); }
.js .feat .hit--dot { transform: none; }
.js .feat.is-in .hit { opacity: 1; transform: none; }
.js .feat.is-in .hit--dot::after { animation: ripple 1.1s ease-out 0.15s 1; }
@keyframes ripple { from { opacity: 0.9; width: 18px; height: 18px; } to { opacity: 0; width: 72px; height: 72px; } }

/* ── 돌아보기: 진한 코랄 띠 위에 폰 셋을 부채처럼(가운데가 맨 위·앞) ── */
.replay {
  position: relative;
  padding: clamp(72px, 10vw, 128px) var(--gutter) clamp(88px, 12vw, 152px);
  text-align: center;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, #ff8357 0%, #ff5a36 50%, #ec4128 100%);
}
.replay .label { color: rgba(255, 255, 255, 0.88); }
.replay .label::before { background: #fff; }
.replay .feat__sub { margin-left: auto; margin-right: auto; max-width: 30em; color: rgba(255, 255, 255, 0.9); }
.replay__phones {
  --pw: clamp(120px, 25vw, 300px);
  display: flex; justify-content: center; align-items: flex-start;
  margin-top: clamp(44px, 6vw, 72px);
}
.replay__phones .phone { --pw: inherit; }
.replay .phone__back { box-shadow: 0 2.4em 4.6em rgba(110, 24, 6, 0.38), 0 0.6em 1.4em rgba(110, 24, 6, 0.2); }
.replay .phone__shadow { background: radial-gradient(closest-side, rgba(110, 24, 6, 0.4), rgba(110, 24, 6, 0)); }
.phone--spread-c { z-index: 2; --rx: 4deg; }
.phone--spread-l, .phone--spread-r { margin-top: calc(var(--pw) * 0.2); }
.phone--spread-l { --ry: 24deg; --rz: -5deg; --rx: 4deg; margin-right: calc(var(--pw) * -0.12); }
.phone--spread-r { --ry: -24deg; --rz: 5deg; --rx: 4deg; margin-left: calc(var(--pw) * -0.12); }

/* ── 개인정보 ── */
.private {
  padding: clamp(64px, 10vw, 128px) var(--side) clamp(40px, 6vw, 72px);
  text-align: center;
}
.private__list {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid; gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 10px 30px rgba(23, 25, 28, 0.05);
}
@media (min-width: 820px) { .private__list { grid-template-columns: repeat(3, 1fr); } }
.private__list li { background: var(--bg); padding: clamp(24px, 3vw, 36px); }
.private__list svg { width: 28px; height: 28px; fill: none; stroke: var(--coral); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.private__list h3 { margin-top: 18px; font-size: 1.1875rem; font-weight: 700; }
.private__list p { margin-top: 6px; color: var(--ink-2); font-size: 1rem; }

/* ── 마무리 ── */
.closing {
  position: relative;
  padding: clamp(72px, 10vw, 136px) var(--gutter) clamp(88px, 12vw, 152px);
  text-align: center; overflow: hidden;
  background:
    radial-gradient(50% 60% at 50% 70%, rgba(255, 90, 54, 0.16), rgba(255, 90, 54, 0) 72%),
    radial-gradient(40% 50% at 85% 30%, rgba(61, 123, 255, 0.08), rgba(61, 123, 255, 0) 72%),
    linear-gradient(180deg, #ffffff 0%, #fff4ef 100%);
}
.closing > * { position: relative; }
.closing img { width: 64px; height: 64px; margin: 0 auto 24px; border-radius: 15px; box-shadow: 0 10px 26px rgba(255, 90, 54, 0.3); }
.closing h2 { margin-top: 0; }

/* 발 */
.foot { border-top: 1px solid var(--line); background: var(--low); }
.foot__inner {
  margin: 0 auto; padding: 28px var(--side) 44px;
  display: grid; gap: 14px;
  font-size: 0.8125rem; color: var(--ink-3);
}
@media (min-width: 760px) {
  .foot__inner { grid-template-columns: 1fr auto; align-items: start; }
  .foot__copy { grid-column: 1 / -1; }
}
.foot__company { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot__company div { display: flex; gap: 8px; }
.foot__company dd { color: var(--ink-2); }
.foot__company a, .foot__links a { text-decoration: none; }
.foot__company a:hover, .foot__links a:hover { color: var(--ink); text-decoration: underline; }
.foot__links { display: flex; gap: 18px; }
.foot__links a { color: var(--ink-2); }
.foot__links a:first-child { font-weight: 600; color: var(--ink); }

/* 방침·약관 */
.legal { background: linear-gradient(180deg, #fff4ef 0, #ffffff 360px); }
.doc { max-width: 46rem; margin: 24px auto 96px; padding: 0 var(--gutter); }
.doc h1 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem); letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 28px; }
.doc h2 { margin: 44px 0 12px; font-size: 1.1875rem; font-weight: 700; letter-spacing: 0; line-height: 1.5; }
.doc p, .doc li { font-size: 1rem; line-height: 1.8; }
.doc p + p, .doc p + ul, .doc ul + p, .doc ol + p { margin-top: 10px; }
.doc ul, .doc ol { margin: 8px 0; padding-left: 1.3em; }
.doc ul { list-style: disc; }
.doc li + li { margin-top: 4px; }
.doc a { color: var(--coral-ink); overflow-wrap: anywhere; }
.doc strong { font-weight: 600; }
.table-wrap { margin: 14px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.875rem; line-height: 1.65; }
.doc th, .doc td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc th + th, .doc td + td { border-left: 1px solid var(--line); }
.doc tr:last-child td { border-bottom: 0; }
.doc th { background: var(--low); font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) { .doc table { min-width: 560px; } }

@media (prefers-reduced-motion: reduce) {
  .js .feat .hit { transition: none; }
  .js .feat.is-in .hit--dot::after { animation: none; }
}
