html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
}

/* Header state */
#header {
  transition: background-color 0.35s ease, box-shadow 0.35s ease, color 0.35s ease;
  color: #1c1c1c;
}
#header.dark-bg { color: #f9f9fa; }
#header.light-bg { color: #1c1c1c; }
#header.scrolled.light-bg {
  background-color: rgba(249, 249, 250, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(28, 28, 28, 0.08);
}
#header.scrolled.dark-bg {
  background-color: rgba(21, 19, 48, 0.45);
  backdrop-filter: blur(12px);
}
#header.scrolled #navLogo {
  height: 2rem;
}

.nav-link {
  position: relative;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: linear-gradient(115deg, #4c57a5, #6ecad0);
  transition: width 0.25s ease;
}
.nav-link:hover {
  opacity: 1;
}
.nav-link:hover::after {
  width: 100%;
}

.mobile-link {
  border-bottom: 1px solid rgba(28,28,28,0.06);
  padding-bottom: 0.75rem;
}
.mobile-link:last-child {
  border-bottom: none;
}

/* Hero subtle texture */
.hero-noise {
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.06) 0, transparent 50%),
                     radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 0, transparent 50%);
}

.hero-rings {
  background: repeating-radial-gradient(circle at 72% 38%,
    rgba(255,255,255,0.07) 0,
    rgba(255,255,255,0.07) 1.5px,
    transparent 1.5px,
    transparent 70px);
}

/* Cropped pulsing logo mark used on every gradient section */
.hero-mark {
  position: absolute;
  width: 70vw;
  max-width: 900px;
  min-width: 280px;
  right: -10%;
  top: -28%;
  opacity: 0.18;
  pointer-events: none;
  animation: markPulse 8s ease-in-out infinite;
  z-index: 0;
}
.hero-mark--left { right: auto; left: -16%; top: -28%; bottom: auto; }
.hero-mark--center { right: 50%; bottom: -28%; width: 50vw; animation-name: markPulseCenter; }
.hero-mark--cta { right: -10%; bottom: -35%; width: 45vw; opacity: 0.16; }
@keyframes markPulse {
  0%, 100% { transform: scale(1); opacity: 0.12; }
  50% { transform: scale(1.07); opacity: 0.2; }
}

@media (max-width: 767px) {
  .hero-mark:not(.hero-mark--left):not(.hero-mark--center):not(.hero-mark--cta) {
    width: 100vw;
    right: -18%;
    top: -12%;
  }
}
@keyframes markPulseCenter {
  0%, 100% { transform: translateX(50%) scale(1); opacity: 0.1; }
  50% { transform: translateX(50%) scale(1.07); opacity: 0.18; }
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
@media (min-width: 640px) { .btn-primary, .btn-secondary { width: auto; } }
.btn-primary {
  background: #f9f9fa;
  color: #1c1c1c;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.35);
}
.btn-primary:hover { transform: translateY(-2px); background: #6ecad0; }
.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #f9f9fa;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(6px);
}
.btn-secondary:hover { transform: translateY(-2px); background: rgba(255,255,255,0.2); }

/* Slogan eyebrow in hero */
.slogan-eyebrow {
  font-style: italic;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

/* Services grid — 3 cols then last 2 centred */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .services-grid .service-card {
    grid-column: span 2;
  }
  .services-grid .service-card:nth-child(4) {
    grid-column: 2 / 4;
  }
  .services-grid .service-card:nth-child(5) {
    grid-column: 4 / 6;
  }
}

/* Service cards */
.service-card {
  background: #ffffff;
  border: 1px solid rgba(28, 28, 28, 0.08);
  border-radius: 1.5rem;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -10px rgba(76, 87, 165, 0.18);
  border-color: rgba(76, 87, 165, 0.3);
}
.service-card--new {
  border-color: rgba(76, 87, 165, 0.25);
}

.new-tag {
  font-family: 'Poppins', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(115deg, #4c57a5, #6ecad0);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  animation: badgePulse 2.4s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(110,202,208,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(110,202,208,0); }
}

/* Form inputs */
.form-input {
  width: 100%;
  background: #f9f9fa;
  border: 1px solid rgba(28, 28, 28, 0.12);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  color: #1c1c1c;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-input::placeholder {
  color: rgba(28, 28, 28, 0.4);
}
.form-input:focus {
  outline: none;
  border-color: #4c57a5;
  box-shadow: 0 0 0 3px rgba(76, 87, 165, 0.15);
}

/* Reveal-on-scroll */
[data-aos] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-aos].aos-in {
  opacity: 1;
  transform: translateY(0);
}

#scrollTop.show {
  opacity: 1;
  pointer-events: auto;
}
