/* ============================================================
   D-BET Landing — style.css
   디자인 문서 기반 (모바일 우선, 최대폭 480px 중앙정렬)
============================================================ */

/* --- Paperozi (Paperlogy) 선별 로드: 300/400/500/700/800/900 --- */
@font-face {
  font-family: 'Paperozi';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-3Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Paperozi';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Paperozi';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-5Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Paperozi';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Paperozi';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Paperozi';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-9Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

/* --- Design Tokens --- */
:root {
  --bg: #081633;
  --bg-2: #0d1f47;
  --point: #2d8bff;
  --point-hover: #4a9eff;
  --point-soft: rgba(45, 139, 255, 0.32);
  --text: #ffffff;
  --text-sub: #c9d4f2;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.08);
  --divider: rgba(201, 212, 242, 0.15);

  /* 전체 페이지 배경 이미지 */
  --bg-page-image: url('../assets/images/네온 아트 배경.png');

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;

  --dock-h: 64px;

  font-family: 'Paperozi', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
    'Segoe UI', Roboto, sans-serif;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}
body {
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  font-weight: 400;
  font-size: 16px;
  background-color: #050818;
  background-image:
    linear-gradient(
      180deg,
      rgba(8, 22, 51, 0.48) 0%,
      rgba(4, 8, 22, 0.78) 100%
    ),
    var(--bg-page-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
img,
svg {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- 컨테이너: 최대 480px 중앙 고정 --- */
.hero,
.value,
.final,
.dock,
.sheet__panel {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   [1] Hero
============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(env(safe-area-inset-top) + 48px) 24px
    calc(var(--dock-h) + env(safe-area-inset-bottom) + 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* ============================================================
   Hero BG — body 배경 이미지가 비치도록 투명 + 은은한 비네트만
============================================================ */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.hero__bg::before {
  display: none;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 85% 65% at 50% 50%,
    transparent 0%,
    rgba(2, 6, 20, 0.35) 100%
  );
  opacity: 0.85;
}

.hero__inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__brand {
  margin: 0 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__brand img {
  width: clamp(160px, 48vw, 220px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 22px rgba(45, 139, 255, 0.22));
}

.hero__title {
  margin: 0 0 14px;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero__title br + * {
  display: block;
}

/* 제목 2번째 줄 (CTA 아래 배치) */
.hero__title.hero__title--2 {
  margin-top: 18px;
}

/* ---- 히어로 알림 박스 (블루톤 그라데이션 테두리) ---- */
.hero__notice {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 6px auto 18px;
  padding: 14px 22px 16px;
  border-radius: 14px;
  background: rgba(12, 26, 60, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(45, 139, 255, 0.08) inset;
  overflow: hidden;
  isolation: isolate;
}

/* 그라데이션 테두리 (강-약-강-약 블루톤) */
.hero__notice::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(79, 172, 255, 0.95) 0%,
    rgba(45, 139, 255, 0.35) 28%,
    rgba(120, 190, 255, 0.9) 55%,
    rgba(45, 139, 255, 0.2) 80%,
    rgba(79, 172, 255, 0.8) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* 은은한 내부 글로우 — 중앙에 약하게 */
.hero__notice::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse at 50% 40%,
    rgba(45, 139, 255, 0.18) 0%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 0;
}

.hero__notice > span {
  position: relative;
  z-index: 2;
  display: block;
  text-align: center;
}

/* 1줄: 약한 강조 (작고 옅은 블루계 그레이) */
.hero__notice-line1 {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text-sub);
  opacity: 0.85;
}

/* 2줄: 강한 강조 (크고 굵게, 키워드 블루 포인트) */
.hero__notice-line2 {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.hero__notice-line2 em {
  font-style: normal;
  font-weight: 800;
  color: #4faaff;
  padding: 0 2px;
  background: linear-gradient(
    180deg,
    transparent 55%,
    rgba(45, 139, 255, 0.22) 55%,
    rgba(45, 139, 255, 0.22) 95%,
    transparent 95%
  );
  border-radius: 2px;
  text-shadow: 0 0 12px rgba(45, 139, 255, 0.35);
}

.hero__sub {
  margin: 0 0 32px;
  color: var(--text-sub);
  font-size: 16px;
  font-weight: 400;
}

.hero__cta {
  width: 100%;
  max-width: 320px;
}

.hero__trust {
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero__trust .check {
  color: #6be07c;
  font-weight: 700;
}
.hero__trust .dot {
  opacity: 0.5;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 16px);
  width: 18px;
  height: 28px;
  border: 1.5px solid rgba(201, 212, 242, 0.35);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  opacity: 0.8;
}
.hero__scroll span {
  display: block;
  width: 2px;
  height: 6px;
  background: var(--text-sub);
  border-radius: 2px;
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  70% {
    transform: translateY(8px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 0;
  }
}

/* ============================================================
   [2] Value + Stats
============================================================ */
.value {
  padding: 64px 24px 48px;
}

.section__header {
  text-align: center;
  margin: 0 0 28px;
}
.section__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.section__title em {
  font-style: normal;
  color: var(--point);
  font-weight: 900;
}
.section__desc {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 400;
}

.cards {
  display: grid;
  gap: 12px;
  margin: 0 0 28px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  transition: transform 0.2s ease, border-color 0.2s ease,
    background 0.2s ease;
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.card__icon {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(45, 139, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}
.card__desc {
  margin: 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
}

/* Stats 배너 */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px 12px;
}
.stat {
  text-align: center;
  position: relative;
  padding: 4px 2px;
}
.stat + .stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--divider);
}
.stat__num {
  display: block;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}
.stat__num span {
  font-size: 14px;
  font-weight: 700;
  color: var(--point);
  margin-left: 2px;
}
.stat__label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-sub);
  line-height: 1.4;
}

/* ============================================================
   [3] Final CTA
============================================================ */
.final {
  padding: 48px 24px 64px;
}
.final__inner {
  background:
    radial-gradient(
      circle at 80% 0%,
      rgba(45, 139, 255, 0.2),
      transparent 60%
    ),
    var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
}
.final__title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.final__title em {
  font-style: normal;
  color: var(--point);
  font-weight: 900;
}
.final__desc {
  margin: 0 0 24px;
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 400;
}
.final__actions {
  display: grid;
  gap: 10px;
}

/* ============================================================
   Buttons
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: transform 0.1s ease, box-shadow 0.2s ease,
    background 0.2s ease, border-color 0.2s ease;
  user-select: none;
  will-change: transform;
}
.btn:active {
  transform: scale(0.96);
}

.btn--lg {
  min-height: 56px;
  font-size: 17px;
}

.btn--primary {
  background: var(--point);
  color: #fff;
  box-shadow: 0 4px 16px var(--point-soft);
}
.btn--primary:hover {
  background: var(--point-hover);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn__icon {
  font-size: 18px;
  line-height: 1;
}

/* Pulse — 메인 CTA 전용 (약하게) */
.btn--pulse {
  position: relative;
}
.btn--pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(45, 139, 255, 0.55);
  animation: pulseRing 2s ease-out infinite;
  pointer-events: none;
}
@keyframes pulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 139, 255, 0.5);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(45, 139, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45, 139, 255, 0);
  }
}

/* ============================================================
   Bottom Dock (고정 네비)
============================================================ */
.bottom-spacer {
  height: calc(var(--dock-h) + env(safe-area-inset-bottom) + 16px);
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 68% 32%;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(
    180deg,
    rgba(8, 22, 51, 0.75),
    rgba(8, 22, 51, 0.96) 50%,
    rgba(8, 22, 51, 1)
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--divider);
}

.dock__primary,
.dock__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.1s ease, background 0.2s ease;
}
.dock__primary:active,
.dock__secondary:active {
  transform: scale(0.97);
}

