/* 공개 페이지(랜딩, 요금, 약관) 공통. 웹 디자인 0.0.2 기준(데스크톱 1280 이상, 모바일 390). 640px 이하는 모바일 대지를 따른다.
   색 중 --bg(#FBFBF9), --text(#1C1C1A), --line, --line-strong은 tokens.css 값을 그대로 쓴다.
   0.0.2에서 새로 생긴 색은 아래 --v-* 로 둔다. 디자인이 확정되면 tokens.css로 옮긴다. */
@import url("tokens.css");

:root {
  --v-tomato: #A8382B;
  --v-tomato-deep: #7E2219;
  --v-cream: #F7F1E8;
  --v-blush: #F6DDD5;
  --v-cream-line: rgba(247, 241, 232, .3);
  --v-sub: #5F5F5A;
  --v-body: #3F3F3B;
  --v-bar-off: #E2E2DD;
  --v-night: #1C1C1A;
  --v-night-sub: #BDBDB6;
  --v-night-faint: #9C9C95;
  --v-night-line: #3A3A37;
  --v-night-tab: #5A5A55;
  --v-serif: "Gowun Batang", serif;
  --v-sans: "IBM Plex Sans KR", "Apple SD Gothic Neo", sans-serif;
  --v-mono: "IBM Plex Mono", "IBM Plex Sans KR", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; overflow-x: clip; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--v-tomato); color: var(--v-cream); font-family: var(--v-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip; word-break: keep-all; overflow-wrap: break-word; }
h1, h2, p, pre { margin: 0; }
a { color: var(--v-tomato); }
a:hover { color: var(--v-tomato-deep); }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--v-cream); outline-offset: 3px; }
.on-paper :focus-visible { outline-color: var(--v-tomato); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 48px; }
.serif { font-family: var(--v-serif); font-weight: 700; }
.show-m { display: none !important; }
.br-m { display: none; }

