/* ============================================
   SMITHDIGITAL — Home Page Styles
   ============================================ */

/* .site-bg styles moved to global.css — shared across all pages */

/* ── HERO ──
   Sticky so it sits fixed at the top while the next sections glide over it.
   z-index: 1 — services / cta-band sit at z-index: 2, visually covering hero.
   ─────────────────────────────────────────────────────────────────────────── */
.hero {
  position: sticky;
  top: 0;
  min-height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: hidden;
  z-index: 1;
}

.hero__body {
  flex: 1;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 2rem) 0 2rem;
}

#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(58,111,212,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(168,199,255,0.85);
  margin-bottom: 1.5rem;
}
.hero__label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74,222,128,0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.3); }
}

.hero__headline {
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: var(--fw-black);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.hero__headline-white {
  display: block;
  white-space: nowrap;
}
.hero__headline-break {
  display: block;
  margin-top: 0.05em;
}
.hero__headline em {
  font-style: normal;
  color: #7eb8ff;
  font-size: 1.06em;
}

.hero__sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── HERO STATS ── */
.hero__stats {
  display: flex;
  gap: 0;
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}
.hero__stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 2.5rem;
  margin-right: 2.5rem;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.hero__stat:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}
.hero__stat-number {
  font-size: clamp(1.75rem, 2.5vw, 2.4rem);
  font-weight: var(--fw-black);
  color: var(--white);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero__stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
}

/* ── SERVICES ──
   Solid white bg glides over both the fixed grid AND the sticky hero.
   z-index: 2 ensures it renders on top of the hero (z-index: 1).
   ─────────────────────────────────────────────────────────────────── */
.services {
  padding: var(--section-pad) 0;
  background: var(--white);
  position: relative;
  z-index: 2;
  overflow: clip;
}
.services > .container { position: relative; z-index: 1; }

.section-label {
  font-size: 0.78rem;
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 3.5rem;
}

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

.service-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.service-card:hover {
  border-color: var(--blue-pale);
  box-shadow: 0 12px 40px rgba(26,77,181,0.1);
  transform: translateY(-4px);
}
.service-card:hover::before { transform: scaleX(1); }

.service-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--blue-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--blue);
}
.service-card__icon svg { width: 22px; height: 22px; }

.service-card__title {
  font-size: 1.1rem;
  font-weight: var(--fw-bold);
  color: var(--navy);
  margin-bottom: 0.6rem;
}
.service-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── CTA BAND ── */
.cta-band {
  padding: 80px 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.cta-band__inner { position: relative; z-index: 1; }

.cta-band__title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: var(--fw-black);
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.cta-band__sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.cta-band__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

/* ── MARQUEE BAND ──
   Standalone strip between hero and services.
   Semi-transparent so the fixed grid shows through underneath.
   z-index: 2 so it glides over the sticky hero as you scroll. */
.marquee-band {
  position: relative;
  z-index: 2;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 10px 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.marquee-band__label {
  font-size: 0.68rem;
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.28);
  margin: 0;
}
.marquee-band__overflow { width: 100%; overflow: hidden; }
.marquee-band__track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: marquee-scroll 32s linear infinite;
}
.marquee-band__overflow:hover .marquee-band__track { animation-play-state: paused; }
.marquee-item {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  padding: 0 2rem;
  transition: color 0.2s;
}
.marquee-item:hover { color: rgba(255,255,255,0.8); }
.marquee-sep {
  display: inline-block;
  color: var(--blue-light);
  opacity: 0.35;
  font-size: 0.55rem;
  vertical-align: middle;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── SERVICE CARD TILT ── */
.service-card { transform-style: preserve-3d; will-change: transform; }
.service-card.is-tilting { transition: box-shadow 0.1s var(--ease); }
.service-card:not(.is-tilting) {
  transition: transform 0.5s var(--ease),
              box-shadow 0.3s var(--ease),
              border-color 0.3s var(--ease);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --section-pad: 64px; }

  .hero__body {
    padding-top: calc(var(--nav-h) + 1.5rem);
    padding-bottom: 1.5rem;
    align-items: flex-start;
  }

  .hero__content { max-width: 100%; }

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

  .hero__actions .btn { width: 100%; justify-content: center; }

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

  .hero__stat { padding-right: 1.5rem; margin-right: 1.5rem; }

  /* CTA band stack */
  .cta-band__inner { flex-direction: column; gap: 1.5rem; text-align: center; }
  .cta-band__actions { justify-content: center; }
}