.dock__primary {
  background: var(--point);
  color: #fff;
  box-shadow: 0 4px 16px var(--point-soft);
}
.dock__primary:hover {
  background: var(--point-hover);
}

.dock__secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 15px;
}
.dock__secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dock__icon {
  font-size: 18px;
  line-height: 1;
}

/* ============================================================
   Contact Bottom Sheet
============================================================ */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
}
.sheet[aria-hidden='false'] {
  pointer-events: auto;
  visibility: visible;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sheet[aria-hidden='false'] .sheet__backdrop {
  opacity: 1;
}

.sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0c1d44;
  border-top: 1px solid var(--card-border);
  border-radius: 20px 20px 0 0;
  padding: 12px 24px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
}
.sheet[aria-hidden='false'] .sheet__panel {
  transform: translateY(0);
}

.sheet__handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  margin: 6px auto 14px;
}
.sheet__title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}
.sheet__desc {
  margin: 0 0 20px;
  color: var(--text-sub);
  font-size: 14px;
  text-align: center;
}
.sheet__actions {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}
.sheet__close {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-sub);
  font-weight: 500;
  border-radius: 10px;
}
.sheet__close:hover {
  color: #fff;
}

/* ============================================================
   Reveal 애니메이션
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: calc(var(--reveal-delay, 0ms));
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero 진입 연출 (지연 기반) */
.hero .reveal[data-delay='0']   { transition-delay: 0ms; }
.hero .reveal[data-delay='100'] { transition-delay: 100ms; }
.hero .reveal[data-delay='200'] { transition-delay: 200ms; }
.hero .reveal[data-delay='300'] { transition-delay: 300ms; }
.hero .reveal[data-delay='500'] { transition-delay: 500ms; }
.hero .reveal[data-delay='700'] { transition-delay: 700ms; }
.hero .reveal[data-delay='900'] { transition-delay: 900ms; }

/* 접근성: 모션 선호도 감소 */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .btn--pulse::after,
  .hero__scroll span {
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   반응형 (최대폭 480 고정, 360~430 기본)
============================================================ */
@media (max-width: 359px) {
  .hero__title {
    font-size: 28px;
  }
  .section__title,
  .final__title {
    font-size: 22px;
  }
  .stat__num {
    font-size: 19px;
  }
  .dock {
    grid-template-columns: 64% 36%;
  }
}

/* 넓은 화면: 동일 배경, 살짝만 밝은 오버레이로 이미지가 더 드러나게 */
@media (min-width: 481px) {
  body {
    background-image:
      linear-gradient(
        180deg,
        rgba(8, 22, 51, 0.38) 0%,
        rgba(4, 8, 22, 0.72) 100%
      ),
      var(--bg-page-image);
  }
}

/* 모바일: fixed 배경 이슈 방지 */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
}
