/*
 * ============================================================
 *  MIDNIGHT AI AGENTS — New Hero Section Styles
 *  Scoped entirely under .hero-section to prevent conflicts
 *  with existing site CSS.
 *
 *  Variable naming: --h-* prefix to avoid collisions with
 *  the site existing --accent-*, --bg-*, --text-* tokens.
 *
 *  Does NOT include: :root resets, body/html globals,
 *  nav/header/mobile-menu styles, .glass-btn, or any
 *  styles not belonging to the hero section itself.
 * ============================================================
 */

/* ============================================================
   HERO DESIGN TOKENS (scoped — dark mode default)
   ============================================================ */
.hero-section {
  --h-bg-canvas:          #0b1610;
  --h-bg-card:            #132219;
  --h-bg-neon-gradient:   #15221b;
  --h-text-primary:       #F5F5ED;
  --h-text-muted:         #9DA79F;
  --h-text-secondary:     #D2D8CB;
  --h-text-accent:        #C8D87B;
  --h-border-subtle:      rgba(200, 216, 123, 0.16);
  --h-border-line:        rgba(245, 245, 237, 0.14);
  --h-shadow-card:        0 24px 70px rgba(5, 11, 8, 0.7);
  --h-glow-mint:          rgba(200, 216, 123, 0.25);
}

[data-theme="light"] .hero-section {
  --h-bg-canvas:          #f5f5ed;
  --h-bg-card:            #FFFFFF;
  --h-bg-neon-gradient:   #314C3A;
  --h-text-primary:       #252F2A;
  --h-text-muted:         #56645C;
  --h-text-secondary:     #314C3A;
  --h-text-accent:        #314C3A;
  --h-border-subtle:      rgba(37, 47, 42, 0.12);
  --h-border-line:        rgba(37, 47, 42, 0.16);
  --h-shadow-card:        0 20px 50px rgba(37, 47, 42, 0.18), 0 0 50px rgba(200, 216, 123, 0.18);
  --h-glow-mint:          rgba(200, 216, 123, 0.35);
}

/* ============================================================
   HERO SECTION WRAPPER
   ============================================================ */
.hero-section {
  width: 100%;
  padding: 20px 0 64px;
  box-sizing: border-box;
  display: block;
  background: transparent;
  overflow: visible;
}

.hero-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ============================================================
   TOP FULL-WIDTH HEADING ROW
   ============================================================ */
.hero-top-fullwidth {
  font-family: var(--font-heading, 'Manrope', sans-serif);
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--h-text-primary);
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: hero-slideUpFade 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.hero-main-title {
  display: block;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-transform: inherit;
  margin: 0;
  padding: 0;
}

.hero-heading-top {
  display: inline;
  white-space: nowrap;
}

.hero-heading-suffix-mobile {
  display: none;
}

/* ============================================================
   BODY ROW: TWO-COLUMN ASYMMETRIC GRID
   ============================================================ */
.hero-body-row {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 40px;
  align-items: stretch;
}

/* ============================================================
   LEFT COLUMN
   ============================================================ */
.hero-left-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.designer-wrap {
  overflow: hidden;
}

.hero-word-bottom {
  font-family: var(--font-heading, 'Manrope', sans-serif);
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--h-text-primary);
  text-transform: none;
  animation: hero-slideUpFade 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

/* ============================================================
   BIO DESCRIPTION
   ============================================================ */
.bio-wrapper {
  display: flex;
  align-items: flex-start;
  padding-right: 24px;
  animation: hero-slideUpFade 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

.bio-text {
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.62;
  color: var(--h-text-muted);
  max-width: 520px;
  margin: 0;
}

.bio-text strong {
  color: var(--h-text-primary);
  font-weight: 600;
}

/* ============================================================
   AGENT BADGE BAR
   ============================================================ */
.amena-badge-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: hero-slideUpFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.26s both;
}

.amena-circles {
  display: flex;
  gap: 8px;
}

.badge-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--h-border-subtle);
  background: transparent;
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--h-text-accent);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.badge-letter:hover {
  border-color: var(--h-text-accent);
  background: rgba(200, 216, 123, 0.08);
}

.amena-line {
  flex: 1;
  height: 1px;
  background: var(--h-border-line);
}

/* ============================================================
   STATS CONTAINER — scoped to hero to avoid collisions
   ============================================================ */
.hero-section .stats-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  animation: hero-slideUpFade 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.34s both;
}

.hero-section .stat-card {
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--h-border-subtle);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.25s ease;
  box-shadow: none;
}

.hero-section .stat-card:hover {
  border-color: rgba(200, 216, 123, 0.3);
}

.hero-section .stat-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-heading, 'Manrope', sans-serif);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1.5px;
  color: var(--h-text-primary);
}

.hero-section .stat-number {
  color: var(--h-text-primary);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1.5px;
  font-size: inherit;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}

.hero-section .stat-symbol {
  color: var(--h-text-accent);
  font-weight: 800;
  font-size: 0.85em;
  margin-left: 2px;
}

.hero-section .stat-desc {
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.42;
  color: var(--h-text-muted);
  margin: 0;
}

.hero-section .stat-desc strong {
  color: var(--h-text-primary);
  font-weight: 600;
}

/* ============================================================
   RIGHT COLUMN: 3D CHARACTER CARD
   ============================================================ */
.hero-right-column {
  display: flex;
  width: 100%;
  height: 100%;
}

.character-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  border-radius: 36px;
  background: var(--h-bg-neon-gradient);
  border: 1px solid var(--h-border-subtle);
  overflow: hidden;
  box-shadow: var(--h-shadow-card);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
  animation: hero-scaleInFade 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.character-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 30px 80px rgba(18, 25, 21, 0.7), 0 0 90px var(--h-glow-mint);
}

