/* Maverick Services — Hero v2 (Reference Design) */

.hero {
  position: relative;
  min-height: calc(100vh - var(--topbar-height) - var(--nav-height));
  min-height: calc(100dvh - var(--topbar-height) - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Real solar installation photo — slow Ken Burns */
.hero__photo {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  animation: heroKenBurns 28s ease-in-out infinite alternate;
  will-change: transform;
}

.hero__photo--slide-2 { opacity: 0; background-image: url('../images/generator1.png'); animation-delay: -9s; }
.hero__photo--slide-3 { opacity: 0; background-image: url('../images/project-solar.jpg'); animation-delay: -18s; }

/* Photovoltaic cell grid overlay */
.hero__solar-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(60, 141, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 141, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 56px;
  mask-image: linear-gradient(135deg, black 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(135deg, black 0%, transparent 70%);
  animation: solarGridShift 20s linear infinite;
}

/* Energy flow lines — domain-specific */
.hero__energy-flow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.35;
}

.hero__energy-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-blue-light), transparent);
  animation: energyFlowLine 4s ease-in-out infinite;
}

.hero__energy-line:nth-child(1) { top: 35%; left: -20%; width: 40%; animation-delay: 0s; }
.hero__energy-line:nth-child(2) { top: 55%; left: 10%; width: 35%; animation-delay: 1.2s; }
.hero__energy-line:nth-child(3) { top: 70%; left: -10%; width: 50%; animation-delay: 2.4s; }

/* Sunlight sweep */
.hero__sunbeam {
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 160, 50, 0.06) 50%, transparent 60%);
  animation: sunbeamSweep 12s ease-in-out infinite;
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(8, 10, 14, 0.92) 0%, rgba(8, 10, 14, 0.75) 45%, rgba(8, 10, 14, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 10, 14, 0.4) 0%, transparent 40%, rgba(8, 10, 14, 0.6) 100%);
  z-index: 1;
}

[data-theme="light"] .hero__overlay {
  background:
    linear-gradient(105deg, rgba(10, 12, 16, 0.88) 0%, rgba(10, 12, 16, 0.7) 50%, rgba(10, 12, 16, 0.4) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
}

.hero__layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xl);
  align-items: center;
  width: 100%;
}

.hero__main { max-width: 640px; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(60, 141, 255, 0.4);
  border-radius: var(--radius-full);
  background: rgba(60, 141, 255, 0.12);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-blue-light);
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(16px);
}

.hero__badge i { font-size: 0.7em; }

.hero__title {
  font-size: var(--text-5xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #fff;
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(24px);
}

.hero__title .highlight {
  color: var(--brand-blue-light);
  background: none;
  -webkit-text-fill-color: var(--brand-blue-light);
}

.hero__desc {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
}

.hero__features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  opacity: 0;
  transform: translateY(16px);
}

.hero__feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.hero__feature i {
  color: var(--brand-blue-light);
  font-size: 1rem;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  opacity: 0;
  transform: translateY(16px);
}

.hero__ctas .btn-primary {
  padding: 1rem 1.75rem;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero__ctas .btn-outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.hero__ctas .btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Impact card — reference design */
.hero__impact {
  background: rgba(12, 14, 18, 0.75);
  border: 1px solid rgba(60, 141, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-width: 280px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateX(30px);
}

.hero__impact-title {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero__impact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hero__impact-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hero__impact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(60, 141, 255, 0.15);
  border: 1px solid rgba(60, 141, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue-light);
  flex-shrink: 0;
}

.hero__impact-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.hero__impact-label {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-ui);
}

/* Hero entrance animations */
.hero.is-animated .hero__badge { animation: fadeUp 0.7s 0.1s forwards; }
.hero.is-animated .hero__title { animation: fadeUp 0.8s 0.2s forwards; }
.hero.is-animated .hero__desc { animation: fadeUp 0.8s 0.35s forwards; }
.hero.is-animated .hero__features { animation: fadeUp 0.8s 0.45s forwards; }
.hero.is-animated .hero__ctas { animation: fadeUp 0.8s 0.55s forwards; }
.hero.is-animated .hero__impact { animation: fadeUpRight 0.9s 0.4s forwards; }

/* Floating contact rail */
.float-rail {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  overflow: hidden;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
}

.float-rail__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.85rem 0.65rem;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: background var(--transition-fast);
  text-align: center;
  min-width: 56px;
}

.float-rail__item:last-child { border-bottom: none; }
.float-rail__item:hover { background: var(--brand-blue-dark); color: #fff; }
.float-rail__item i { font-size: 1.1rem; }

/* Coverage iframe map */
.coverage-map__iframe {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--card-border);
  aspect-ratio: 4/3;
  min-height: 360px;
  background: var(--bg-tertiary);
}

.coverage-map__iframe iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(20%) contrast(1.05);
}

[data-theme="dark"] .coverage-map__iframe iframe {
  filter: grayscale(30%) contrast(1.1) brightness(0.85);
}

/* Comparison — solar transformation */
.comparison-wrap {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--card-shadow);
}

.comparison-wrap__title {
  font-size: var(--text-base);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.comparison-wrap__subtitle {
  font-size: var(--text-xs);
  text-align: center;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  font-family: var(--font-ui);
}

/* Enhanced topbar */
.topbar__info a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.topbar__info a:hover { color: var(--brand-blue); }

/* Nav CTA uppercase */
.site-nav__actions .btn-primary {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--text-xs);
}

@keyframes heroKenBurns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1%, -1%); }
}

@keyframes solarGridShift {
  0% { background-position: 0 0; }
  100% { background-position: 40px 56px; }
}

@keyframes energyFlowLine {
  0%, 100% { opacity: 0; transform: translateX(-10%); }
  50% { opacity: 1; transform: translateX(10%); }
}

@keyframes sunbeamSweep {
  0%, 100% { transform: translateX(-30%) rotate(15deg); opacity: 0.3; }
  50% { transform: translateX(60%) rotate(15deg); opacity: 0.7; }
}

@keyframes fadeUpRight {
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1024px) {
  .hero__layout {
    grid-template-columns: 1fr;
  }

  .hero__impact {
    min-width: unset;
    max-width: 480px;
  }

  .float-rail { display: none; }
}

@media (max-width: 768px) {
  .hero__impact-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .hero__ctas { flex-direction: column; width: 100%; }
  .hero__ctas .btn { width: 100%; justify-content: center; }

  .coverage-map__iframe { min-height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__photo,
  .hero__solar-grid,
  .hero__sunbeam,
  .hero__energy-line { animation: none; }
}
