/* ========================================
   Crafbyte — Digital Studio
   ======================================== */

:root {
  --bg: #060a13;
  --bg-card: #0d1117;
  --bg-card-hover: #111827;
  --border: #1e293b;
  --border-hover: #334155;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary: #00c9a7;
  --primary-light: #00d4e0;
  --primary-glow: rgba(0, 201, 167, 0.15);
  --primary-glow-strong: rgba(0, 201, 167, 0.3);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.hide-mobile { display: inline; }

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}

.btn--sm { padding: 8px 20px; font-size: 14px; }
.btn--lg { padding: 14px 32px; font-size: 16px; }
.btn--full { width: 100%; }

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #060a13;
  box-shadow: 0 4px 20px var(--primary-glow);
}
.btn--primary:hover {
  box-shadow: 0 8px 32px var(--primary-glow-strong);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}

.nav--scrolled {
  background: rgba(6, 10, 19, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo { text-decoration: none; }
.nav__logo-svg { height: 28px; width: auto; }

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: var(--transition);
}

.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  transition: var(--transition);
}

/* ========================================
   Hero
   ======================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 201, 167, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(0, 212, 224, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(0, 201, 167, 0.03) 0%, transparent 50%);
  animation: heroPulse 8s ease-in-out infinite alternate;
}

@keyframes heroPulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 41, 59, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black 20%, transparent 70%);
}

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

.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero__subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero__stat { text-align: center; }

.hero__stat-value {
  display: block;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
}

.hero__stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ========================================
   Sections Common
   ======================================== */

.section {
  padding: 120px 0;
  position: relative;
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__tag {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.section__title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.section__desc {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ========================================
   Services
   ======================================== */

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before { opacity: 1; }

.service-card__icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
  margin-bottom: 20px;
}

.service-card__icon svg { width: 100%; height: 100%; }

.service-card__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.service-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.service-card__tags li {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: var(--transition);
}

.service-card:hover .service-card__tags li {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

/* ========================================
   Process
   ======================================== */

.process {
  background: linear-gradient(180deg, transparent, rgba(0, 201, 167, 0.02), transparent);
}

.process__timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.process__timeline::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), var(--border), transparent);
}

.process__step {
  text-align: center;
  position: relative;
}

.process__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.process__step:hover .process__number {
  border-color: var(--primary);
  box-shadow: 0 0 24px var(--primary-glow);
}

.process__step-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* ========================================
   Tech
   ======================================== */

.tech__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.tech__item {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: var(--transition);
}

.tech__item:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

/* ========================================
   Contact
   ======================================== */

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact__desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 16px 0 32px;
  line-height: 1.7;
}

.contact__channels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact__channel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
}

.contact__channel:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.contact__channel svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--primary);
}

.contact__channel strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.contact__channel span {
  font-size: 13px;
  color: var(--text-muted);
}

.contact__form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.form__group { margin-bottom: 16px; }

.form__input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
}

.form__input::placeholder { color: var(--text-muted); }

.form__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form__select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form__select option {
  background: var(--bg-card);
  color: var(--text);
}

.form__textarea { resize: vertical; min-height: 100px; }

.form__note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Form states */
.form--success .btn--primary {
  background: linear-gradient(135deg, #10b981, #059669);
}

.form--error .btn--primary {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ========================================
   Footer
   ======================================== */

.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 48px;
}

.footer__logo { height: 24px; width: auto; }

.footer__tagline {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 12px;
}

.footer__links {
  display: flex;
  gap: 64px;
  justify-content: flex-end;
}

.footer__col { display: flex; flex-direction: column; gap: 10px; }

.footer__col h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer__col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer__col a:hover { color: var(--primary); }

.footer__bottom {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
}

.footer__bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========================================
   Reveal Animations
   ======================================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--transition), transform 0.6s var(--transition);
}

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

/* ========================================
   Mobile
   ======================================== */

@media (max-width: 768px) {
  .hide-mobile { display: none; }

  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__burger { display: flex; }

  .nav__links--open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6, 10, 19, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav__links--open .nav__link {
    font-size: 18px;
    padding: 8px 0;
  }

  .hero { min-height: auto; padding: 120px 0 60px; }
  .hero__title { letter-spacing: -1px; }
  .hero__stats { gap: 24px; }
  .hero__stat-value { font-size: 28px; }

  .section { padding: 80px 0; }
  .section__header { margin-bottom: 40px; }

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

  .process__timeline {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .process__timeline::before { display: none; }

  .contact__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__links {
    justify-content: flex-start;
    gap: 48px;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .hero__title { font-size: 32px; }
  .hero__actions { flex-direction: column; align-items: center; }
  .hero__stats { flex-direction: column; gap: 16px; }

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

  .service-card { padding: 24px; }
  .contact__form { padding: 24px; }
}