/* ══════════════════════════════════
   difai — Global Styles
   ══════════════════════════════════ */

:root {
  --color-bg: #0a0a0f;
  --color-bg-secondary: #111118;
  --color-bg-card: rgba(22, 22, 31, 0.7);
  --color-text: #e8e8ef;
  --color-text-secondary: #8888a0;
  --color-accent: #64b4ff;
  --color-accent-bright: #00d2ff;
  --color-accent-dim: rgba(100, 180, 255, 0.12);
  --color-border: rgba(255, 255, 255, 0.06);
  --max-width: 1160px;
  --font-main: 'Inter', 'Noto Sans KR', -apple-system, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

/* ── Keyframes ── */

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(100, 180, 255, 0.08); }
  50%      { box-shadow: 0 0 40px rgba(100, 180, 255, 0.18); }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@keyframes float-right {
  0%   { transform: translateX(0); }
  100% { transform: translateX(120vw); }
}

@keyframes float-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-120vw); }
}

/* ── Scroll Reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ══════════════════════════════════
   Navigation
   ══════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s;
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.95);
}

.nav-logo {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--color-text);
  text-decoration: none;
}

.nav-logo span {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  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); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: 0.2px;
}

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

/* ══════════════════════════════════
   Hero
   ══════════════════════════════════ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg);
}

#neuralCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.floating-code {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.floating-code .snippet {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-accent);
  white-space: nowrap;
  opacity: 0.12;
  pointer-events: none;
  letter-spacing: 0.5px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 0%, var(--color-bg) 70%);
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
  animation: fadeInUp 1s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--color-accent-dim);
  border: 1px solid rgba(100, 180, 255, 0.15);
  font-size: 13px;
  color: var(--color-accent);
  margin-bottom: 32px;
  font-weight: 500;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: blink 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.hero-title-gradient {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-bright), #a78bfa);
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 48px;
  font-weight: 300;
}

.hero-typewriter {
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--color-accent);
  margin-bottom: 48px;
  min-height: 28px;
}

.hero-typewriter .cursor {
  border-right: 2px solid rgba(100, 180, 255, 0.8);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

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

/* ── Buttons ── */

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  letter-spacing: 0.2px;
  font-family: var(--font-main);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-bright));
  color: #0a0a0f;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(100, 180, 255, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ══════════════════════════════════
   Section Common
   ══════════════════════════════════ */

.section {
  padding: 120px 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 600px;
  line-height: 1.7;
  font-weight: 300;
}

.divider {
  height: 1px;
  background: var(--color-border);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ══════════════════════════════════
   Services
   ══════════════════════════════════ */

.services-section {
  background: var(--color-bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 40px 32px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.service-card:hover {
  border-color: rgba(100, 180, 255, 0.2);
  transform: translateY(-4px);
  animation: pulse-glow 2s ease-in-out infinite;
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--color-accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 24px;
}

.service-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.service-card p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ══════════════════════════════════
   Achievements
   ══════════════════════════════════ */

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
}

.achievement-card {
  text-align: center;
  padding: 48px 32px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.achievement-number {
  font-size: 56px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}

.achievement-label {
  font-size: 15px;
  color: var(--color-text-secondary);
  font-weight: 400;
}

/* ══════════════════════════════════
   Philosophy
   ══════════════════════════════════ */

.philosophy-section {
  position: relative;
  padding: 160px 48px;
  text-align: center;
  overflow: hidden;
}

.philosophy-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(100, 180, 255, 0.05), transparent 70%);
  pointer-events: none;
}

.philosophy-quote {
  position: relative;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.5px;
  max-width: 900px;
  margin: 0 auto;
}

.philosophy-quote em {
  font-style: normal;
  color: var(--color-accent);
  font-weight: 500;
}

/* ══════════════════════════════════
   Process
   ══════════════════════════════════ */

.process-section {
  background: var(--color-bg-secondary);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 64px;
}

.process-step {
  position: relative;
  padding: 32px 24px;
}

.process-number {
  font-size: 48px;
  font-weight: 700;
  color: rgba(100, 180, 255, 0.1);
  font-family: var(--font-mono);
  margin-bottom: 16px;
  line-height: 1;
}

.process-step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.process-step p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ══════════════════════════════════
   Team
   ══════════════════════════════════ */

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 64px;
  max-width: 700px;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.team-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--color-accent-dim), rgba(167, 139, 250, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-accent);
  flex-shrink: 0;
}

.team-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.team-info p {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ══════════════════════════════════
   CTA
   ══════════════════════════════════ */

.cta-section {
  text-align: center;
  padding: 120px 48px;
  position: relative;
  overflow: hidden;
}

.cta-section .philosophy-bg {
  background: radial-gradient(ellipse at center, rgba(100, 180, 255, 0.04), transparent 60%);
}

.cta-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.cta-desc {
  font-size: 17px;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
  font-weight: 300;
}

/* ══════════════════════════════════
   Footer
   ══════════════════════════════════ */

.footer {
  border-top: 1px solid var(--color-border);
  padding: 48px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 13px;
  color: var(--color-text-secondary);
}

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

.footer-links a {
  font-size: 13px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ══════════════════════════════════
   Responsive
   ══════════════════════════════════ */

@media (max-width: 900px) {
  .nav { padding: 0 24px; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 0;
  }

  .nav-links.open { display: flex; }

  .nav-links li a {
    display: block;
    padding: 14px 24px;
    font-size: 16px;
  }

  .services-grid,
  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .section,
  .philosophy-section,
  .cta-section,
  .footer {
    padding-left: 24px;
    padding-right: 24px;
  }

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

@media (max-width: 600px) {
  .process-grid {
    grid-template-columns: 1fr;
  }

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

  .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}
