/* 차박이네 소개 페이지
   밤하늘 남색(앱 아이콘 배경)과 트렁크 조명의 금빛, 그리고 앱의 신호등 세 색만 쓴다. */

:root {
  --night: #0d2550;
  --night-2: #16346b;
  --lamp: #f4c76a;
  --lamp-glow: rgba(244, 199, 106, 0.35);
  --paper: #f4f6fa;
  --surface: #ffffff;
  --ink: #17223a;
  --muted: #586379;
  --line: #dde3ee;
  --green: #30c35a;
  --amber: #ff9f0a;
  --red: #ff453a;
  --off: #2a3a5c;

  /* 둘러보기 하늘: 밤 → 새벽 → 아침 */
  --sky-night: #0a1d42;
  --sky-dusk: #24305f;
  --sky-dawn: #f0b49a;
  --sky-morning: #fbe3b8;

  /* 별: 크기가 다른 타일 네 장을 겹쳐 반복이 덜 보이게 한다 */
  --stars:
    radial-gradient(circle at 30px 40px, rgba(255, 255, 255, 0.85) 1px, transparent 1.6px),
    radial-gradient(circle at 150px 110px, rgba(255, 255, 255, 0.6) 1px, transparent 1.6px),
    radial-gradient(circle at 90px 170px, rgba(255, 236, 200, 0.75) 1.3px, transparent 2px),
    radial-gradient(circle at 200px 20px, rgba(255, 255, 255, 0.5) 0.8px, transparent 1.4px);
  --stars-size: 240px 200px, 310px 260px, 420px 330px, 190px 230px;

  --serif: "Gowun Batang", "AppleMyungjo", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --gutter: 16px;
  --max: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a1a38;
    --surface: #10244a;
    --ink: #e9eef8;
    --muted: #a3afc6;
    --line: #23396a;
    --sky-dawn: #5b3f63;
    --sky-morning: #26365f;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }
a:focus-visible, .store:focus-visible {
  outline: 3px solid var(--lamp);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.3; margin: 0; }
p { margin: 0; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- 신호등 ---------- */

.signal {
  display: inline-flex;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #0a1c3f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lamp {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--off);
  flex: none;
}
.lamp--green { --c: var(--green); }
.lamp--amber { --c: var(--amber); }
.lamp--red   { --c: var(--red); }
.lamp.is-on {
  background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent);
}

.signal--hero .lamp { width: 34px; height: 34px; }

/* 빨강 → 주황 → 초록이 4.8초마다 차례로 켜지기를 반복한다.
   세 불이 같은 키프레임을 쓰고, 음수 지연으로 1.6초씩 차례를 어긋나게 한다. */
.signal--hero .lamp {
  animation: cycle 4.8s ease-in-out infinite;
}
.signal--hero .lamp--red   { animation-delay: 0s; }
.signal--hero .lamp--amber { animation-delay: -3.2s; }
.signal--hero .lamp--green { animation-delay: -1.6s; }

@keyframes cycle {
  0%, 100% { background: var(--off); box-shadow: none; }
  5%, 28%  { background: var(--c); box-shadow: 0 0 24px 4px color-mix(in srgb, var(--c) 55%, transparent); }
  33%      { background: var(--off); box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .signal--hero .lamp, .hero::after { animation: none; }
  .signal--hero .lamp--green {
    background: var(--green);
    box-shadow: 0 0 24px 4px color-mix(in srgb, var(--green) 55%, transparent);
  }
}

/* ---------- 휴대폰 화면 ---------- */

.phone {
  margin: 0;
  width: 100%;
  max-width: 300px;
  border-radius: 40px;
  padding: 8px;
  background: #0b1630;
  box-shadow: 0 30px 60px -30px rgba(5, 15, 40, 0.55);
}
.phone img { border-radius: 32px; width: 100%; }

/* ---------- 첫 화면 ---------- */

.hero {
  position: relative;
  background:
    radial-gradient(520px 420px at 78% 58%, var(--lamp-glow), transparent 70%),
    linear-gradient(to bottom, #081a3a 0%, var(--night) 55%, #142f63 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--stars);
  background-size: var(--stars-size);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 85%);
  pointer-events: none;
}
.hero::before { opacity: 0.55; }
/* 두 번째 별 층은 위치를 비틀어 천천히 반짝인다 */
.hero::after {
  background-position: 70px 50px, 130px 10px, 20px 90px, 160px 140px;
  opacity: 0.2;
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: 0.6; } }

.hero__bar, .hero__inner { position: relative; z-index: 1; }

/* 별똥별: 머리(왼쪽 끝)가 밝고 꼬리가 사라지는 선을, 오른쪽 위에서 왼쪽 아래로 그으며 지나간다.
   한 주기의 앞 14%만 보이고 나머지는 쉬어서 가끔 떨어지는 느낌을 낸다. */
.meteors {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.meteors span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--len);
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #fff 0%, rgba(255, 236, 200, 0.6) 25%, transparent 100%);
  box-shadow: 0 0 8px 1px rgba(255, 255, 255, 0.35);
  opacity: 0;
  transform-origin: left center;
  animation: meteor var(--dur) linear var(--delay) infinite;
}
@keyframes meteor {
  0%   { opacity: 0; transform: rotate(-32deg) translateX(0); }
  2%   { opacity: 1; }
  12%  { opacity: 0.8; }
  14%  { opacity: 0; transform: rotate(-32deg) translateX(-560px); }
  100% { opacity: 0; transform: rotate(-32deg) translateX(-560px); }
}
@media (prefers-reduced-motion: reduce) {
  .meteors { display: none; }
}

