/* ==========================================================================
   Swift Host — homepage polish
   Loaded only on "/". Layers on top of swifthost-dark.css, never replaces it.
   Everything here degrades to the plain page if CSS or JS is unavailable.
   ========================================================================== */

/* ── Hero size (original theme; homepage must not inherit the 70vh mobile trim) ── */
.sh-page-home .sh-hero.sh-hero-home {
  min-height: 92vh;
}
.sh-page-home .sh-hero-home .sh-hero-content {
  padding: 88px 0 96px;
}

/* ── Hero carousel ──────────────────────────────────────────────────────── */

/* JS drives the backgrounds here, so switch off the stylesheet's own
   auto-fading slideshow to stop the two fighting each other. */
.sh-hero-carousel .sh-hero-slide {
  animation: none !important;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.1s ease, transform 9s ease-out;
}
.sh-hero-carousel .sh-hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Every pane shares one grid cell, so the hero is as tall as the longest
   slide and never jumps while rotating. */
.sh-hero-deck {
  display: grid;
}
.sh-hero-pane {
  grid-area: 1 / 1;
  min-width: 0;
}
.sh-hero-pane[hidden] { display: none; }

html.sh-hero-js .sh-hero-pane {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
html.sh-hero-js .sh-hero-pane.is-active {
  opacity: 1;
  transform: none;
}

/* Controls */
.sh-hero-nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}
.sh-hero-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(10,16,28,0.55);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 15px;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.sh-hero-arrow:hover {
  background: rgba(59,130,246,0.85);
  border-color: rgba(147,197,253,0.6);
  transform: translateY(-1px);
}
.sh-hero-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}
.sh-hero-dot {
  width: 26px;
  height: 5px;
  padding: 0;
  border: none;
  border-radius: 50px;
  background: rgba(255,255,255,0.26);
  cursor: pointer;
  transition: background 0.25s ease, width 0.3s ease;
}
.sh-hero-dot:hover { background: rgba(255,255,255,0.5); }
.sh-hero-dot[aria-selected="true"] {
  width: 42px;
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}
.sh-hero-arrow:focus-visible,
.sh-hero-dot:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

@media (max-width: 575px) {
  .sh-hero-nav { margin-top: 26px; gap: 10px; }
  .sh-hero-arrow { width: 34px; height: 34px; flex-basis: 34px; }
  .sh-hero-dot { width: 20px; }
  .sh-hero-dot[aria-selected="true"] { width: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .sh-hero-carousel .sh-hero-slide,
  html.sh-hero-js .sh-hero-pane {
    transition: none !important;
    transform: none !important;
  }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

/* Soft colour pools behind the hero photo slideshow. */
.sh-page-home .sh-hero-home::before,
.sh-page-home .sh-hero-home::after {
  content: '';
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
}
.sh-page-home .sh-hero-home::before {
  width: 46vw;
  height: 46vw;
  top: -14vw;
  left: -10vw;
  background: radial-gradient(circle, rgba(59,130,246,0.26), transparent 68%);
  animation: sh-home-drift 22s ease-in-out infinite alternate;
}
.sh-page-home .sh-hero-home::after {
  width: 38vw;
  height: 38vw;
  right: -8vw;
  bottom: -12vw;
  background: radial-gradient(circle, rgba(29,78,216,0.22), transparent 70%);
  animation: sh-home-drift 28s ease-in-out infinite alternate-reverse;
}
@keyframes sh-home-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vw, 3vw, 0) scale(1.12); }
}

/* Gradient sweep on the accent half of the headline. */
.sh-page-home .sh-hero-home h1 span {
  background: linear-gradient(100deg, #60a5fa 0%, #c7ddff 42%, #3b82f6 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sh-home-sheen 9s ease-in-out infinite;
}
@keyframes sh-home-sheen {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Live dot on the hero badge. */
.sh-page-home .sh-hero-home .sh-badge {
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(59,130,246,0.12), 0 8px 24px rgba(0,0,0,0.25);
}
.sh-page-home .sh-hero-home .sh-badge::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: sh-home-pulse 2.4s ease-out infinite;
}
@keyframes sh-home-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* Primary call to action gets a little more presence. */
.sh-page-home .sh-hero-actions .sh-btn-primary {
  box-shadow: 0 10px 30px -8px rgba(59,130,246,0.65);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.sh-page-home .sh-hero-actions .sh-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -8px rgba(59,130,246,0.8);
}

/* Trust row reads as separated facts rather than a run-on list. */
.sh-page-home .sh-hero-trust li {
  position: relative;
  padding-right: 22px;
}
/* Dividers only make sense while the trust items sit on one row. */
@media (min-width: 768px) {
  .sh-page-home .sh-hero-trust li + li::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 50%;
    width: 1px;
    height: 14px;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.18);
  }
}

/* ── Stats band ─────────────────────────────────────────────────────────── */

.sh-page-home .sh-stat strong {
  background: linear-gradient(135deg, #93c5fd, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-size: 2.1rem;
}
.sh-page-home .sh-stat {
  transition: transform 0.25s ease;
}
.sh-page-home .sh-stat:hover { transform: translateY(-3px); }

/* ── Cards ──────────────────────────────────────────────────────────────── */

/* Cursor-following highlight on the managed services grid. */
.sh-page-home .sh-card-light {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.sh-page-home .sh-card-light::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    240px circle at var(--sh-mx, 50%) var(--sh-my, 0%),
    rgba(59,130,246,0.10),
    transparent 70%
  );
}
.sh-page-home .sh-card-light:hover::before { opacity: 1; }
.sh-page-home .sh-card-light:hover {
  transform: translateY(-4px);
  border-color: rgba(59,130,246,0.45);
  box-shadow: 0 18px 40px -22px rgba(13,27,42,0.45);
}
.sh-page-home .sh-card-light:hover .sh-card-icon-light {
  transform: scale(1.08) rotate(-4deg);
}
.sh-page-home .sh-card-icon-light {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark "Why Swift Host" cards get a top hairline that lights up. */
.sh-page-home .sh-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.sh-page-home .sh-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  background: linear-gradient(90deg, transparent, var(--sh-blue), transparent);
}
.sh-page-home .sh-card:hover::after { transform: scaleX(1); }
.sh-page-home .sh-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59,130,246,0.35);
  box-shadow: 0 20px 44px -26px rgba(0,0,0,0.8);
}

/* Genesis Method step numbers. */
.sh-page-home .sh-step-light .sh-step-num {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.sh-page-home .sh-step-light:hover .sh-step-num {
  transform: scale(1.1);
  box-shadow: 0 8px 22px -8px rgba(59,130,246,0.7);
}

/* ── Scroll reveal ──────────────────────────────────────────────────────── */

/* Only applied once JS confirms IntersectionObserver support, so a
   no-JS visitor never gets stuck with invisible content. */
html.sh-reveal-on .sh-page-home .sh-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--sh-reveal-delay, 0ms);
}
html.sh-reveal-on .sh-page-home .sh-reveal.sh-reveal-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .sh-page-home .sh-hero-home::before,
  .sh-page-home .sh-hero-home::after,
  .sh-page-home .sh-hero-home h1 span,
  .sh-page-home .sh-hero-home .sh-badge::after {
    animation: none !important;
  }
  html.sh-reveal-on .sh-page-home .sh-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
