/* ============================================================
   AI Workflow Lab — Home Page CSS
   Full-screen scroll landing, inspired by Hancom Docs AI
   ============================================================ */

/* ── Variables ── */
:root {
  --bg:          #07090f;
  --bg2:         #0d1117;
  --surface:     rgba(255,255,255,.04);
  --border:      rgba(255,255,255,.08);
  --border-h:    rgba(255,255,255,.16);
  --text:        #f1f5f9;
  --text-2:      #94a3b8;
  --text-3:      #475569;
  --blue:        #3b82f6;
  --purple:      #8b5cf6;
  --cyan:        #06b6d4;
  --green:       #10b981;
  --grad:        linear-gradient(135deg, #3b82f6, #8b5cf6);
  --grad-text:   linear-gradient(135deg, #60a5fa, #a78bfa, #67e8f9);
  --shadow-glow: 0 0 80px rgba(59,130,246,.18);
  --radius:      20px;
  --transition:  0.6s cubic-bezier(.22,.68,0,1.2);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Gradient text utility ── */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   SECTION BASE
   ============================================================ */
.hl-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.section-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Section label ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.25);
  font-size: .8125rem;
  font-weight: 600;
  color: #60a5fa;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* ── Section heading ── */
.section-heading {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-sub {
  font-size: 1.0625rem;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 560px;
}

/* ============================================================
   SECTION 1 — HERO
   ============================================================ */
.hero-section {
  padding: 0;
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Video background */
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .28;
}

.hero-video-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(7,9,15,.3) 0%,
    rgba(7,9,15,.1) 40%,
    rgba(7,9,15,.7) 85%,
    rgba(7,9,15,1) 100%
  );
}

/* Animated mesh orbs */
.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,.22) 0%, transparent 70%);
  top: -100px; left: -100px;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,.18) 0%, transparent 70%);
  top: -80px; right: -80px;
  animation-delay: -3s;
}

.hero-orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,.14) 0%, transparent 70%);
  bottom: 0; left: 30%;
  animation-delay: -6s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 15px) scale(.97); }
}

/* Grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 20%, transparent 100%);
  pointer-events: none;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding: 80px 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.3);
  font-size: .8125rem;
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 36px;
  letter-spacing: .02em;
}

.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin-bottom: 28px;
}

.hero-title .line { display: block; }

.hero-title .highlight {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 48px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 32px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 32px rgba(59,130,246,.4);
  transition: transform .2s, box-shadow .2s;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(59,130,246,.55);
  color: #fff;
}

.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 32px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text);
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s;
}

.btn-hero-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.3);
  color: var(--text);
  transform: translateY(-2px);
}

/* Stats bar */
.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stat .num {
  display: block;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat .lbl {
  font-size: .8125rem;
  color: var(--text-3);
  font-weight: 500;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
}

.scroll-arrow {
  width: 32px; height: 32px;
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ============================================================
   SECTION 2 — PROBLEM / SCROLL TEXT
   ============================================================ */
.problem-section {
  background: var(--bg2);
  min-height: 100vh;
}

.problem-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(139,92,246,.08), transparent);
  pointer-events: none;
}