.ridge {
  position: absolute;
  left: 0;
  bottom: -1px;
  z-index: 2;
  width: 100%;
  height: clamp(48px, 7vw, 110px);
  display: block;
}
.ridge__far { fill: #163467; }
.ridge__near { fill: var(--sky-night); }

.hero__bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}
.brand img { border-radius: 9px; }

.hero__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gutter) 0;
  display: grid;
  gap: 48px;
  justify-items: start;
}

.hero h1 {
  font-size: clamp(40px, 9vw, 72px);
  letter-spacing: -0.02em;
}

.signal--hero { margin: 28px 0 24px; }

.lede {
  max-width: 30em;
  color: #c9d4ea;
  font-size: 18px;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 14px;
  background: #fff;
  color: var(--night);
  font-weight: 700;
  text-decoration: none;
}
.store--soon {
  background: transparent;
  color: var(--lamp);
  box-shadow: inset 0 0 0 1.5px var(--lamp);
  cursor: default;
}

.phone--hero {
  justify-self: center;
  max-width: 300px;
  margin-bottom: -40px;
}
/* 글이 능선에 가리지 않게 능선 높이만큼 비워 둔다 */
.hero__copy { padding-bottom: clamp(24px, 9vw, 140px); }

@media (min-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding-top: 72px;
  }
  .phone--hero { margin-bottom: -60px; margin-top: 24px; }
}

/* ---------- 기능 둘러보기 ----------
   글과 휴대폰을 번갈아 놓는다. 섹션 전체 높이에 하늘을 깔아서 내려갈수록 밤에서 아침이 된다.
   단계 0~2는 밤(data-tone="night", 밝은 글), 3~5는 새벽·아침(data-tone="day"). */

.tour {
  position: relative;
  padding: 24px 0 40px;
  background: linear-gradient(to bottom,
    var(--sky-night) 0%,
    var(--sky-night) 22%,
    var(--sky-dusk) 42%,
    var(--sky-dawn) 56%,
    var(--sky-morning) 72%,
    var(--paper) 96%);
  overflow: hidden;
}
.tour::before {
  content: "";
  position: absolute;
  inset: 0 0 60% 0;
  background-image: var(--stars);
  background-size: var(--stars-size);
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
  pointer-events: none;
}

.step[data-tone="night"] {
  --step-ink: #ffffff;
  --step-muted: #b9c5de;
  --step-line: rgba(255, 255, 255, 0.14);
}
.step[data-tone="day"] {
  --step-ink: var(--ink);
  --step-muted: var(--muted);
  --step-line: var(--line);
}

