/**
 * MX Hero Components — mx.allabout.network
 * @description Three-tier hero system: full, section, compact.
 *              Full hero from bookshop; section hero adapted from the-books;
 *              compact hero for index pages.
 * @version 1.0
 * @author Tom Cranstoun
 * @mx:status active
 * @mx:contentType stylesheet
 */

/* ══════════════════════════════════════════════
   HERO — Base styles (shared by all tiers)
   ══════════════════════════════════════════════ */

.hero {
  position: relative;
  overflow: hidden;
}

.hero > * {
  position: relative;
  z-index: 1;
}

/* ── MX Badge (shared across hero tiers) ── */
.hero-brand {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  font-family: var(--mx-font-heading);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 228px;
  height: 90px;
  padding: 0 20px;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-left: -1px;
}

/* ── Hero inner container (constrains content to 960px) ── */
.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  gap: 24px;
}

/* ── Accent text (gold on dark) ── */
.hero .accent {
  color: var(--mx-gold);
}

/* ══════════════════════════════════════════════
   TIER 1 — Full Hero (homepage, books landing)
   90vh, backdrop image, 2-column layout
   ══════════════════════════════════════════════ */

.hero--full {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
}

/* Backdrop image with gradient overlay */
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 22, 40, 0.6) 0%,
    rgba(10, 22, 40, 0.8) 60%,
    rgba(10, 22, 40, 1) 100%
  );
}

/* Two-column content layout */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 960px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  max-width: 600px;
}

.hero-title-graphic {
  width: 100%;
  max-width: 480px;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--mx-text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
  overflow-wrap: break-word;
}

/* Book covers column */
.hero-books,
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.5rem;
  position: relative;
}

.hero-book-item {
  position: relative;
  transition: transform 0.3s ease;
}

.hero-book-item:hover {
  transform: translateY(-8px);
}

.hero-book-item img {
  height: 380px;
  width: auto;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* CTA buttons row */
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ══════════════════════════════════════════════
   TIER 2 — Section Hero (services, about, learn)
   50vh, gradient background, MX badge + typography
   ══════════════════════════════════════════════ */

.hero--section {
  min-height: 50vh;
  padding: 8rem 0 4rem;
  background: linear-gradient(
    180deg,
    var(--mx-blue-dark) 0%,
    var(--mx-blue-deep) 100%
  );
}

.hero--section h1 {
  margin: 0;
  font-family: var(--mx-font-heading);
  font-size: clamp(3rem, 8vw, 6.7rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.93;
  text-wrap: balance;
  color: var(--mx-white);
}

.hero--section h1 span {
  display: block;
}

/* Decorative horizontal lines around heading */
.hero--section h1::before,
.hero--section h1::after {
  content: "";
  display: block;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.hero--section h1::before {
  width: min(28vw, 360px);
  margin-bottom: 18px;
}

.hero--section h1::after {
  width: min(46vw, 620px);
  margin-top: 18px;
}

.hero--section .subtitle {
  margin: 0;
  color: var(--mx-text-muted);
  font-size: clamp(1.08rem, 1.5vw, 1.35rem);
  line-height: 1.55;
}

/* ══════════════════════════════════════════════
   TIER 3 — Compact Hero (blog index, category pages)
   Auto height, simple dark band
   ══════════════════════════════════════════════ */

.hero--compact {
  padding: 8rem 0 3rem;
  background: var(--mx-blue-dark);
  border-bottom: 1px solid var(--mx-border);
}

.hero--compact h1 {
  margin: 0;
  font-family: var(--mx-font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--mx-white);
}

.hero--compact .subtitle {
  margin: 0;
  color: var(--mx-text-muted);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.55;
}

/* ══════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-title-graphic {
    margin: 0 auto 1.5rem;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-books,
  .hero-visual {
    justify-content: center;
  }

  .hero-book-item img {
    height: 280px;
  }
}

@media (max-width: 768px) {
  .hero--full {
    min-height: auto;
    padding: 7rem 1.25rem 3rem;
  }

  .hero--section {
    min-height: auto;
    padding: 7rem 1.25rem 3rem;
  }

  .hero--compact {
    padding: 7rem 1.25rem 2rem;
  }

  .hero-book-item img {
    height: 200px;
  }

  .hero-logo {
    width: 60px;
    height: 60px;
    font-size: 22px;
  }

  .hero-badge {
    min-width: auto;
    height: 60px;
    font-size: 12px;
    padding: 0 12px;
  }
}

@media (max-width: 480px) {
  .hero-books,
  .hero-visual {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}
