:root {
  /* Matches the Android app theme (ui/theme/Color.kt) */
  --bg: #17171c;
  --card: #202027;
  --grey-100: #2c2c35;
  --grey-200: #3c3c47;
  --grey-500: #7e7e87;
  --grey-600: #9e9ea4;
  --grey-700: #c3c3c6;
  --text: #f9fafb;
  --blue: #3182f6;
  --player: #4593fc;
  --banker: #f04452;
  --tie: #1fbf75;
  --warning: #ffc342;

  --radius: 20px;
  --max: 1120px;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }

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

.accent { color: var(--blue); }
.c-p { color: var(--player); }
.c-b { color: var(--banker); }
.c-t { color: var(--tie); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  border-radius: 14px;
  padding: 14px 22px;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #4a92f7; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--small { padding: 8px 16px; font-size: 14px; border-radius: 10px; }
.btn--kakao { background: #FEE500; color: #191919; }
.btn--kakao:hover { background: #f5dc00; }

.btn--play { background: #000; border: 1px solid var(--grey-200); padding: 10px 22px 10px 18px; }
.btn--play:hover { background: #0b0b0e; border-color: var(--grey-500); }
.btn--play span { display: flex; flex-direction: column; font-size: 20px; line-height: 1.1; }
.btn--play small { font-size: 10px; font-weight: 500; letter-spacing: .08em; color: var(--grey-700); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(23, 23, 28, .8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--grey-100); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand img { border-radius: 8px; }
.brand b { color: var(--blue); }
.nav__links { display: flex; gap: 28px; font-size: 15px; color: var(--grey-600); }
.nav__links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
  background:
    radial-gradient(600px 400px at 0% 100%, rgba(240, 68, 82, .12), transparent 70%),
    radial-gradient(700px 500px at 100% 0%, rgba(49, 130, 246, .14), transparent 70%);
}
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; }

.pill {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 { font-size: clamp(48px, 8vw, 84px); font-weight: 800; }
.hero__lead { margin-top: 20px; font-size: clamp(18px, 2.4vw, 24px); color: var(--grey-700); }

.legend { display: flex; align-items: center; gap: 10px; margin-top: 32px; }
.legend__label { margin-left: 12px; font-size: 13px; letter-spacing: .1em; color: var(--grey-500); }

.dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.dot--p { background: var(--player); }
.dot--b { background: var(--banker); }
.dot--t { background: var(--tie); }

.hero__cta { margin-top: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero__note { font-size: 14px; color: var(--grey-500); }

/* ---------- Phone mockup ---------- */
.hero__visual { position: relative; display: flex; justify-content: center; }
.glow {
  position: absolute;
  inset: 10% 15%;
  background: radial-gradient(circle, rgba(49, 130, 246, .35), transparent 65%);
  filter: blur(40px);
  z-index: 0;
}
.phone {
  position: relative;
  z-index: 1;
  width: 290px;
  aspect-ratio: 9 / 19;
  background: #0d0d11;
  border: 10px solid #26262e;
  border-radius: 44px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.phone__notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 22px;
  background: #000;
  border-radius: 999px;
  z-index: 2;
}
.phone__screen {
  height: 100%;
  padding: 48px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg);
}

.scan {
  position: relative;
  flex: 1;
  border-radius: 16px;
  background: #0e1626;
  border: 1px solid #1d2b45;
  overflow: hidden;
  padding: 12px;
}
.road {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-auto-rows: 1fr;
  grid-auto-flow: column;
  grid-template-rows: repeat(6, 1fr);
  gap: 5px;
  height: 100%;
}
.road i {
  border-radius: 50%;
  border: 2px solid transparent;
  aspect-ratio: 1;
  align-self: center;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .3s ease, transform .3s ease;
}
.road i.on { opacity: 1; transform: scale(1); }
.road i.p { border-color: var(--player); box-shadow: 0 0 6px rgba(69, 147, 252, .5); }
.road i.b { border-color: var(--banker); box-shadow: 0 0 6px rgba(240, 68, 82, .5); }

.scan__line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  box-shadow: 0 0 12px var(--blue);
  animation: scan 2.4s ease-in-out infinite;
}
@keyframes scan {
  0%, 100% { top: 4%; }
  50% { top: 94%; }
}

.result {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.result__label { font-size: 13px; color: var(--grey-600); }
.result__value {
  font-size: 30px;
  font-weight: 800;
  min-height: 42px;
  display: grid;
  place-items: center;
}
.result__value.pop { animation: pop .35s ease; }
@keyframes pop {
  0% { transform: scale(.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--grey-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.phone__btn {
  background: var(--blue);
  color: #fff;
  text-align: center;
  font-weight: 700;
  padding: 14px;
  border-radius: 14px;
  font-size: 15px;
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--blue); margin-bottom: 12px; }
.section h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }

.card {
  background: var(--card);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--grey-600); font-size: 15px; }

.steps {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.step__num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(49, 130, 246, .15);
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 18px;
}

.features {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.feature__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--grey-100);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 18px;
}

.privacy {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 32px;
  align-items: center;
  padding: 40px;
}
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li {
  position: relative;
  padding-left: 32px;
  color: var(--grey-700);
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tie) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- CTA ---------- */
.cta__inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta__icon { border-radius: 22px; margin-bottom: 8px; box-shadow: 0 12px 40px rgba(49, 130, 246, .3); }
.cta p { color: var(--grey-600); margin-bottom: 12px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--grey-100); padding: 48px 0 40px; }
.notice {
  background: rgba(255, 195, 66, .06);
  border: 1px solid rgba(255, 195, 66, .2);
  border-radius: 16px;
  padding: 24px 28px;
}
.notice h3 { font-size: 15px; color: var(--warning); margin-bottom: 10px; }
.notice ul { margin: 0; padding-left: 18px; color: var(--grey-600); font-size: 14px; display: grid; gap: 4px; }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.footer__contact { margin-top: 28px; font-size: 14px; color: var(--grey-600); text-align: center; }
.footer__contact a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer__copy { margin-top: 28px; font-size: 13px; color: var(--grey-500); text-align: center; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scan__line, .spinner { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 48px 0 72px; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { display: flex; flex-direction: column; align-items: center; }
  .hero__cta { align-items: center; }
  .steps { grid-template-columns: 1fr; }
  .privacy { grid-template-columns: 1fr; padding: 28px; }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
  .section { padding: 64px 0; }
  .features { grid-template-columns: 1fr; }
  .legend__label { display: none; }
  .phone { width: 250px; }
}