.step {
  position: relative;
  padding: 64px 0;
  color: var(--step-ink);
}
.step__inner {
  display: grid;
  gap: 40px;
  justify-items: center;
}
.step__text { justify-self: stretch; max-width: 30em; }
.step h2 { font-size: clamp(26px, 5vw, 38px); letter-spacing: -0.01em; }
.step p { margin-top: 14px; }
.step .sub { color: var(--step-muted); }
.step .phone { max-width: 260px; }

.signal-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.signal-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
}
.signal-list .lamp { width: 26px; height: 26px; margin-top: 4px; }
.signal-list h3 { font-size: 20px; }
.signal-list p { margin-top: 0; color: var(--step-muted); }

.note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--step-line);
  color: var(--step-muted);
}

@media (min-width: 860px) {
  .step { padding: 96px 0; }
  .step__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 96px;
  }
  .step:nth-child(even) .step__text { order: 2; }
  .step .phone { max-width: 300px; }
}

/* 해돋이 (메달 단계): 해는 글이 있는 쪽 하늘에 떠서, 낮고 흐린 곳에서 천천히 올라오며 밝아진다.
   다 뜬 뒤에는 햇살이 아주 느리게 돈다. 글과 휴대폰은 해 위에 놓인다. */
.sunrise {
  --sun-size: 120px;
  --sun-x: 80%;
  --sun-y: 4%;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
/* 노을빛은 단계 경계에서 잘리지 않게 위아래로 넉넉히 펼쳐서 가장자리까지 다 사라지게 한다 */
.sunrise::before {
  content: "";
  position: absolute;
  inset: -40% -10%;
  background: radial-gradient(closest-side at var(--sun-x) 38%, rgba(255, 196, 120, 0.5), transparent);
}
/* .sun은 위치와 떠오름을 맡는 틀이고, ::before가 햇살, ::after가 해 원반이다(햇살이 원반 뒤에 그려진다) */
.sun {
  position: absolute;
  left: var(--sun-x);
  top: var(--sun-y);
  width: var(--sun-size);
  height: var(--sun-size);
  margin-left: calc(var(--sun-size) / -2);
}
.sun::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fff7dc 0%, #ffd27a 45%, #ff9d5c 100%);
  box-shadow:
    0 0 60px 20px rgba(255, 190, 110, 0.55),
    0 0 180px 90px rgba(255, 170, 100, 0.28);
}
.sun::before {
  content: "";
  position: absolute;
  inset: -130%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 224, 160, 0.28) 0deg 5deg, transparent 5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 68%);
  mask-image: radial-gradient(circle, #000 25%, transparent 68%);
  animation: sun-spin 80s linear infinite;
}
@keyframes sun-spin { to { transform: rotate(1turn); } }

.step__inner { position: relative; z-index: 1; }

@media (min-width: 860px) {
  /* 넓은 화면에서 이 단계는 글이 오른쪽에 있다 */
  .sunrise { --sun-size: 170px; --sun-x: 70%; --sun-y: 12%; }
}

.js .sunrise[data-reveal] { opacity: 1; transform: none; }
.js .sunrise::before { opacity: 0; transition: opacity 2.4s ease-out; }
.js .sun {
  opacity: 0.2;
  transform: translateY(220px) scale(0.8);
  transition:
    transform 2.8s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 2.2s ease-out;
}
.js .sun::before { opacity: 0; transition: opacity 1.6s ease-out 1.4s; }
.js .sunrise.is-visible::before,
.js .sunrise.is-visible .sun,
.js .sunrise.is-visible .sun::before { opacity: 1; }
.js .sunrise.is-visible .sun { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .sun::before { animation: none; }
  .js .sun, .js .sun::before, .js .sunrise::before { transition: none; }
}

/* 등장: 휴대폰은 뒤로 눕고 바깥쪽으로 기운 채 아래에서 떠올라 바로 서고, 글이 뒤따른다.
   기울기 방향은 휴대폰이 놓인 쪽을 따른다(홀수 단계는 오른쪽, 짝수 단계는 왼쪽). */
.step { --tilt: 7deg; }
.step:nth-child(even) { --tilt: -7deg; }

