/* ========================================
   Afforia.pro — Styles
   ======================================== */

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

:root {
  /* Colors */
  --bg-dark: #0a0e1a;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --bg-surface: #0f1629;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --gradient-1: #4f46e5;
  --gradient-2: #7c3aed;
  --gradient-3: #ec4899;
  --accent: #818cf8;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;

  /* Spacing */
  --section-padding: 120px 0;
  --container-max: 1200px;

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

ul {
  list-style: none;
}

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

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Gradient Text --- */
.gradient-text {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  box-shadow: 0 4px 24px rgba(79, 70, 229, 0.35);
}

.btn--primary:hover {
  box-shadow: 0 8px 40px rgba(79, 70, 229, 0.5);
  transform: translateY(-2px);
}

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

.btn--outline:hover {
  border-color: var(--gradient-2);
  background: rgba(124, 58, 237, 0.08);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1rem;
}

/* --- Section Common --- */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.2);
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}

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

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav__brand-dot {
  color: var(--gradient-2);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

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

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3));
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__cta {
  padding: 10px 24px !important;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white !important;
  font-weight: 600 !important;
}

.nav__cta::after {
  display: none !important;
}

.nav__cta:hover {
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

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

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.nav__toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav__toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: float 12s ease-in-out infinite;
}

.hero__orb--1 {
  width: 600px;
  height: 600px;
  background: var(--gradient-1);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.hero__orb--2 {
  width: 500px;
  height: 500px;
  background: var(--gradient-3);
  bottom: -150px;
  left: -100px;
  animation-delay: -4s;
}

.hero__orb--3 {
  width: 400px;
  height: 400px;
  background: var(--gradient-2);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -8s;
  opacity: 0.2;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

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

.hero__badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(79, 70, 229, 0.25);
  margin-bottom: 28px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: 1.15rem;
  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;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.hero__stat {
  text-align: center;
}

.hero__stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero__stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ========================================
   Services
   ======================================== */
.services {
  padding: var(--section-padding);
  position: relative;
}

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

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

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

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

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

.service-card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
}

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

.service-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.service-card__text {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ========================================
   Traffic Sources
   ======================================== */
.sources {
  padding: var(--section-padding);
  background: var(--bg-surface);
  position: relative;
}

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

.sources__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.source-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: var(--transition);
  cursor: default;
}

.source-card:hover {
  border-color: var(--gradient-2);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.15);
}

.source-card__icon {
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.source-card:hover .source-card__icon {
  color: var(--accent);
}

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

.source-card__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  transition: var(--transition);
}

.source-card:hover .source-card__name {
  color: var(--text-primary);
}

/* ========================================
   About
   ======================================== */
.about {
  padding: var(--section-padding);
  position: relative;
}

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

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

.about__text strong {
  color: var(--text-primary);
}

.about__highlights {
  display: flex;
  gap: 40px;
  margin-top: 36px;
}

.about__highlight {
  text-align: center;
}

.about__highlight-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.about__highlight-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about__visual {
  display: flex;
  justify-content: center;
}

.about__card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  max-width: 380px;
  width: 100%;
}

.about__card-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  border-radius: 24px;
  opacity: 0.5;
  filter: blur(1px);
}

.about__card-content {
  position: relative;
  background: var(--bg-card);
  border-radius: 22px;
  padding: 40px 32px;
  text-align: center;
}

.about__card-icon {
  margin-bottom: 20px;
}

.about__card-icon svg {
  margin: 0 auto;
}

.about__card-content h4 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.about__card-content p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ========================================
   Contact
   ======================================== */
.contact {
  padding: var(--section-padding);
  position: relative;
}

.contact__wrapper {
  position: relative;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 80px 60px;
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

.contact__glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.contact__wrapper .section-tag,
.contact__wrapper .section-title {
  position: relative;
  z-index: 1;
}

.contact__text {
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 16px auto 40px;
}

.contact__actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

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

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

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.footer__copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
  :root {
    --section-padding: 80px 0;
  }

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

  .about__highlights {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    padding: 40px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border);
  }

  .nav__links.active {
    right: 0;
  }

  .nav__links a {
    font-size: 1.1rem;
  }

  .hero {
    padding: 100px 20px 60px;
    min-height: auto;
  }

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

  .hero__stats {
    gap: 20px;
  }

  .hero__stat-divider {
    display: none;
  }

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

  .about__highlights {
    gap: 24px;
    flex-wrap: wrap;
  }

  .contact__wrapper {
    padding: 48px 24px;
    border-radius: 24px;
  }

  .footer__inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .sources__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .source-card {
    padding: 24px 12px;
  }

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

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