/* =============================================
   05-hero.css — Hero Sections v5.0
   shadcn/ui + Aceternity inspired — clean & modern
   ============================================= */

/* ---- MAIN HERO (homepage) ---- */
.hero-section {
  position: relative;
  padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-12);
  min-height: 90vh;
  display: flex;
  align-items: center;
  color: var(--text-inverse);
  overflow: hidden;
  z-index: 1;
}

.hero-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.75) 0%,
    rgba(15, 23, 42, 0.6) 40%,
    rgba(15, 23, 42, 0.8) 100%
  );
  z-index: -1;
}

/* Grid noise texture — very subtle */
.hero-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  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)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

.hero-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-content {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-5);
}

/* ---- BRAND NAME ---- */
.hero-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.brand-pre {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.5);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 0.95;
  color: #ffffff;
}

/* ---- HERO TITLE ---- */
.hero-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: var(--leading-snug);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  letter-spacing: -0.01em;
}

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

.js-loaded .hero-title .word {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .js-loaded .hero-title .word {
    opacity: 1;
  }
}

/* ---- HERO SUBTITLE ---- */
.hero-subtitle {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.55);
  max-width: 480px;
  text-align: center;
}

/* Subtitle blur-in animation */
.js-loaded .hero-subtitle {
  opacity: 0;
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-out) 0.6s,
              filter 0.8s var(--ease-out) 0.6s;
}

.js-loaded .hero-subtitle.revealed {
  opacity: 1;
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .js-loaded .hero-subtitle {
    opacity: 1;
    filter: none;
    transition: none;
  }
}

/* ---- HERO HIGHLIGHTS (trust badges) ---- */
.hero-highlights {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background var(--duration-normal) ease,
              border-color var(--duration-normal) ease,
              transform var(--duration-normal) ease;
}

.highlight-item:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.highlight-item i,
.highlight-item svg,
.highlight-item .icon {
  color: var(--color-accent);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.highlight-item strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

/* ---- HERO BUTTONS ---- */
.hero-buttons {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

/* ---- HERO DIVIDER (smooth transition to next section) ---- */
.hero-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 1;
}

.hero-divider svg {
  width: 100%;
  height: 48px;
}

/* ---- SECONDARY HERO (subpages) ---- */
.secondary-hero {
  position: relative;
  padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-8);
  min-height: 45vh;
  display: flex;
  align-items: center;
  color: var(--text-inverse);
  overflow: hidden;
}

/* ---- HERO SPLIT (brand pages, guides, service pages) ---- */
.hero-split {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-6);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-default);
}

.hero-split .container {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: var(--space-7);
  align-items: center;
}

.hero-split-content {
  z-index: 2;
}

.hero-split .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(var(--color-primary-rgb), 0.08);
  color: var(--color-primary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  border: 1px solid rgba(var(--color-primary-rgb), 0.12);
}

.hero-split .hero-badge i,
.hero-split .hero-badge svg {
  width: 14px;
  height: 14px;
}

.hero-split h1 {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  line-height: var(--leading-tight);
}

.hero-split .hero-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
  opacity: 1;
  filter: none;
}

.hero-split .hero-meta {
  display: flex;
  gap: var(--space-5);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.hero-split .hero-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hero-split .hero-meta-item i,
.hero-split .hero-meta-item svg {
  color: var(--color-primary);
  width: 16px;
  height: 16px;
}

.hero-split .hero-buttons {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-5);
}

.hero-split-image {
  position: relative;
  z-index: 1;
}

.hero-split-image img {
  width: 100%;
  max-height: 240px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--border-default);
}

/* Hero split search box */
.hero-split .search-box {
  position: relative;
  max-width: 600px;
  margin-top: var(--space-6);
  display: flex;
  align-items: center;
}

.hero-split .search-box i,
.hero-split .search-box svg {
  position: absolute;
  left: var(--space-4);
  color: var(--text-muted);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.hero-split .search-box input {
  width: 100%;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-8);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-family: var(--font-body);
  background: var(--surface-base);
  transition: border-color var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
}

.hero-split .search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.08);
}

/* ---- HERO MINIMAL (about, secondary pages) ---- */
.hero-minimal {
  padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-8);
  text-align: center;
}

.hero-minimal h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.hero-minimal .hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
  opacity: 1;
  filter: none;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 992px) {
  .hero-split .container {
    grid-template-columns: 1fr 0.8fr;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: calc(60px + var(--space-6)) 0 var(--space-8);
    min-height: 85svh;
  }

  .hero-content {
    gap: var(--space-3);
    padding: 0 var(--space-2);
  }

  .brand-pre {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
  }

  .brand-name {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
    letter-spacing: 0.08em;
  }

  .hero-title {
    font-size: var(--text-lg);
  }

  .hero-subtitle {
    font-size: var(--text-xs);
  }

  .hero-highlights {
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
  }

  .highlight-item {
    font-size: 0.7rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .button {
    width: 100%;
  }

  /* Hero split responsive */
  .hero-split {
    padding: calc(60px + var(--space-5)) 0 var(--space-5);
  }

  .hero-split .container {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .hero-split h1 {
    font-size: var(--text-2xl);
  }

  .hero-split .hero-meta {
    flex-direction: column;
    gap: var(--space-2);
  }

  .hero-split-image {
    order: -1;
  }

  .hero-split .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-split .hero-buttons .button {
    width: 100%;
  }

  /* Hero minimal responsive */
  .hero-minimal {
    padding: calc(60px + var(--space-5)) 0 var(--space-5);
  }

  .hero-minimal h1 {
    font-size: var(--text-2xl);
  }
}

@media (max-width: 768px) {
  .hero-split-image {
    display: none;
  }

  .hero-split h1 {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
  }

  .hero-split .hero-subtitle {
    font-size: var(--text-sm);
  }

  .hero-split .hero-badge {
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    padding: var(--space-1) var(--space-2);
  }

  .hero-split .hero-meta-item {
    font-size: var(--text-xs);
  }
}