.js .step .phone {
  opacity: 0;
  transform: perspective(1400px) translateY(90px) rotateX(22deg) rotateZ(var(--tilt)) scale(0.92);
  transition:
    opacity 0.6s ease-out,
    transform 1.1s cubic-bezier(0.16, 0.84, 0.24, 1);
}
.js .step__text > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .step__text > :nth-child(1) { transition-delay: 0.15s; }
.js .step__text > :nth-child(2) { transition-delay: 0.27s; }
.js .step__text > :nth-child(3) { transition-delay: 0.39s; }

.js .step .phone.is-visible,
.js .step__text.is-visible > * { opacity: 1; transform: none; }

/* 글 묶음 자체는 숨기지 않는다(안의 줄만 움직인다) */
.js .step__text[data-reveal] { opacity: 1; transform: none; }

/* 신호 단계의 글이 나타나면 초록 → 주황 → 빨강 순서로 불이 켜진다 */
.js .signal-list .lamp { transition: background-color 0.35s ease-out, box-shadow 0.5s ease-out; }
.js .step__text:not(.is-visible) .signal-list .lamp.is-on { background: var(--off); box-shadow: none; }
.js .signal-list li:nth-child(1) .lamp { transition-delay: 0.5s; }
.js .signal-list li:nth-child(2) .lamp { transition-delay: 0.8s; }
.js .signal-list li:nth-child(3) .lamp { transition-delay: 1.1s; }

@media (prefers-reduced-motion: reduce) {
  .js .step .phone, .js .step__text > *, .js .signal-list .lamp { transition: none; }
}

/* ---------- 그리고 ---------- */

.more { padding: 88px 0; }

.more__list {
  margin: 32px 0 0;
  display: grid;
  gap: 32px;
}
.more__list dt { font-weight: 700; font-size: 19px; }
.more__list dd { margin: 6px 0 0; color: var(--muted); max-width: 34em; }

@media (min-width: 860px) {
  .more__list { grid-template-columns: 1fr 1fr; gap: 56px; }
}

/* ---------- 꼭 알아 두세요 ---------- */

.notice { padding: 0 0 48px; }

.notice__box {
  padding: 28px 28px 28px 24px;
  border-left: 4px solid var(--lamp);
  background: var(--surface);
  border-radius: 4px 16px 16px 4px;
}
.notice__box h2 { font-size: 22px; margin-bottom: 10px; }
.notice__box p { max-width: 40em; color: var(--muted); }

/* ---------- 차박 장면 (바닥글 위 경계) ----------
   남색 땅이 바닥글로 이어지고, 그 위에 차·타프·사람·나무 실루엣이 선다. */

.camp {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: 24px;
}
.camp svg { display: block; }
.camp__ground {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 40px;
  fill: var(--night);
}
.camp__scene {
  position: relative;
  width: min(92vw, 640px);
  height: auto;
  margin-bottom: 18px;
  fill: var(--night);
  overflow: visible;
}
.camp__line, .camp__limb {
  fill: none;
  stroke: var(--night);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.camp__tarp { opacity: 0.85; }
.camp__glow {
  fill: var(--lamp);
  filter: drop-shadow(0 0 6px rgba(244, 199, 106, 0.8));
}
.camp__fire {
  fill: #ffb347;
  filter: drop-shadow(0 0 8px rgba(255, 160, 70, 0.9));
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flicker 1.4s ease-in-out infinite alternate;
}
@keyframes flicker {
  0%   { transform: scale(1, 1); }
  30%  { transform: scale(0.92, 1.12); }
  60%  { transform: scale(1.06, 0.9); }
  100% { transform: scale(0.96, 1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .camp__fire { animation: none; }
}

/* ---------- 바닥글 ---------- */

.footer {
  background: var(--night);
  color: #c9d4ea;
  padding: 56px 0 48px;
  font-size: 15px;
}
.footer__inner { display: grid; gap: 28px; }

.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { border-radius: 12px; }
.footer__name { color: #fff; font-family: var(--serif); font-weight: 700; font-size: 20px; }

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.footer__copy { color: #8796b5; font-size: 14px; }

/* ---------- 스크롤 등장 ----------
   투어 아래 블록이 살짝 떠오른다. 스크립트가 없으면(.js 없음) 처음부터 다 보인다. */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    transition: none;
  }
}