.problem-lines {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.problem-line {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.25;
  color: var(--text-3);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease, color .5s ease;
}

.problem-line.visible {
  opacity: 1;
  transform: translateY(0);
  color: var(--text);
}

.problem-line.visible .accent { color: #60a5fa; }
.problem-line.visible .accent2 { color: #a78bfa; }
.problem-line.visible .accent3 {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.problem-line:nth-child(2) { transition-delay: .15s; }
.problem-line:nth-child(3) { transition-delay: .3s; }
.problem-line:nth-child(4) { transition-delay: .45s; }
.problem-line:nth-child(5) { transition-delay: .6s; }

/* ============================================================
   SECTION 3 — FEATURES
   ============================================================ */
.features-section {
  background: var(--bg);
}

.features-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(59,130,246,.07), transparent);
  pointer-events: none;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, transform .35s, box-shadow .35s;
  opacity: 0;
  transform: translateY(50px);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .6s ease, transform .6s ease, border-color .3s, box-shadow .35s;
}

.feature-card:nth-child(2) { transition-delay: .1s; }
.feature-card:nth-child(3) { transition-delay: .2s; }
.feature-card:nth-child(4) { transition-delay: .3s; }

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity .3s;
}

.feature-card:hover {
  border-color: var(--border-h);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}

.feature-card:hover::before { opacity: .04; }

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.feature-icon-1 { background: rgba(59,130,246,.15); color: #60a5fa; }
.feature-icon-2 { background: rgba(139,92,246,.15); color: #a78bfa; }
.feature-icon-3 { background: rgba(16,185,129,.15); color: #34d399; }
.feature-icon-4 { background: rgba(6,182,212,.15);  color: #22d3ee; }

.feature-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.feature-desc {
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: .875rem;
  font-weight: 600;
  color: #60a5fa;
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: gap .2s;
}

.feature-link:hover { gap: 10px; color: #93c5fd; }

/* ============================================================
   SECTION 4 — MODALITIES
   ============================================================ */
.modality-section {
  background: var(--bg2);
}

.modality-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 80% 50%, rgba(139,92,246,.08), transparent);
  pointer-events: none;
}

.modality-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 56px;
}

.modality-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  opacity: 0;
  transform: translateY(40px) scale(.95);
  cursor: default;
}

.modality-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity .5s ease, transform .5s ease, border-color .3s, box-shadow .3s;
}

.modality-card:nth-child(1) { transition-delay: 0s; }
.modality-card:nth-child(2) { transition-delay: .08s; }
.modality-card:nth-child(3) { transition-delay: .16s; }
.modality-card:nth-child(4) { transition-delay: .24s; }
.modality-card:nth-child(5) { transition-delay: .32s; }

.modality-card:hover {
  border-color: rgba(255,255,255,.22);
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(0,0,0,.45);
}

.modality-icon {
  font-size: 1.75rem;
  margin-bottom: 16px;
  display: block;
  transition: transform .3s;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modality-card:hover .modality-icon { transform: scale(1.15) translateY(-4px); }

.modality-name {
  font-size: .875rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.modality-desc {
  font-size: .75rem;
  color: var(--text-3);
  line-height: 1.6;
}

/* ============================================================
   SECTION 5 — CTA
   ============================================================ */
.cta-section {
  min-height: 60vh;
  background: var(--bg);
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(59,130,246,.1), transparent),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(139,92,246,.08), transparent);
  pointer-events: none;
}

.cta-inner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.15;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.cta-title.visible { opacity: 1; transform: translateY(0); }

.cta-sub {
  font-size: 1.0625rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 40px;
  opacity: 0;
  transition: opacity .7s ease .15s, transform .7s ease .15s;
  transform: translateY(20px);
}

.cta-sub.visible { opacity: 1; transform: translateY(0); }

.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease .3s, transform .7s ease .3s;
}

.cta-buttons.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.home-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 24px 40px;
}

.home-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.home-footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9375rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.home-footer__copy {
  font-size: .8125rem;
  color: var(--text-3);
}

.home-footer__links {
  display: flex;
  gap: 24px;
}

.home-footer__links a {
  font-size: .8125rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color .2s;
}

.home-footer__links a:hover { color: var(--text-2); }

/* ============================================================
   ANIMATION HELPERS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease;
}

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

.fade-up.delay-1 { transition-delay: .1s; }
.fade-up.delay-2 { transition-delay: .2s; }
.fade-up.delay-3 { transition-delay: .3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .modality-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .hl-section { padding: 100px 20px 60px; }
  .features-grid { grid-template-columns: 1fr; }
  .modality-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 28px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-title { font-size: clamp(2.25rem, 8vw, 3.5rem); }
  .home-footer__inner { flex-direction: column; text-align: center; }
  .home-footer__links { justify-content: center; }
}

@media (max-width: 480px) {
  .modality-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 1.5rem; }
}