.card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.35) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.character-card .image-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.character-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.character-card:hover .character-img {
  transform: scale(1.03);
}

.card-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.character-card:hover .card-glare {
  opacity: 1;
}

/* ============================================================
   KEYFRAME ANIMATIONS (hero- prefix to avoid name conflicts)
   ============================================================ */
@keyframes hero-slideUpFade {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes hero-scaleInFade {
  from { opacity: 0; transform: scale(0.95) translateY(18px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* ============================================================
   RESPONSIVE — 1100px
   ============================================================ */
@media (max-width: 1100px) {
  .hero-section { padding: 16px 0 48px; }
  .hero-container { padding: 0 24px; }
  .hero-body-row { gap: 28px; grid-template-columns: 50% 1fr; }
  .hero-top-fullwidth,
  .hero-word-bottom { font-size: clamp(2.2rem, 4.4vw, 3.8rem); }
}

/* ============================================================
   RESPONSIVE — 960px
   ============================================================ */
@media (max-width: 960px) {
  .hero-heading-suffix-mobile { display: inline; white-space: normal; }
  .designer-wrap.desktop-only { display: none !important; }
  .hero-top-fullwidth { font-size: clamp(2.1rem, 6vw, 3.2rem); line-height: 1.15; margin-bottom: 20px; }
  .hero-main-title { line-height: 1.15; }
  .hero-heading-top { display: inline; white-space: normal; }
  .hero-body-row { grid-template-columns: 1fr; gap: 32px; }
  .hero-right-column { order: -1; width: 100%; }
  .character-card { min-height: 320px; max-height: 440px; aspect-ratio: 16 / 10; }
  .bio-wrapper { justify-content: flex-start; padding-right: 0; }
}

/* ============================================================
   RESPONSIVE — 768px
   ============================================================ */
@media (max-width: 768px) {
  .hero-section { padding: 16px 0 40px; }
}

/* ============================================================
   RESPONSIVE — 600px
   ============================================================ */
@media (max-width: 600px) {
  .hero-container { padding: 0 16px; }
  .hero-section { padding: 12px 0 40px; }
  .hero-top-fullwidth { font-size: clamp(1.75rem, 7.8vw, 2.35rem); letter-spacing: -0.035em; line-height: 1.15; margin-bottom: 16px; }
  .hero-main-title { line-height: 1.15; }
  .bio-text { font-size: 0.96rem; line-height: 1.55; }
  .hero-section .stats-container { grid-template-columns: 1fr 1fr; gap: 14px; }
  .hero-section .stat-value { font-size: clamp(2rem, 5.5vw, 2.5rem); }
  .hero-section .stat-desc { font-size: 0.82rem; }
  .character-card { border-radius: 24px; min-height: 260px; max-height: 360px; aspect-ratio: 16 / 11; }
}

/* ============================================================
   RESPONSIVE — 480px
   ============================================================ */
@media (max-width: 480px) {
  .badge-letter { width: 32px; height: 32px; font-size: 0.8rem; }
  .amena-badge-bar { gap: 10px; }
}

/* ============================================================
   RESPONSIVE — 360px
   ============================================================ */
@media (max-width: 360px) {
  .hero-section .stats-container { grid-template-columns: 1fr; gap: 16px; }
}

.hero-transform-new{
  text-transform: none !important;
  line-height: 100px;
  margin-top: -25px;
}

.bio-text{
  color: #F5F5ED;
}

/* ============================================================
   RESPONSIVE MOBILE ISOLATION & OVERFLOW DEFENSE (.hero-home-new)
   Strictly scoped to the home hero section via unique class.
   Ensures zero horizontal overflow and flawless mobile display.
   ============================================================ */
@media (max-width: 960px) {
  .hero-home-new {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    padding-top: 104px !important;
  }

  .hero-home-new .hero-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }

  .hero-home-new .hero-top-fullwidth {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .hero-home-new .hero-main-title {
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  .hero-home-new .hero-body-row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hero-home-new .hero-left-column,
  .hero-home-new .hero-right-column {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Override any desktop min-height (including Customizer !important) on mobile */
  .hero-home-new #character-card,
  .hero-home-new .character-card,
  body.page-id-6 #hero .character-card,
  .page-id-6 #hero #character-card {
    min-height: unset !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    aspect-ratio: 16 / 10;
  }

  .hero-home-new .bio-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .hero-home-new .bio-text {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  .hero-home-new .amena-badge-bar {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .hero-home-new .amena-line {
    min-width: 12px;
    flex-shrink: 1;
  }

  .hero-home-new .stats-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  .hero-home-new .stat-card {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 600px) {
  .hero-home-new {
    padding-top: 96px !important;
    padding-bottom: 40px !important;
  }

  .hero-home-new .hero-container {
    padding: 0 16px !important;
  }

  .hero-home-new #character-card,
  .hero-home-new .character-card,
  body.page-id-6 #hero .character-card,
  .page-id-6 #hero #character-card {
    aspect-ratio: 16 / 11;
    border-radius: 24px;
    max-height: 380px;
  }
}

@media (max-width: 480px) {
  .hero-home-new .stat-card {
    padding: 16px 14px !important;
  }

  .hero-home-new .stats-container {
    gap: 10px !important;
  }

  .hero-home-new .stat-desc {
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
    overflow-wrap: break-word !important;
  }
}

@media (max-width: 380px) {
  .hero-home-new .stats-container {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* ============================================================
   HERO CTA ROW (Revision Round 1) — reuses .glass-btn primary/secondary.
   Mobile stacking (column, full width) comes from the existing
   .hero-actions rule in Additional CSS.
   ============================================================ */
.hero-home-new .hero-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  animation: hero-slideUpFade 0.82s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}
