/* ============================================================
   PERLYN-IT | template-hero-slider.css
   Index Page Hero Slider — Full Cinematic
   Class prefix: pi-hs__
   Used on: index.html ONLY
   Content driven by: template-hero-slider.js
   ============================================================ */

/* ── Section shell ───────────────────────────────────────────── */
.pi-hs {
  position: relative;
  width: 100%;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--bg-primary);
}

/* ── Background slide layers ─────────────────────────────────── */
.pi-hs__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pi-hs__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  will-change: opacity, transform;
  transform: scale(1.04);
  transition: opacity 1.2s ease, transform 7s ease;
}

.pi-hs__slide.pi-slide--active {
  opacity: 1;
  transform: scale(1);
}

/* ── Overlays ─────────────────────────────────────────────────── */
.pi-hs__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pi-hs__overlay--dark {
  background: linear-gradient(
    105deg,
    rgba(10, 15, 30, 0.92) 0%,
    rgba(10, 15, 30, 0.75) 45%,
    rgba(10, 15, 30, 0.45) 100%
  );
  z-index: 1;
}

.pi-hs__overlay--vignette {
  background:
    radial-gradient(ellipse 80% 60% at 0% 50%, rgba(10,15,30,0.60) 0%, transparent 70%),
    linear-gradient(to top, rgba(10,15,30,0.98) 0%, transparent 30%);
  z-index: 2;
}

.pi-hs__overlay--teal {
  background: radial-gradient(
    ellipse 55% 65% at 0% 100%,
    rgba(13, 115, 119, 0.22) 0%,
    transparent 65%
  );
  z-index: 3;
}

/* ── Noise grain ─────────────────────────────────────────────── */
.pi-hs__noise {
  position: absolute;
  inset: 0;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 4;
}

/* ── Content stage ───────────────────────────────────────────── */
.pi-hs__stage {
  position: relative;
  z-index: 10;
  width: 100%;
  padding-top: clamp(6rem, 14vw, 10rem);
  padding-bottom: clamp(7rem, 14vw, 11rem);
}

/* ── Eyebrow ─────────────────────────────────────────────────── */
.pi-hs__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(13, 115, 119, 0.12);
  border: 1px solid rgba(13, 115, 119, 0.30);
  border-radius: var(--radius-full);
  padding: 0.4rem 1.1rem;
  margin-bottom: var(--space-xl);
}

.pi-hs__eyebrow-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-teal-light);
  box-shadow: 0 0 10px var(--accent-teal-light);
  flex-shrink: 0;
  animation: piHsDotPulse 2.5s ease-in-out infinite;
}

@keyframes piHsDotPulse {
  0%, 100% { box-shadow: 0 0 6px var(--accent-teal-light); }
  50%       { box-shadow: 0 0 18px var(--accent-teal-light); }
}

.pi-hs__eyebrow-text {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent-teal-light);
}

/* ── Headline ─────────────────────────────────────────────────── */
.pi-hs__headline {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  max-width: 820px;
  margin-bottom: var(--space-lg);
}

.pi-hs__headline .pi-hl-italic {
  font-style: italic;
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Gold rule ───────────────────────────────────────────────── */
.pi-hs__rule {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.pi-hs__rule-line {
  display: block;
  height: 1px;
  width: 56px;
  background: var(--gradient-gold);
  border-radius: 2px;
  opacity: 0.65;
}

.pi-hs__rule-line--short {
  width: 28px;
}

.pi-hs__rule-diamond {
  color: var(--accent-gold);
  font-size: 0.5rem;
  opacity: 0.75;
}

/* ── Description ─────────────────────────────────────────────── */
.pi-hs__desc {
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
  color: var(--text-secondary);
  line-height: 1.78;
  max-width: 620px;
  margin-bottom: var(--space-2xl);
}

/* ── Stats strip ─────────────────────────────────────────────── */
.pi-hs__stats {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.pi-hs__stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  position: relative;
}

.pi-hs__stat::after {
  content: '';
  position: absolute;
  right: calc(var(--space-xl) * -0.5);
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border-subtle);
}

.pi-hs__stat:last-child::after {
  display: none;
}

.pi-hs__stat-icon {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-teal-light);
  font-size: 1rem;
}

.pi-hs__stat-value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
}

.pi-hs__stat-label {
  font-family: var(--font-body);
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  line-height: 1.3;
  max-width: 120px;
}

/* ── CTA actions ─────────────────────────────────────────────── */
.pi-hs__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-3xl);
}

/* ── Media row ───────────────────────────────────────────────── */
.pi-hs__media-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.pi-hs__media-pill {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.pi-hs__media-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.pi-hs__media-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.pi-hs__media-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Progress rail */
.pi-hs__progress {
  flex: 1;
  max-width: 160px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.pi-hs__progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-teal);
  border-radius: var(--radius-full);
}