/* 머리줄 */
.head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 88px; }
.logo { font-size: 21px; font-weight: 600; letter-spacing: -0.3px; color: var(--v-cream); text-decoration: none; }
.logo:hover { color: var(--v-cream); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-link { padding: 10px 12px; color: var(--v-cream); font-size: 15px; text-decoration: none; }
.nav-link:hover { color: var(--v-cream); text-decoration: underline; text-underline-offset: 6px; }
.nav-link[aria-current="page"] { font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.back { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--v-cream); }
.back:hover { color: var(--v-cream); }

/* 버튼 */
.btn { cursor: pointer; border: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 60px; padding: 0 28px; font-family: var(--v-sans); font-size: 18px; font-weight: 600; text-decoration: none; background: var(--v-cream); color: var(--v-tomato); transition: transform .1s, filter .2s; -webkit-tap-highlight-color: transparent; }
.btn:hover { filter: brightness(1.05); color: var(--v-tomato); }
.btn:active { transform: translateY(1px); }
.btn--sm { height: 44px; padding: 0 18px; font-size: 15px; margin-left: 6px; }
.btn--md { height: 56px; padding: 0 26px; font-size: 17px; gap: 8px; }
.btn--tomato { background: var(--v-tomato); color: #FFFFFF; }
.btn--tomato:hover { color: #FFFFFF; }
.btn--line { background: transparent; color: var(--v-cream); box-shadow: inset 0 0 0 1.5px rgba(247, 241, 232, .45); }
.btn--line:hover { color: var(--v-cream); filter: none; box-shadow: inset 0 0 0 1.5px var(--v-cream); }

/* 바닥글 */
.foot { position: relative; border-top: 1px solid var(--v-cream-line); }
.foot-cta { padding-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.foot-line { font-family: var(--v-serif); font-weight: 700; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.2; color: var(--v-cream); }
.foot-links { padding-top: 40px; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: var(--v-blush); }
.foot-links a { color: var(--v-blush); }
.foot-links a:hover { color: var(--v-cream); }
.wordmark { height: 23vw; max-height: 300px; overflow: hidden; margin-top: 24px; display: flex; align-items: flex-start; justify-content: center; }
.wordmark span { font-family: var(--v-sans); font-weight: 600; font-size: min(27vw, 360px); line-height: .9; letter-spacing: -0.06em; color: var(--v-cream); }

/* 토마토: 굴러 들어오기(roll 또는 tm-in) > 뛰기(tm-hop) > 떠 있기(tm-float) 세 겹 */
.tomato { position: absolute; pointer-events: none; }
.tomato > *, .tomato .tm-hop, .tomato .tm-float { width: 100%; height: 100%; }
.tomato svg { display: block; width: 100%; height: 100%; }
.tm-hop { transform-origin: 50% 100%; }
.tm-float { animation: tmFl 4s ease-in-out infinite; }
@keyframes tmFl { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(var(--float, 14px) * -1)); } }
@keyframes tmHop { 0%, 100% { transform: none; } 40% { transform: translateY(calc(var(--hop, 46px) * -1)) rotate(-6deg); } }
@media (hover: hover) {
  .hop-zone:has(.btn:hover) .tm-hop { animation: tmHop .6s cubic-bezier(.3, 1.6, .5, 1) infinite; }
}
.hop-zone:has(.btn:active) .tm-hop { animation: tmHop .6s cubic-bezier(.3, 1.6, .5, 1); }
.tm-in { animation: tmIn 1.1s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes tmIn { 0% { transform: translateX(var(--in-x, 60vw)) rotate(300deg); } 100% { transform: none; } }

/* 알림 */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; background: var(--v-night); color: #FFFFFF; font-size: 14px; font-weight: 500; z-index: 20; animation: toastIn .3s ease-out; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
@keyframes toastIn { 0% { opacity: 0; transform: translate(-50%, 8px); } 100% { opacity: 1; transform: translate(-50%, 0); } }

/* 탭(알약) */
.pill-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-tab { cursor: pointer; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--tab-line, rgba(247, 241, 232, .5)); background: transparent; color: var(--v-cream); font: 600 15px var(--v-sans); transition: background .2s, color .2s, border-color .2s; }
.pill-tab[aria-selected="true"] { background: var(--v-cream); color: var(--v-tomato); border-color: var(--v-cream); }

/* 스크롤 반응. --p는 0(아직 안 보임)에서 1(제자리)까지. site.js가 실제 스크롤 위치로 값을 넣는다.
   스크립트가 없거나 움직임 줄이기면 --p는 1로 남아 모든 내용이 제자리에 보인다. */
.sv-out, .sv-zoom, .sv-word, .sv-fade, .sv-tilt, .sv-type, .sv-grow, .sv-roll, .sv-rise { --p: 1; }
.sv-live { will-change: transform, opacity; }
.sv-out { opacity: var(--p); transform: translateY(calc((1 - var(--p)) * var(--out-y, -140px))); }
.sv-zoom { transform: scale(calc(1 + (1 - var(--p)) * var(--zoom, .4))); }
.sv-word { opacity: calc(.12 + .88 * var(--p)); transform: translateX(calc((1 - var(--p)) * -14%)); }
.sv-fade { opacity: var(--p); transform: translateY(calc((1 - var(--p)) * var(--fade-y, 36px))); }
.sv-tilt { opacity: calc(.25 + .75 * var(--p)); transform: perspective(1200px) rotateX(calc((1 - var(--p)) * 32deg)) rotate(calc((1 - var(--p)) * -6deg)) translateY(calc((1 - var(--p)) * var(--tilt-y, 140px))); }
.sv-type { clip-path: inset(0 0 calc((1 - var(--p)) * 100%) 0); }
.sv-grow { opacity: calc(.15 + .85 * var(--p)); transform: scale(calc(.78 + .22 * var(--p))); }
.sv-roll { transform: translateX(calc((1 - var(--p)) * var(--roll-x, 70vw))) rotate(calc((1 - var(--p)) * 320deg)); }
.sv-rise { transform: translateY(calc((1 - var(--p)) * 80%)); }

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .hide-m { display: none !important; }
  .show-m { display: flex !important; }
  .br-m { display: inline; }
  .head { height: 56px; margin-top: 14px; }
  .head .nav { margin-right: -8px; }
  .nav-link { height: 44px; display: flex; align-items: center; }
  .btn { height: 56px; font-size: 17px; }
  .btn--block-m { display: flex; width: 100%; }
  .foot-cta { padding-top: 40px; flex-direction: column; align-items: stretch; gap: 18px; }
  .foot-line { font-size: 28px; line-height: 1.25; }
  .foot-links { padding-top: 26px; gap: 4px 16px; font-size: 13px; }
  .foot-links a { min-height: 32px; display: inline-flex; align-items: center; }
  .foot-links span { min-height: 32px; display: inline-flex; align-items: center; }
  .wordmark { margin-top: 20px; }
  .toast { left: 16px; right: 16px; bottom: 24px; transform: none; text-align: center; font-size: 13px; animation-name: toastInM; }
  @keyframes toastInM { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: none; } }
  .pill-tab { font-size: 14px; }
  .sv-out { --out-y: -80px; }
  .sv-zoom { --zoom: .35; }
  .sv-fade { --fade-y: 24px; }
  .sv-tilt { --tilt-y: 90px; }
  .sv-roll { --roll-x: 120%; }
  .tm-float { --float: 8px; }
  .tm-hop { --hop: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .sv-out, .sv-zoom, .sv-word, .sv-fade, .sv-tilt, .sv-type, .sv-grow, .sv-roll, .sv-rise { --p: 1 !important; }
  .tm-float, .tm-hop, .tm-in, .toast { animation: none !important; }
  .btn, .pill-tab { transition: none; }
}
