/* ============================================================
   HERO — hero.css
   Full-viewport hero section, buttons, ticker
============================================================ */

/* Hero wrapper */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  background: var(--color-surface);
}

/* Background layer */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img,
.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Overlay — left fade for text readability, right fully open so image shines */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(10, 18, 32, 0.38) 0%,
      rgba(10, 18, 32, 0.14) 40%,
      rgba(10, 18, 32, 0.02) 65%,
      transparent 100%
    ),
    linear-gradient(
      to top,
      rgba(10, 18, 32, 0.14) 0%,
      transparent 28%
    );
  z-index: 1;
}

/* Canvas for spark particles */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Content */
.hero-content {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding-top: 220px;
  padding-bottom: 2rem;
}

.hero-content .container {
  width: 100%;
}

/* Eyebrow label */
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1.25rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(38, 157, 204, 0.9);
  border-radius: var(--border-radius);
  background: rgba(38, 157, 204, 0.08);
  animation: eyebrow-glow 2.4s ease-in-out infinite;
}

@keyframes eyebrow-glow {
  0%, 100% {
    border-color: rgba(38, 157, 204, 0.6);
    box-shadow: 0 0 6px rgba(38, 157, 204, 0.4), 0 0 18px rgba(38, 157, 204, 0.2);
  }
  50% {
    border-color: rgba(38, 157, 204, 1);
    box-shadow: 0 0 10px rgba(38, 157, 204, 0.8), 0 0 30px rgba(38, 157, 204, 0.45), 0 0 60px rgba(38, 157, 204, 0.2);
  }
}

/* Headline */
.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 7.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-text-on-dark);
  margin-bottom: 1.25rem;
  max-width: 900px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

/* Each line wraps for clip-path animation */
.hero-headline .line {
  display: block;
  overflow: hidden;
}

.hero-headline .word {
  display: inline-block;
}

/* Sub-headline */
.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.hero-sub strong {
  color: var(--color-text-on-dark);
  font-weight: 500;
}

/* CTA row */
.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   BUTTONS (base, primary, outline)
============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}

/* Sweep-in background via pseudo-element */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-101%);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 0;
}

.btn:hover::before {
  transform: translateX(0);
}

.btn span,
.btn svg {
  position: relative;
  z-index: 1;
}

/* Primary — dark blue by default (works on white/light backgrounds) */
.btn--primary {
  background: var(--color-secondary);
  color: #ffffff;
  border-color: var(--color-secondary);
}

.btn--primary::before {
  background: var(--color-secondary-hover);
}

.btn--primary:hover {
  box-shadow: 0 4px 24px rgba(32, 87, 133, 0.4);
}

/* Outline — white border */
.btn--outline {
  background: transparent;
  color: var(--color-text-on-dark);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--outline::before {
  background: rgba(255, 255, 255, 0.08);
}

.btn--outline:hover {
  border-color: var(--color-secondary);
  color: var(--color-text-on-dark);
}

/* Outline — dark border, for use on light backgrounds */
.btn--outline-dark {
  background: transparent;
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.btn--outline-dark::before {
  background: var(--color-secondary);
}

.btn--outline-dark:hover {
  color: var(--color-text-on-dark);
  border-color: var(--color-secondary);
}

/* Red outline (on light red backgrounds) */
.btn--outline-red {
  background: transparent;
  color: var(--color-text-on-dark);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--outline-red::before {
  background: rgba(0, 0, 0, 0.15);
}

.btn--outline-red:hover {
  border-color: white;
}

/* Small variant */
.btn--sm {
  padding: 0.6rem 1.25rem;
  font-size: 0.78rem;
}

/* Icon inside button */
.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================================
   TICKER / MARQUEE STRIP below hero
============================================================ */

.hero-ticker {
  position: relative;
  z-index: 3;
  width: 100%;
  overflow: hidden;
  background: transparent;
  padding: 1.25rem 0;
  flex-shrink: 0;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 35s linear infinite;
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  padding: 0 2.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  flex-shrink: 0;
}

.ticker-item::before {
  content: '—';
  margin-right: 1.5rem;
  opacity: 0.55;
  font-family: var(--font-body);
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Never pause on hover */

/* ============================================================
   PAGE HERO (inner pages — shorter)
============================================================ */

.page-hero {
  position: relative;
  min-height: 500px;
  padding: 10rem 0 5rem;
  background: var(--color-surface);
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(255, 255, 255, 0.012) 40px,
    rgba(255, 255, 255, 0.012) 41px
  );
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  filter: grayscale(30%);
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  /* gradient: darkest at top-left (behind text), lightens toward bottom-right */
  background:
    linear-gradient(
      to bottom,
      rgba(20, 28, 46, 0.72) 0%,
      rgba(20, 28, 46, 0.52) 55%,
      rgba(20, 28, 46, 0.30) 100%
    );
  z-index: 1;
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-hero-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  /* High contrast white pill — WCAG AA on any dark overlay */
  color: #ffffff;
  background: rgba(38, 157, 204, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--border-radius);
  padding: 0.3rem 0.75rem;
  margin-bottom: 1rem;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  color: var(--color-text-on-dark);
}

.page-hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 600px;
  margin-top: 1.25rem;
}

/* Angled bottom clip */
.page-hero--clipped {
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
  padding-bottom: 8rem;
}

/* ============================================================
   SCROLL HINT — animated indicator on page heros
============================================================ */

.scroll-hint {
  position: absolute;
  /* Position at bottom of the hero, clear of the clipped polygon edge */
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 4;
  white-space: nowrap;
  cursor: default;
  /* Ensure it never overlaps hero text */
  pointer-events: none;
}

.scroll-hint-text {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.scroll-hint-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  animation: scrollBounce 1.6s ease-in-out infinite;
}

.scroll-hint-icon svg {
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.70);
  display: block;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* Hide the scroll hint where it can collide with hero copy (tablet / short screens) */
@media (max-width: 1180px), (max-height: 760px) {
  .scroll-hint { display: none; }
}
