/* =============================================
   FuseAPI - Professional Website Styles
   ============================================= */

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

:root {
  --color-bg: #0a0a0f;
  --color-bg-alt: #111118;
  --color-bg-card: #16161f;
  --color-surface: #1c1c27;
  --color-border: #2a2a3a;
  --color-text: #e4e4e7;
  --color-text-muted: #9696a6;
  --color-text-dim: #6b6b7b;
  --color-accent: #6366f1;
  --color-accent-light: #818cf8;
  --color-accent-glow: rgba(99, 102, 241, 0.15);
  --color-white: #ffffff;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container-max: 1140px;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section Common --- */
.section__tag {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent-light);
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-white);
  margin-bottom: 16px;
}

.section__subtitle {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn--primary:hover {
  background-color: var(--color-accent-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

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

.btn--outline:hover {
  border-color: var(--color-accent-light);
  color: var(--color-accent-light);
}

.btn--full {
  width: 100%;
}

/* =============================================
   Navigation
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.nav__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.5px;
}

.nav__logo-icon {
  color: var(--color-accent-light);
  font-size: 1.5rem;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.nav__link:hover {
  color: var(--color-white);
}

.nav__link--cta {
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 8px 20px;
  border-radius: var(--radius);
}

.nav__link--cta:hover {
  background-color: var(--color-accent-light);
  color: var(--color-white);
}

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

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.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);
}

/* =============================================
   Hero
   ============================================= */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(129, 140, 248, 0.06) 0%, transparent 50%),
    radial-gradient(circle 1px at center, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px;
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: 680px;
}

.hero__tag {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--color-accent-light);
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-white);
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}

.hero__title--accent {
  background: linear-gradient(135deg, var(--color-accent-light), #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 540px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* =============================================
   Services
   ============================================= */
.services {
  padding: 100px 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.services .section__subtitle {
  margin-bottom: 56px;
}

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

.services__grid .service-card:nth-child(4),
.services__grid .service-card:nth-child(5) {
  grid-column: span 1;
}

/* Center last row of 2 items in 3-col grid */
@media (min-width: 769px) {
  .services__grid {
    justify-items: center;
  }
  .services__grid .service-card:nth-child(4) {
    grid-column: 1 / 2;
    justify-self: end;
    max-width: calc(100% + 12px);
    width: 100%;
  }
  .services__grid .service-card:nth-child(5) {
    grid-column: 2 / 3;
    justify-self: start;
    max-width: calc(100% + 12px);
    width: 100%;
  }
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: all var(--transition);
}

.service-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--color-accent-glow);
  color: var(--color-accent-light);
  margin-bottom: 20px;
}

.service-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 10px;
}

.service-card__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* =============================================
   About
   ============================================= */
.about {
  padding: 100px 0;
  background: var(--color-bg-alt);
}

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

.about__text {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

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

.stat {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
}

.stat__number {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-accent-light);
  margin-bottom: 6px;
  letter-spacing: -1px;
}

.stat__label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* =============================================
   Process
   ============================================= */
.process {
  padding: 100px 0;
  background: var(--color-bg);
}

.process .section__title {
  margin-bottom: 56px;
}

.process__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.process__step {
  position: relative;
  padding: 32px 28px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.process__number {
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(99, 102, 241, 0.2);
  margin-bottom: 12px;
  line-height: 1;
}

.process__step-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 8px;
}

.process__step-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* =============================================
   Contact
   ============================================= */
.contact {
  padding: 100px 0;
  background: var(--color-bg-alt);
}

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

.contact__text {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

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

.contact__detail {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.contact__detail svg {
  color: var(--color-accent-light);
  flex-shrink: 0;
}

.contact__detail a {
  color: var(--color-text);
  transition: color var(--transition);
}

.contact__detail a:hover {
  color: var(--color-accent-light);
}

/* --- Form --- */
.contact__form-wrapper {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form__group {
  margin-bottom: 20px;
}

.form__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form__input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

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

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

.form__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b7b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

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

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

/* =============================================
   Footer
   ============================================= */
.footer {
  padding: 64px 0 32px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-top: 16px;
  max-width: 280px;
  line-height: 1.7;
}

.footer__heading {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text);
  margin-bottom: 16px;
}

.footer__links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a,
.footer__links span {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--color-accent-light);
}

.footer__bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  text-align: center;
}

.footer__bottom p {
  font-size: 0.8125rem;
  color: var(--color-text-dim);
}

/* =============================================
   Animations
   ============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Stagger children animations */
.services__grid .fade-in:nth-child(2) { transition-delay: 0.08s; }
.services__grid .fade-in:nth-child(3) { transition-delay: 0.16s; }
.services__grid .fade-in:nth-child(4) { transition-delay: 0.24s; }
.services__grid .fade-in:nth-child(5) { transition-delay: 0.32s; }

.process__grid .fade-in:nth-child(2) { transition-delay: 0.08s; }
.process__grid .fade-in:nth-child(3) { transition-delay: 0.16s; }
.process__grid .fade-in:nth-child(4) { transition-delay: 0.24s; }

.about__stats .fade-in:nth-child(2) { transition-delay: 0.08s; }
.about__stats .fade-in:nth-child(3) { transition-delay: 0.16s; }
.about__stats .fade-in:nth-child(4) { transition-delay: 0.24s; }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

@media (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-200%);
    transition: transform 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
    visibility: hidden;
  }

  .nav__menu.open {
    transform: translateY(0);
    visibility: visible;
  }

  .nav__toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 200px 0 80px;
  }

  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

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

  .services__grid .service-card:nth-child(4),
  .services__grid .service-card:nth-child(5) {
    max-width: 100%;
    justify-self: stretch;
  }

  .about__stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

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

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

  .contact__form-wrapper {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
    text-align: center;
  }

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

  .stat {
    padding: 24px 20px;
  }
}
