/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f2e;
  --bg-card-hover: #222840;
  --text-primary: #f0f2f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-start: #6366f1;
  --accent-end: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --border-color: rgba(255, 255, 255, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-sans: 'Pretendard Variable', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --container-max: 1120px;
  --header-height: 64px;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
}

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

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  border-radius: 6px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-primary);
}

.nav-link--cta {
  color: var(--accent-end);
}

.nav-link--cta:hover {
  color: #a5b4fc;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: calc(var(--header-height) + 80px) 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end), #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Store button */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-store:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.btn-store:active {
  transform: translateY(0);
}

.btn-store--large {
  padding: 16px 32px;
}

.btn-store--large .store-name {
  font-size: 1.15rem;
}

.store-icon {
  flex-shrink: 0;
}

.store-text {
  display: flex;
  flex-direction: column;
}

.store-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.store-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

/* Screenshot carousel */
.hero-visual {
  display: flex;
  justify-content: center;
}

.screenshot-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.carousel-track {
  position: relative;
  width: 280px;
  height: 607px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.phone-frame {
  width: 280px;
  border-radius: 32px;
  padding: 8px;
  background: #1a1f2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 80px var(--accent-glow);
  overflow: hidden;
}

.phone-frame img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  display: block;
}

.slide-label {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
}

.carousel-dots {
  display: flex;
  gap: 10px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}

.carousel-dot.active {
  background: var(--accent-end);
  transform: scale(1.2);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.3);
}

.carousel-dot.active:hover {
  background: var(--accent-end);
}

/* Hero background glow */
.hero-bg-glow {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ===== Features ===== */
.features {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 56px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: background 0.2s, border-color 0.2s, transform 0.3s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(129, 140, 248, 0.08));
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  color: var(--accent-end);
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ===== How It Works ===== */
.how-it-works {
  padding: 100px 0;
  background: var(--bg-secondary);
}

.steps {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.step-number {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.step-content {
  padding-top: 4px;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.step-connector {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, var(--accent-start), transparent);
  margin: 4px 0 4px 23px;
  border-radius: 2px;
}

/* ===== CTA ===== */
.cta {
  position: relative;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
}

.cta-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.cta-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cta-bg-glow {
  position: absolute;
  bottom: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ===== Footer ===== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  border-radius: 4px;
}

.footer-name {
  font-weight: 700;
  font-size: 1rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Scroll Fade-In ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 20px;
  }

  .nav-link {
    font-size: 1rem;
  }

  .menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding: calc(var(--header-height) + 48px) 0 48px;
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .carousel-track {
    width: 240px;
    height: 524px;
  }

  .phone-frame {
    width: 240px;
    border-radius: 28px;
    padding: 6px;
  }

  .phone-frame img {
    border-radius: 22px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    padding: 24px 20px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .hide-mobile {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .step {
    gap: 16px;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .step-connector {
    margin-left: 19px;
    height: 32px;
  }
}

/* ===== Focus styles ===== */
:focus-visible {
  outline: 2px solid var(--accent-end);
  outline-offset: 2px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}