/* Slide counter */
.pi-hs__counter {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.pi-hs__count-cur { color: var(--text-primary); }
.pi-hs__count-sep { opacity: 0.4; margin-inline: 0.1rem; }

/* ── Trust badge ─────────────────────────────────────────────── */
.pi-hs__trust {
  position: absolute;
  right: clamp(1.5rem, 4vw, 3.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.pi-hs__trust-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(13, 115, 119, 0.12);
  border: 1.5px solid rgba(13, 115, 119, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
  box-shadow: 0 0 24px rgba(13, 115, 119, 0.18);
}

.pi-hs__trust-ring svg {
  width: 28px;
  height: 28px;
  color: var(--accent-gold);
  stroke: var(--accent-gold);
}

.pi-hs__trust-l1 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
}

.pi-hs__trust-l2 {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  max-width: 80px;
  line-height: 1.4;
  white-space: pre-line;
}

/* ── Dot navigation ──────────────────────────────────────────── */
.pi-hs__dots {
  position: absolute;
  bottom: clamp(5rem, 8vw, 7rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pi-hs__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-base);
}

.pi-hs__dot.pi-dot--active {
  width: 24px;
  border-radius: var(--radius-full);
  background: var(--gradient-teal);
}

.pi-hs__dot:hover:not(.pi-dot--active) {
  background: rgba(255, 255, 255, 0.50);
}

/* ── Scroll cue ──────────────────────────────────────────────── */
.pi-hs__scroll {
  position: absolute;
  bottom: 2.25rem;
  right: clamp(1.5rem, 4vw, 3.5rem);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0.5;
  transition: opacity var(--transition-base);
}

.pi-hs__scroll.pi-scroll--hidden {
  opacity: 0;
  pointer-events: none;
}

.pi-hs__scroll-track {
  display: block;
  width: 1.5px;
  height: 52px;
  background: rgba(155, 175, 202, 0.22);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.pi-hs__scroll-pip {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: var(--gradient-teal);
  border-radius: 2px;
  animation: piHsScrollPip 2.2s ease-in-out infinite;
}

@keyframes piHsScrollPip {
  0%   { transform: translateY(-100%); opacity: 1; }
  60%  { transform: translateY(260%);  opacity: 1; }
  61%  { opacity: 0; }
  100% { transform: translateY(260%);  opacity: 0; }
}

.pi-hs__scroll-lbl {
  font-family: var(--font-body);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ── Marquee ticker ──────────────────────────────────────────── */
.pi-hs__marquee {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 38px;
  background: rgba(10, 15, 30, 0.75);
  border-top: 1px solid rgba(13, 115, 119, 0.22);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.pi-hs__marquee-track {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: piHsMarquee 55s linear infinite;
  will-change: transform;
}

.pi-hs__marquee:hover .pi-hs__marquee-track {
  animation-play-state: paused;
}

@keyframes piHsMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.pi-hs__marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0 1.5rem;
}

/* ── Slide transition states ─────────────────────────────────── */
.pi-hs--transitioning .pi-hs__eyebrow,
.pi-hs--transitioning .pi-hs__headline,
.pi-hs--transitioning .pi-hs__rule,
.pi-hs--transitioning .pi-hs__desc,
.pi-hs--transitioning .pi-hs__stats,
.pi-hs--transitioning .pi-hs__actions,
.pi-hs--transitioning .pi-hs__media-row {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.pi-hs__eyebrow.pi-anim--in   { animation: piHsFadeUp 0.55s ease both; animation-delay: 0.00s; }
.pi-hs__headline.pi-anim--in  { animation: piHsFadeUp 0.60s ease both; animation-delay: 0.08s; }
.pi-hs__rule.pi-anim--in      { animation: piHsFadeUp 0.60s ease both; animation-delay: 0.16s; }
.pi-hs__desc.pi-anim--in      { animation: piHsFadeUp 0.60s ease both; animation-delay: 0.22s; }
.pi-hs__stats.pi-anim--in     { animation: piHsFadeUp 0.60s ease both; animation-delay: 0.30s; }
.pi-hs__actions.pi-anim--in   { animation: piHsFadeUp 0.60s ease both; animation-delay: 0.38s; }
.pi-hs__media-row.pi-anim--in { animation: piHsFadeUp 0.60s ease both; animation-delay: 0.46s; }

@keyframes piHsFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .pi-hs__trust {
    top: auto;
    bottom: 6rem;
    right: 1.5rem;
    transform: none;
    flex-direction: row;
    gap: 0.65rem;
  }
  .pi-hs__trust-ring {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
  }
  .pi-hs__trust-ring svg { width: 20px; height: 20px; }
}

@media (max-width: 768px) {
  .pi-hs { align-items: flex-end; padding-bottom: 5rem; }
  .pi-hs__stage { padding-top: clamp(5rem, 20vw, 8rem); padding-bottom: var(--space-xl); }
  .pi-hs__headline { font-size: clamp(1.85rem, 7vw, 2.75rem); }
  .pi-hs__desc { font-size: 0.9375rem; }
  .pi-hs__stats { gap: var(--space-lg); }
  .pi-hs__stat-label { max-width: 100px; font-size: 0.72rem; }
  .pi-hs__actions { flex-direction: column; align-items: flex-start; }
  .pi-hs__actions .btn { width: 100%; justify-content: center; }
  .pi-hs__trust { display: none; }
  .pi-hs__scroll { display: none; }
  .pi-hs__progress { max-width: 100px; }
}

@media (max-width: 480px) {
  .pi-hs__stats { gap: var(--space-md); }
  .pi-hs__stat::after { display: none; }
  .pi-hs__dots { bottom: 4.5rem; }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .pi-hs__slide { transition: opacity 0.3s ease; transform: none !important; }
  .pi-hs__marquee-track { animation: none; }
  .pi-hs__eyebrow-dot { animation: none; }
  .pi-hs__scroll-pip { animation: none; }
  .pi-hs__eyebrow, .pi-hs__headline, .pi-hs__rule,
  .pi-hs__desc, .pi-hs__stats, .pi-hs__actions, .pi-hs__media-row {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
