/* ============================================
   긁GO Landing Page — Design from App
   Color Palette & Design Tokens from React Native App
   ============================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Backgrounds */
  --bg-primary: #141517;
  --bg-card: #2F3034;
  --bg-darkest: #0C0D0E;
  --bg-input: #1E2022;
  --bg-secondary: #414244;

  /* Accent */
  --accent: #00FFA3;
  --accent-dark: #00CC82;
  --accent-light: #225C50;
  --accent-bg: #0C312A;

  /* Text */
  --text-primary: #F5F5F5;
  --text-secondary: #C7CCDF;
  --text-tertiary: #90949F;
  --text-disabled: #6B717F;

  /* Border */
  --border: #414244;
  --border-light: #2F3034;
  --border-card: #3A3D41;
  --divider: #3A3D41;

  /* Status */
  --success: #00FFA3;
  --error: #E45F60;
  --warning: #F3DF34;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-xxl: 24px;
  --radius-full: 100px;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 20px;
  --sp-xxl: 24px;
  --sp-3xl: 40px;

  /* Font */
  --font: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.accent { color: var(--accent); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 163, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(20, 21, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.3s;
}
.nav.scrolled { background: rgba(20, 21, 23, 0.96); }

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-xxl);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent-dark); }

.nav-cta {
  background: var(--accent);
  color: var(--bg-primary) !important;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-weight: 700 !important;
  font-size: 13px !important;
}
.nav-cta:hover { background: var(--accent-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 255, 163, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-xxl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-tag {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent-light);
  margin-bottom: var(--sp-xxl);
}

.hero-title {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1.5px;
  margin-bottom: var(--sp-xl);
}

.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-buttons {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.hero-note {
  margin-top: var(--sp-lg);
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---------- SCRATCH CARD ---------- */
.hero-visual {
  display: flex;
  justify-content: center;
}

.scratch-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.scratch-hint {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  animation: hint-pulse 2s ease-in-out infinite;
}
@keyframes hint-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.scratch-container {
  width: 320px;
  height: 380px;
  position: relative;
  border-radius: var(--radius-xxl);
  overflow: hidden;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  border: 2px solid var(--border-card);
  cursor: grab;
  touch-action: none;
}
.scratch-container:active { cursor: grabbing; }

.scratch-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg-card);
  padding: 32px;
  text-align: center;
  z-index: 1;
}

.scratch-congrats {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
}

.scratch-message {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.scratch-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}

.btn-sm {
  padding: 12px 20px;
  font-size: 14px;
  justify-content: center;
}

#scratchCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  border-radius: var(--radius-xxl);
}

.scratch-container.revealed #scratchCanvas {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.scratch-container.revealed .scratch-hint-overlay {
  display: none;
}

/* ---------- SECTIONS COMMON ---------- */
.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-xxl);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: var(--sp-md);
}

.section-sub {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ---------- FEATURES ---------- */
.features {
  padding: 120px 0;
  background: var(--bg-darkest);
  position: relative;
}
.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-light);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent-light);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-bg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- HOW TO ---------- */
.howto {
  padding: 120px 0;
  position: relative;
}

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

.step {
  display: flex;
  gap: var(--sp-xxl);
  align-items: flex-start;
}

.step-number {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--bg-primary);
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.step-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.step-line {
  width: 2px;
  height: 32px;
  background: var(--border);
  margin-left: 23px;
}

.step-badges {
  display: flex;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
  flex-wrap: wrap;
}

.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  color: #fff;
}
.badge-kakao { background: #FEE500; color: #191919; }
.badge-naver { background: #03C75A; }
.badge-google { background: var(--bg-secondary); }
.badge-apple { background: #fff; color: #000; }

/* ---------- WHY 긁GO ---------- */
.why {
  padding: 120px 0;
  background: var(--bg-darkest);
  position: relative;
}
.why::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

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

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  text-align: center;
  transition: all 0.3s ease;
}
.why-card:hover {
  border-color: var(--accent-light);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent-light);
}

.why-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-bg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.why-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.why-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ---------- DOWNLOAD ---------- */
.download {
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download-glow {
  position: absolute;
  bottom: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 255, 163, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.download-content { position: relative; z-index: 1; }

.download-title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: var(--sp-lg);
  line-height: 1.3;
}

.download-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.download .hero-buttons { justify-content: center; }

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

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-xxl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
}

.footer-logo {
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-disabled);
}
.footer-contact {
  font-size: 13px;
  color: var(--text-tertiary);
}
.footer-contact a {
  color: var(--text-tertiary);
  transition: color 0.2s;
}
.footer-contact a:hover { color: var(--accent); }

/* ---------- SCROLL ANIMATIONS ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .hero-title { font-size: 40px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(20, 21, 23, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border-light);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
  }
  .nav-links.open { transform: translateY(0); visibility: visible; }

  .hero { padding: 80px 0 40px; min-height: auto; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-title { font-size: 32px; }
  .hero-buttons { justify-content: center; }
  .hero-visual { order: -1; }
  .scratch-container { width: 280px; height: 340px; }

  .section-title { font-size: 28px; }
  .features-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }

  .why-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }

  .download-title { font-size: 28px; }

  .features, .howto, .why, .download { padding: 80px 0; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 26px; }
  .btn { padding: 12px 20px; font-size: 14px; }
  .scratch-container { width: 260px; height: 320px; }
  .scratch-congrats { font-size: 24px; }
}
