/* ─────────────────────────────────────────────────────────────
   맥스워크(MaxWalk) 홈페이지 공용 스타일
   디자인 시스템 출처: Figma "맥스워크 / 디자인 시스템"
   Primary core #FE3C25 · 중립색 slate 스케일
   라이트 모드 1벌. 홈(index.html) + 추후 하위 페이지 공용.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Primary (red-orange) scale — core #FE3C25 */
  --p-50:  #FFF0ED;
  --p-100: #FFE1DB;
  --p-200: #FFC6BD;
  --p-300: #FF9B8C;
  --p-400: #FF6955;
  --p-500: #FE3C25;   /* PRIMARY CORE */
  --p-600: #E3230E;
  --p-700: #BE1909;
  --p-800: #9D170B;
  --p-900: #82190F;
  --p-950: #470804;

  /* Neutral (slate) scale */
  --s-50:  #F8FAFC;
  --s-100: #F1F5F9;
  --s-200: #E2E8F0;
  --s-300: #CAD5E2;
  --s-400: #90A1B9;
  --s-500: #62748E;
  --s-600: #45556C;
  --s-700: #314158;
  --s-800: #1D293D;
  --s-900: #0F172B;

  /* Semantic */
  --brand: var(--p-500);
  --brand-strong: var(--p-600);
  --ink: var(--s-800);
  --muted: var(--s-500);
  --line: var(--s-200);
  --bg: #ffffff;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --container: 1160px;
  --shadow-sm: 0 1px 2px rgba(15,23,43,.06), 0 1px 3px rgba(15,23,43,.08);
  --shadow-md: 0 10px 30px -12px rgba(15,23,43,.18);
  --shadow-brand: 0 18px 40px -16px rgba(254,60,37,.55);

  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
          "Malgun Gothic", system-ui, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { margin: 0; line-height: 1.18; letter-spacing: -0.03em; font-weight: 800; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 16px; line-height: 1;
  padding: 15px 24px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--s-300); background: var(--s-50); }

