/* ===== GMarket — custom styles ===== */

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

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== Nav ===== */
#nav.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.nav-link {
  position: relative;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: #4f46e5;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover { color: #0f172a; }
.nav-link:hover::after { transform: scaleX(1); }

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-radius: 0.75rem;
  box-shadow: 0 6px 16px -4px rgba(79, 70, 229, 0.4), 0 2px 4px rgba(79, 70, 229, 0.15);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}
.btn-primary:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 12px 24px -6px rgba(79, 70, 229, 0.5), 0 4px 8px rgba(79, 70, 229, 0.2);
}
.btn-primary:active { transform: translateY(0) scale(1); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-weight: 600; color: #0f172a;
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.75rem;
  transition: all 0.25s ease;
}
.btn-ghost:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}

.btn-primary-light {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-weight: 600; color: #0f172a;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px -6px rgba(255,255,255,0.2);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}
.btn-primary-light:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 16px 40px -8px rgba(255,255,255,0.3);
}

.btn-ghost-light {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-weight: 600; color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  transition: all 0.25s ease;
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ===== Hero ===== */
.hero-bg {
  background:
    radial-gradient(ellipse at top, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
.blob-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #a5b4fc 0%, transparent 70%);
  top: -160px; left: -140px;
  animation: float 14s ease-in-out infinite;
}
.blob-2 {
  width: 620px; height: 620px;
  background: radial-gradient(circle, #c4b5fd 0%, transparent 70%);
  bottom: -220px; right: -180px;
  animation: float 18s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, -30px) scale(1.08); }
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.scroll-line {
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%      { opacity: 1;   transform: scaleY(1.3); }
}

/* ===== Reveal animation (IntersectionObserver) ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

/* ===== Feature cards ===== */
.card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -16px rgba(79, 70, 229, 0.18), 0 4px 8px rgba(15, 23, 42, 0.04);
  border-color: rgba(99, 102, 241, 0.25);
}
.card-icon {
  width: 3rem; height: 3rem;
  border-radius: 0.875rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s ease;
}
.card:hover .card-icon { transform: scale(1.08) rotate(-3deg); }
.card-title {
  margin-top: 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-text {
  margin-top: 0.5rem;
  color: #64748b;
  line-height: 1.6;
}
.card-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4f46e5;
  transition: transform 0.25s ease;
}
.card:hover .card-link { transform: translateX(3px); }

/* ===== Feature list ===== */
.feature-point {
  display: flex; align-items: flex-start; gap: 0.75rem;
  color: #334155; font-size: 1rem;
}
.feature-check {
  flex-shrink: 0;
  width: 1.5rem; height: 1.5rem;
  border-radius: 9999px;
  background: #e0e7ff;
  color: #4f46e5;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}

/* ===== Visual frame / mock window ===== */
.visual-frame {
  position: relative;
}
.glow-ring {
  position: absolute; inset: -40px;
  background:
    radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.25), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(168, 85, 247, 0.2), transparent 60%);
  filter: blur(40px);
  z-index: -1;
  border-radius: 2rem;
}

.mock-window {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.25rem;
  box-shadow:
    0 40px 80px -20px rgba(15, 23, 42, 0.2),
    0 12px 24px -12px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  transform: perspective(1000px) rotateX(2deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.mock-window:hover { transform: perspective(1000px) rotateX(0deg) translateY(-4px); }

.mock-header {
  display: flex; align-items: center;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  gap: 0.4rem;
}
.dot { width: 0.65rem; height: 0.65rem; border-radius: 9999px; display: inline-block; }
.dot-r { background: #f87171; }
.dot-y { background: #fbbf24; }
.dot-g { background: #34d399; }

.mock-body { padding: 1.5rem; }

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  align-items: end;
  height: 110px;
}
.bar {
  height: var(--h, 50%);
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  border-radius: 0.4rem;
  transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: bottom;
  animation: bar-grow 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.bar:nth-child(1) { animation-delay: 0.1s; }
.bar:nth-child(2) { animation-delay: 0.2s; }
.bar:nth-child(3) { animation-delay: 0.3s; }
.bar:nth-child(4) { animation-delay: 0.4s; }
.bar:nth-child(5) { animation-delay: 0.5s; }
.bar:nth-child(6) { animation-delay: 0.6s; }
.bar:nth-child(7) { animation-delay: 0.7s; }

@keyframes bar-grow {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

.mini-stat {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

/* ===== Product tiles ===== */
.product-tile {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.6rem;
  transition: transform 0.3s ease;
}
.product-tile:hover { transform: translateY(-3px); }
.product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0.5rem;
  position: relative;
  overflow: hidden;
}
.product-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 60%);
}

/* ===== Stats ===== */
.stat-card { padding: 1.5rem 0.5rem; }
.stat-num {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

/* ===== Info blocks ===== */
.info-block {
  padding: 1.25rem 1.5rem;
  border-left: 2px solid #e0e7ff;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.info-block:hover {
  border-left-color: #4f46e5;
  transform: translateX(4px);
}
.info-title { font-size: 1rem; font-weight: 700; color: #0f172a; }
.info-text { margin-top: 0.35rem; font-size: 0.9rem; color: #64748b; line-height: 1.5; }

/* ===== Quote cards ===== */
.quote-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 1.25rem;
  padding: 2rem;
  text-align: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.quote-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -16px rgba(15, 23, 42, 0.12);
}
.quote-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #334155;
  font-weight: 500;
}
.quote-author {
  margin-top: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.avatar {
  width: 2.5rem; height: 2.5rem;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700;
}

/* ===== Final CTA ===== */
.cta-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.cta-blob-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.5) 0%, transparent 70%);
  top: -150px; left: -100px;
  animation: float 16s ease-in-out infinite;
}
.cta-blob-2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 70%);
  bottom: -200px; right: -120px;
  animation: float 20s ease-in-out infinite reverse;
}

/* ===== Footer ===== */
.footer-title {
  color: #fff;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.footer-link {
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s ease;
}
.footer-link:hover { color: #fff; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