@media (max-width: 480px) {
  .hero__headline { font-size: clamp(2.2rem, 9vw, 2.8rem); }

  .hero__sub { font-size: 0.95rem; }

  .hero__stats { flex-direction: column; gap: 1rem; }
  .hero__stat {
    border-right: none; padding-right: 0; margin-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
  }
  .hero__stat:last-child { border-bottom: none; padding-bottom: 0; }

  /* Service cards — smaller padding on tiny screens */
  .service-card { padding: 1.5rem; }

  /* Client strip scrollable on mobile */
  .clients__strip { overflow-x: auto; padding-bottom: 0.5rem; justify-content: flex-start; }
}

/* ════════════════════════════════════════════
   HERO — staggered entrance (CSS-only, load time)
   ════════════════════════════════════════════ */
@keyframes hero-item-in {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__label          { opacity: 0; animation: hero-item-in 0.75s var(--ease) 0.40s both; }
.hero__headline-white { opacity: 0; animation: hero-item-in 0.75s var(--ease) 0.56s both; }
.hero__headline-break { opacity: 0; animation: hero-item-in 0.75s var(--ease) 0.72s both; }
.hero__sub            { opacity: 0; animation: hero-item-in 0.75s var(--ease) 0.90s both; }
.hero__actions        { opacity: 0; animation: hero-item-in 0.75s var(--ease) 1.08s both; }
.hero__stats          { opacity: 0; animation: hero-item-in 0.75s var(--ease) 1.28s both; }

/* ════════════════════════════════════════════
   HERO — parallax
   Grid is truly fixed (site-bg div, never moves).
   Glow blob + content get subtle depth layers.
   ════════════════════════════════════════════ */
.hero { --hero-scroll: 0px; }

.hero::after {
  transform: translateY(calc(var(--hero-scroll) * 0.40));
  will-change: transform;
}
.hero__content {
  transform: translateY(calc(var(--hero-scroll) * -0.08));
  will-change: transform;
}


/* ════════════════════════════════════════════
   FLOATING SERVICE CARD ICONS
   ════════════════════════════════════════════ */
@keyframes float-icon {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%       { transform: translateY(-10px) rotate(4deg); }
}
.service-card__icon { animation: float-icon 3.2s ease-in-out infinite; }
.services__grid .service-card:nth-child(2) .service-card__icon { animation-delay: -1.1s; }
.services__grid .service-card:nth-child(3) .service-card__icon { animation-delay: -2.2s; }
.service-card.is-tilting .service-card__icon { animation-play-state: paused; }
.service-card:hover .service-card__icon {
  box-shadow: 0 0 0 6px rgba(58,111,212,0.12), 0 0 24px rgba(58,111,212,0.18);
  transition: box-shadow 0.35s var(--ease);
}

/* ════════════════════════════════════════════
   WORD-SPLIT STAGGERED REVEAL
   ════════════════════════════════════════════ */
.is-split { opacity: 1 !important; transform: none !important; transition: none !important; }
.w-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  transition-delay: calc(var(--wi, 0) * 50ms);
}
.is-split.is-visible .w-reveal { opacity: 1; transform: none; }

/* ════════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .hero__label, .hero__headline-white, .hero__headline-break,
  .hero__sub, .hero__actions, .hero__stats {
    opacity: 1 !important; animation: none !important;
  }
  .service-card__icon { animation: none !important; }
  .w-reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
  .hero::after, .hero__content { transform: none !important; }
  .nav-bg { transition: none !important; }
  .nav-bg.is-visible { transform: scaleY(1) !important; }
}