/* App store badges */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--ink); color: #fff;
  padding: 11px 20px 11px 18px; border-radius: 14px;
  transition: transform .12s ease, background .18s ease;
}
.store-btn:hover { background: #0b1220; transform: translateY(-2px); }
.store-btn svg { width: 24px; height: 24px; flex: none; }
.store-btn .s-sub { font-size: 11px; opacity: .8; line-height: 1.1; }
.store-btn .s-main { font-size: 17px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.store-btn .s-txt { display: flex; flex-direction: column; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(226,232,240,.7);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand .symbol { width: 34px; height: 34px; }
.brand .wordmark { height: 21px; width: auto; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a.nav-link {
  padding: 9px 14px; border-radius: 999px; color: var(--s-600); font-weight: 600; font-size: 15px;
  transition: background .15s ease, color .15s ease;
}
.nav a.nav-link:hover { background: var(--s-100); color: var(--ink); }
.nav .btn { padding: 11px 20px; font-size: 15px; }

/* ── Section rhythm ── */
section { position: relative; }
.section-pad { padding-block: clamp(64px, 9vw, 120px); }
.eyebrow {
  display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand);
  background: var(--p-50); padding: 7px 14px; border-radius: 999px;
}
.section-head { max-width: 640px; margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); margin-top: 18px; }
.section-head .lead { margin-top: 16px; color: var(--muted); font-size: clamp(16px, 2vw, 19px); }

/* ── Hero ── */
.hero { overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 44%, rgba(255,255,255,.55) 76%, #fff 100%),
    linear-gradient(96deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.6) 32%, rgba(255,255,255,0) 60%),
    url("/assets/hero-bg.png");
  background-size: cover, cover, cover;
  background-position: center, center, center 28%;
  background-repeat: no-repeat;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
  padding-block: clamp(48px, 7vw, 96px);
}
.hero-kicker { font-size: clamp(16px, 1.9vw, 21px); font-weight: 700; color: var(--s-600); margin-bottom: 14px; letter-spacing: -0.02em; }
.hero-title { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin: 0; }
.hero-title .ht-line { font-size: clamp(27px, 4.2vw, 46px); font-weight: 800; color: var(--ink); line-height: 1.14; letter-spacing: -0.03em; }
.hero-logo { width: clamp(240px, 34vw, 360px); height: auto; filter: drop-shadow(0 6px 14px rgba(190,25,9,.18)); }
.hero-cta { margin-top: 34px; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.hero-note svg { width: 16px; height: 16px; color: var(--p-400); }

.hero-visual { position: relative; display: flex; justify-content: center; align-items: flex-end; }
.hero-visual .glow {
  position: absolute; inset: 2% 4% 0 4%; z-index: 0;
  background: radial-gradient(circle at 50% 46%, rgba(255,255,255,.95) 0%, rgba(255,255,255,.5) 42%, rgba(255,255,255,0) 68%);
  border-radius: 50%;
}
.hero-visual .mascot {
  position: relative; z-index: 1; width: min(420px, 82%); height: auto;
  filter: drop-shadow(0 30px 40px rgba(190,25,9,.28));
  animation: floaty 5.5s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Floating point coins around mascot */
.coin {
  position: absolute; z-index: 2; width: auto; height: auto;
  filter: drop-shadow(0 10px 16px rgba(190,25,9,.22));
}
.coin.k1 { width: 96px; top: 5%;  left: 1%;   animation: floaty 6s ease-in-out infinite; }
.coin.k2 { width: 60px; top: 40%; right: -1%; animation: floaty 5s ease-in-out .6s infinite; }
.coin.k3 { width: 76px; bottom: 12%; left: 1%; animation: floaty 6.5s ease-in-out .3s infinite; }
.coin.k4 { width: 50px; top: 20%; right: 13%; animation: floaty 5.5s ease-in-out .2s infinite; }

/* ── Features (toss 스타일 좌우 교차 행) ── */
.features { background: #fff; }
.feature-rows { margin-top: clamp(56px, 8vw, 88px); display: flex; flex-direction: column; gap: clamp(72px, 10vw, 132px); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 88px); align-items: center; }
.frow.reverse .frow-media { order: 2; }
.frow-media { position: relative; display: flex; justify-content: center; align-items: flex-start; }
.frow-media img {
  width: auto; height: clamp(360px, 46vw, 540px); max-width: 100%;
  /* 목업 하단이 본문 배경으로 자연스럽게 사라지도록 페이드아웃 */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 64%, transparent 98%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 64%, transparent 98%);
}
.frow-index {
  display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .06em;
  color: var(--brand); background: var(--p-50); padding: 6px 13px; border-radius: 999px;
}
.frow-text h3 { margin-top: 14px; font-size: clamp(25px, 3.3vw, 40px); line-height: 1.22; letter-spacing: -0.03em; }
.frow-text p { margin-top: 18px; font-size: clamp(16px, 1.7vw, 19px); color: var(--muted); line-height: 1.65; max-width: 27em; }

/* ── How it works ── */
.how { background: var(--s-50); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.step {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 34px 28px 30px;
}
.step-num {
  width: 46px; height: 46px; border-radius: 14px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 20px; box-shadow: var(--shadow-brand);
}
.step h3 { margin-top: 20px; font-size: 20px; }
.step p { margin-top: 9px; color: var(--muted); font-size: 15.5px; }
.step-arrow { display: none; }

/* ── CTA band ── */
.cta-band { background: linear-gradient(135deg, var(--p-500) 0%, var(--p-600) 55%, var(--p-700) 100%); color: #fff; overflow: clip; }
.cta-inner {
  display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center;
  padding-block: clamp(48px, 6vw, 72px); position: relative; min-height: 230px;
}
.cta-inner > div { max-width: 640px; }
.cta-inner h2 { font-size: clamp(26px, 3.6vw, 40px); color: #fff; }
.cta-inner p { margin-top: 14px; color: rgba(255,255,255,.9); font-size: 17px; }
.cta-inner .store-row { margin-top: 26px; }
.cta-band .store-btn { background: #fff; color: var(--ink); }
.cta-band .store-btn:hover { background: var(--s-100); }
.cta-mascot {
  position: absolute; right: clamp(8px, 4vw, 56px); bottom: -14px;
  height: 300px; width: auto;
  filter: drop-shadow(0 20px 26px rgba(71,8,4,.35));
}

/* ── Footer ── */
.site-footer { background: var(--s-900); color: var(--s-300); padding-block: 56px 40px; }
.site-footer .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.site-footer .f-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.site-footer .f-brand img { height: 26px; width: auto; }
.site-footer .biz { font-size: 14px; line-height: 1.9; color: var(--s-400); }
.site-footer .biz .co { color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.site-footer .biz a { color: var(--s-300); text-decoration: underline; text-underline-offset: 2px; }
.site-footer .links { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.site-footer .links a { color: var(--s-300); }
.site-footer .links a:hover { color: #fff; }
.site-footer .copy { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: var(--s-500); }

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Sub-page (약관/방침 등) ── */
.page { max-width: 880px; margin-inline: auto; padding-block: clamp(40px, 6vw, 80px); }
.page-head { padding-bottom: 26px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.page-head .eyebrow { margin-bottom: 16px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); }
.page-head .lead { margin-top: 14px; color: var(--muted); font-size: 16px; }
.prose { color: var(--s-700); font-size: 15.5px; line-height: 1.75; }
.prose h2 { font-size: clamp(19px, 2.4vw, 23px); color: var(--ink); margin-top: 46px; margin-bottom: 2px; letter-spacing: -0.02em; }
.prose > h2:first-child { margin-top: 0; }
.prose p { margin-top: 14px; }
.prose ul, .prose ol { margin-top: 14px; padding-left: 22px; }
.prose li { margin-top: 8px; }
.prose li::marker { color: var(--p-400); }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.prose .table-wrap { overflow-x: auto; margin-top: 18px; border: 1px solid var(--s-200); border-radius: 12px; }
.prose table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 14px; }
.prose thead th { background: var(--s-50); color: var(--ink); font-weight: 700; text-align: left; }
.prose th, .prose td { border-bottom: 1px solid var(--s-200); border-right: 1px solid var(--s-200); padding: 10px 13px; vertical-align: top; line-height: 1.6; }
.prose tr th:last-child, .prose tr td:last-child { border-right: 0; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) { background: #fbfcfe; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 12px; text-align: center; padding-block: 28px 44px; }
  .hero-copy { order: 2; }
  .hero-visual { order: 1; margin-bottom: 4px; }
  .hero-visual .mascot { width: min(280px, 68%); }
  .hero-title { align-items: center; }
  .coin.k1 { width: 74px; top: 8%; left: 2%; }
  .coin.k2 { width: 50px; top: 42%; right: 2%; }
  .coin.k3 { width: 60px; bottom: 13%; left: 3%; }
  .coin.k4 { width: 42px; top: 23%; right: 12%; }
  .hero-cta .store-row { justify-content: center; }
  .hero-note { justify-content: center; }
  .frow { grid-template-columns: 1fr; gap: 26px; text-align: center; }
  .frow.reverse .frow-media { order: 0; }
  .frow-media img { height: clamp(300px, 64vw, 430px); }
  .frow-text { display: flex; flex-direction: column; align-items: center; }
  .frow-text p { margin-inline: auto; }
  .cta-inner { grid-template-columns: 1fr; text-align: center; }
  .cta-inner .store-row { justify-content: center; }
  .cta-mascot { display: none; }
}
@media (max-width: 560px) {
  .nav .nav-link { display: none; }
  .brand .wordmark { display: none; }
  .btn { font-size: 15px; }
  .container { padding-inline: 18px; }
  .store-row { width: 100%; justify-content: center; }
  .store-btn { flex: 1 1 46%; min-width: 0; justify-content: center; padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
