/* Homepage hero: night-drive slideshow + split-flap service board.
   Loaded only by /index.html. Colors match tailwind.config.js tokens. */
.hx {
  --hx-ink: #0b0b0e;
  --hx-text: #eceef2;
  --hx-muted: #a3a4b0;
  --hx-accent: #3858e9;
  --hx-accent-text: #7c90f5;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--hx-ink);
  margin-top: -76px; /* slide under the floating header */
}
@media (min-width: 1024px) {
  .hx { display: flex; align-items: center; min-height: max(720px, min(100vh, 940px)); }
}

/* Slides: phone/tablet = photo on top fading down into black;
   desktop = photo on the right fading left into black, copy on the black. */
.hx-slides {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 496px;
  z-index: -2;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
}
@media (min-width: 641px) and (max-width: 1023px) { .hx-slides { height: 656px; } }
@media (min-width: 1024px) {
  .hx-slides {
    height: auto; bottom: 0; left: 28%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 36%, #000 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 36%, #000 100%);
  }
}
.hx-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hx-slide.is-on { opacity: 1; }
.hx-slide picture { display: block; width: 100%; height: 100%; }
.hx-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hx-pos-m, 50% 50%);
  transform: scale(1);
  transform-origin: var(--hx-origin, 60% 50%);
}
@media (min-width: 1024px) { .hx-slide img { object-position: var(--hx-pos, 50% 50%); } }
.hx-slide.is-on img { animation: hx-drift 9s linear forwards; }
@keyframes hx-drift {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

/* Shade: keeps the photo's lower edge dark where the copy starts */
.hx-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(11, 11, 14, 0.35) 0px, rgba(11, 11, 14, 0.05) 216px, rgba(11, 11, 14, 0.8) 376px, var(--hx-ink) 486px);
}
@media (min-width: 641px) and (max-width: 1023px) {
  .hx-shade { background: linear-gradient(to bottom, rgba(11, 11, 14, 0.3) 0px, rgba(11, 11, 14, 0.05) 160px, rgba(11, 11, 14, 0.8) 516px, var(--hx-ink) 636px); }
}
@media (min-width: 1024px) {
  .hx-shade {
    background:
      linear-gradient(to top, var(--hx-ink) 0%, rgba(11, 11, 14, 0) 24%),
      linear-gradient(to bottom, rgba(11, 11, 14, 0.55) 0%, rgba(11, 11, 14, 0) 16%),
      radial-gradient(110% 90% at 72% 45%, transparent 45%, rgba(11, 11, 14, 0.6) 100%);
  }
}

/* Content */
.hx-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 326px 24px 40px;
}
@media (min-width: 641px) { .hx-inner { padding-top: 476px; } }
@media (min-width: 1024px) { .hx-inner { padding: 124px 32px 48px; } }

.hx-rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: var(--hx-muted);
  text-decoration: none;
  transition: color 200ms;
}
.hx-rating:hover { color: var(--hx-text); }
.hx-rating .hx-stars { color: #FBBC04; letter-spacing: 2px; font-size: 12px; }
.hx-rating strong { color: var(--hx-text); font-weight: 600; }
.hx-rating:focus-visible { outline: 2px solid var(--hx-accent-text); outline-offset: 4px; border-radius: 4px; }

.hx-h1 { margin-top: 18px; }
.hx-brand {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(14px, 0.75rem + 0.45vw, 17px);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hx-accent-text);
}
.hx-title {
  display: block;
  max-width: 9.6em;
  margin-top: 14px;
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 700;
  color: #fff;
  font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hx-tag {
  margin-top: 20px;
  font-family: 'Merriweather', Georgia, serif;
  font-style: italic;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  color: var(--hx-text);
}
.hx-tag span { color: var(--hx-accent-text); }
.hx-lede {
  margin-top: 12px;
  max-width: 32rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--hx-muted);
}
@media (min-width: 640px) { .hx-lede { font-size: 16px; } }

.hx-ctas { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 200ms, box-shadow 220ms;
}
@media (max-width: 420px) { .hx-btn { flex: 1 1 100%; } }
.hx-btn:hover { transform: translateY(-2px); }
.hx-btn:active { transform: translateY(0); }
.hx-btn-primary {
  background: var(--hx-accent);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(56, 88, 233, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.hx-btn-primary:hover { background: #2843c2; box-shadow: 0 10px 24px -10px rgba(56, 88, 233, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16); }
.hx-btn-ghost {
  color: var(--hx-text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.hx-btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.hx-btn:focus-visible { outline: 2px solid var(--hx-accent-text); outline-offset: 3px; }

/* Split-flap board */
.hx-foot {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hx-board-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hx-muted);
}
.hx-board { display: flex; gap: 3px; }
.hx-cell {
  position: relative;
  width: 1.32em;
  height: 1.8em;
  display: grid;
  place-items: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(13px, 0.7rem + 0.5vw, 19px);
  color: #f3f4f7;
  background: linear-gradient(to bottom, #1d1e25 0 49.5%, #121318 50.5% 100%);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.5);
}
.hx-cell::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.75);
}
.hx-cell.is-flip { animation: hx-flip 90ms linear; }
@keyframes hx-flip {
  0% { transform: scaleY(1); }
  50% { transform: scaleY(0.55); opacity: 0.75; }
  100% { transform: scaleY(1); }
}
@media (max-width: 420px) { .hx-cell { width: 1.16em; } .hx-board { gap: 2px; } }

/* Slide controls */
.hx-dots { display: flex; gap: 8px; }
.hx-dot {
  position: relative;
  width: 40px;
  height: 24px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.hx-dot::before, .hx-dot i {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
}
.hx-dot i {
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}
.hx-dot.is-done i { transform: scaleX(1); }
.hx-dot.is-on i { animation: hx-progress var(--hx-dur, 7000ms) linear forwards; }
.hx.is-paused .hx-dot.is-on i { animation-play-state: paused; }
@keyframes hx-progress { to { transform: scaleX(1); } }
.hx-dot:focus-visible { outline: 2px solid var(--hx-accent-text); outline-offset: 2px; border-radius: 4px; }

/* Load-in */
.hx-in { opacity: 0; transform: translateY(14px); animation: hx-rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.hx-in-1 { animation-delay: 80ms; }
.hx-in-2 { animation-delay: 200ms; }
.hx-in-3 { animation-delay: 320ms; }
.hx-in-4 { animation-delay: 440ms; }
.hx-in-5 { animation-delay: 600ms; }
@keyframes hx-rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hx-in { opacity: 1; transform: none; animation: none; }
  .hx-slide.is-on img { animation: none; }
  .hx-cell.is-flip { animation: none; }
}

/* Background video layer: fades in over the first photo once it is actually playing */
.hx-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1600ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.hx.is-video .hx-video { opacity: 1; }
.hx.is-video .hx-dots { display: none; }

