/* ============================================
   재플리 Jaeply — Corporate Website
   Design: Light Modern / IT Startup
   ============================================ */

/* --- Tokens --- */
:root {
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F8FC;
  --color-surface: #FFFFFF;
  --color-border: #E8EAF0;
  --color-border-light: #F0F1F5;

  --color-text: #111827;
  --color-text-secondary: #6B7280;
  --color-text-muted: #9CA3AF;

  --color-primary: #4F46E5;
  --color-primary-hover: #4338CA;
  --color-primary-light: #EEF2FF;
  --color-primary-dim: rgba(79, 70, 229, 0.06);

  --color-green: #10B981;
  --color-green-light: #ECFDF5;

  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 100px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.1);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }

/* --- Dot Grid Background --- */
.dot-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #E5E7EB 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* --- Container --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* --- Common Elements --- */
.chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7C3AED 50%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
  margin-top: var(--space-sm);
}

.section-desc {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  margin-top: 0.75rem;
}

.hide-mobile { display: inline; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-full);
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
}

.btn--primary {
  padding: 0.7rem 1.6rem;
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}

.btn--primary svg { transition: transform 0.25s var(--ease-out); }
.btn--primary:hover svg { transform: translateX(3px); }

.btn--ghost {
  padding: 0.7rem 1.6rem;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.btn--ghost:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

.btn--sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
}

.btn--lg {
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
}

/* --- Pulse Dot --- */
.pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  position: relative;
}

.pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.4;
  animation: pulse 2s ease-in-out infinite;
}

.pulse--green { background: var(--color-green); }
.pulse--green::after { background: var(--color-green); }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.8); opacity: 0; }
}

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  box-shadow: 0 1px 0 var(--color-border-light);
}

.nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.nav__logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
}

.nav__logo-icon--sm {
  width: 28px;
  height: 28px;
}

/* Logo text fade animation */
.nav__logo-text {
  position: relative;
  display: inline-block;
  width: 3.2em;
}

.nav__logo-text-item {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.6s ease;
  white-space: nowrap;
}

.nav__logo-text-item.is-active {
  opacity: 1;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--color-text); }

.nav__links-cta {
  padding: 0.45rem 1.1rem !important;
  background: var(--color-text);
  color: #fff !important;
  border-radius: var(--radius-full);
  font-size: 0.825rem !important;
  transition: background 0.2s, transform 0.2s !important;
}

.nav__links-cta:hover {
  background: #000 !important;
  transform: translateY(-1px);
}

/* Mobile toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 4px 0;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}

.nav__toggle.is-active span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle.is-active span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-height) var(--space-md) var(--space-lg);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(79, 70, 229, 0.08) 0%, rgba(124, 58, 237, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  text-align: center;
  max-width: 720px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 0.45rem 1.1rem 0.45rem 0.85rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
}

.hero__title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-md);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  padding: var(--space-2xl) 0;
  background: var(--color-bg-alt);
}

.services__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

/* Featured Service Card */
.feature-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  padding: var(--space-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-md);
  transition: box-shadow 0.3s, transform 0.3s var(--ease-out);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-green);
  background: var(--color-green-light);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.feature-card__name {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.feature-card__desc {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.feature-card__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.feature-card__tags li {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

/* Mockup */
.feature-card__visual {
  display: flex;
  justify-content: center;
}

.feature-card__mockup {
  width: 280px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.mockup-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-light);
}

.mockup-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}

.mockup-content {
  padding: 20px;
}

.mockup-icon {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.mockup-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.mockup-line {
  height: 8px;
  background: var(--color-border-light);
  border-radius: 4px;
  margin-bottom: 8px;
}

.mockup-line--short { width: 60%; }

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

.mockup-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
}

.mockup-btn {
  height: 36px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  opacity: 0.8;
}

/* Services Carousel */
.services__carousel {
  overflow: hidden;
}

.services__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: var(--space-md);
  padding-bottom: 4px;
}

.services__track::-webkit-scrollbar {
  display: none;
}

.services__track .feature-card {
  flex: 0 0 100%;
  scroll-snap-align: center;
  margin-bottom: 0;
}

.services__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--space-md);
}

.services__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--color-border);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}

.services__dot.is-active {
  background: var(--color-primary);
  transform: scale(1.25);
}

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

.footer__business p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .feature-card {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .feature-card__visual {
    order: -1;
  }

}

@media (max-width: 768px) {
  :root {
    --space-lg: 2.5rem;
    --space-xl: 3.5rem;
    --space-2xl: 5rem;
  }

  .hide-mobile { display: none; }

  /* Mobile Nav */
  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
  }

  .nav__links.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav__links a {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--color-text) !important;
  }

  .nav__links-cta {
    margin-top: 0.5rem;
  }

  /* Hero */
  .hero { min-height: 90vh; min-height: 90dvh; }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero__actions .btn { width: 100%; max-width: 280px; justify-content: center; }

  /* Services */
  .feature-card { padding: var(--space-lg) var(--space-md); }

}

@media (max-width: 480px) {
  .feature-card__mockup { width: 100%; }
}
