/* ==========================================================================
   HSF Facilities Management — home.css
   Styles unique to index.html (hero, stats section, intro, service preview,
   why-choose-us, how-it-works steps, testimonials slider).
   Loaded AFTER global.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: clamp(5rem, 12vh, 8rem);
  /* Fallback gradient shows through if hero.mp4 / hero-poster.jpg are missing */
  background: linear-gradient(140deg, var(--navy-900) 0%, var(--navy) 45%, var(--teal) 120%);
  overflow: hidden;
  color: var(--white);
}

.hero__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(6, 30, 63, 0.86) 0%, rgba(6, 30, 63, 0.66) 45%, rgba(8, 42, 87, 0.9) 100%),
    radial-gradient(circle at 75% 25%, rgba(17, 141, 149, 0.5), transparent 55%);
}

.hero__inner {
  position: relative;
  text-align: center;
  max-width: 60rem;
}

.hero__eyebrow {
  font-family: var(--font-head);
  font-size: clamp(0.72rem, 1.6vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-300);
  margin-bottom: 1.1rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 0 4px 30px rgba(6, 30, 63, 0.45);
}

.hero__sub {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.02rem, 2.1vw, 1.2rem);
  max-width: 40rem;
  margin-inline: auto;
  margin-bottom: 2.1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}

.hero__points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.75rem;
  margin-top: 2.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.hero__points li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero__points li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-300);
  box-shadow: 0 0 0 4px rgba(53, 180, 188, 0.22);
}

/* Scroll-down indicator */
.hero__scroll {
  position: absolute;
  left: 50%;
  /* sits clear of the stats bar, which overlaps the hero from below */
  bottom: clamp(5.5rem, 10vh, 7rem);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

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

.hero__scroll-mouse {
  position: relative;
  width: 24px;
  height: 38px;
  border: 2px solid currentColor;
  border-radius: var(--r-pill);
}

.hero__scroll-mouse::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
  transform: translateX(-50%);
  animation: scroll-hint 1.9s var(--ease) infinite;
}

@keyframes scroll-hint {
  0% { transform: translate(-50%, 0); opacity: 1; }
  70% { transform: translate(-50%, 13px); opacity: 0; }
  100% { opacity: 0; }
}

@media (max-width: 640px) {
  .hero__scroll-text {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Stats — lifted so it overlaps the hero slightly
   -------------------------------------------------------------------------- */
.stats-section {
  padding-top: 0;
  margin-top: clamp(-4.5rem, -6vw, -3rem);
  position: relative;
  z-index: 2;
}

.stats-section .stats {
  box-shadow: var(--shadow-lg);
  background: var(--line);
}

/* --------------------------------------------------------------------------
   What we do
   -------------------------------------------------------------------------- */
.intro__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.intro__text .btn {
  margin-top: 0.6rem;
}

.intro__media {
  aspect-ratio: 5 / 4;
}

@media (min-width: 900px) {
  .intro__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

/* --------------------------------------------------------------------------
   Services preview grid
   -------------------------------------------------------------------------- */
.svc-grid {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.6rem);
  grid-template-columns: 1fr;
}

.svc-card {
  display: block;
  color: inherit;
  overflow: hidden;
}

.svc-card h3 {
  margin-bottom: 0.45rem;
}

.svc-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Teal wash that sweeps in on hover */
.svc-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}

.svc-card:hover::before,
.svc-card:focus-visible::before {
  transform: scaleX(1);
}

.svc-card:hover h3 {
  color: var(--teal);
}

.services-preview__more {
  margin-top: clamp(2rem, 4vw, 3rem);
  text-align: center;
}

@media (min-width: 640px) {
  .svc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .svc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Why choose us
   -------------------------------------------------------------------------- */
.why-grid {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  grid-template-columns: 1fr;
}

.why-item {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.why-item .icon-badge {
  flex: none;
  margin-bottom: 0;
  width: 52px;
  height: 52px;
}

.why-item .icon-badge svg {
  width: 25px;
  height: 25px;
}

.why-item:hover .icon-badge {
  background: var(--teal);
  color: var(--white);
  transform: translateY(-3px);
}

.why-item h3 {
  margin-bottom: 0.35rem;
}

.why-item p {
  font-size: 0.95rem;
  margin: 0;
}

@media (min-width: 700px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1050px) {
  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   How it works — numbered timeline
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  grid-template-columns: 1fr;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t);
}

.step:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.step__num {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--teal-300);
  margin-bottom: 0.8rem;
}

.step h3 {
  margin-bottom: 0.35rem;
}

.step p {
  font-size: 0.95rem;
  margin: 0;
}

/* Connector line between steps on wide screens */
@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .step::after {
    content: "";
    position: absolute;
    top: 2.9rem;
    right: calc(-1 * clamp(1.25rem, 2.5vw, 1.75rem));
    width: clamp(1.25rem, 2.5vw, 1.75rem);
    height: 2px;
    background: linear-gradient(90deg, var(--teal-300), transparent);
  }

  .step:last-child::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Testimonials slider
   -------------------------------------------------------------------------- */
.slider {
  position: relative;
  max-width: 64rem;
  margin-inline: auto;
}

.slider__viewport {
  overflow: hidden;
  border-radius: var(--r-lg);
}

.slider__track {
  display: flex;
  transition: transform 0.55s var(--ease);
  will-change: transform;
}

.slide {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 0.25rem;
}

.quote {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.6rem, 4vw, 2.8rem);
  box-shadow: var(--shadow);
  text-align: center;
}

.quote__stars {
  color: #f5b301;
  letter-spacing: 0.18em;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.quote blockquote {
  margin: 0 0 1.4rem;
}

.quote blockquote p {
  font-size: clamp(1.02rem, 2.1vw, 1.22rem);
  line-height: 1.65;
  color: var(--ink);
  font-weight: 500;
  margin: 0;
}

.quote figcaption {
  display: grid;
  gap: 0.15rem;
}

.quote__name {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--navy);
}

.quote__meta {
  font-size: 0.88rem;
  color: var(--muted);
}

.slider__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.6rem;
}

.slider__btn {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast),
    transform var(--t-fast), box-shadow var(--t-fast);
}

.slider__btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-teal);
}

.slider__btn svg {
  width: 20px;
  height: 20px;
}

.slider__dots {
  display: flex;
  gap: 0.5rem;
}

.slider__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: width var(--t), background-color var(--t);
}

.slider__dot.is-active {
  width: 28px;
  border-radius: var(--r-pill);
  background: var(--teal);
}
