#hero {
  --hero-wave-a: #1a3a8f;
  --hero-wave-a-opacity: 0.15;
  --hero-wave-b: #d4a017;
  --hero-wave-b-opacity: 0.05;
  --hero-logo-shadow: rgba(26, 58, 143, 0.4);

  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  padding-bottom: 60px;
  overflow: hidden;
}

[data-theme="dark"] #hero {
  --hero-wave-a: #1a52db;
  --hero-wave-a-opacity: 0.18;
  --hero-wave-b: #d4a017;
  --hero-wave-b-opacity: 0.06;
  --hero-logo-shadow: rgba(0, 51, 160, 0.4);
  --hero-tagline: #7a8fa8;
  --hero-glow-blue: rgba(26, 82, 219, 0.14);
  --hero-glow-gold: rgba(212, 160, 23, 0.05);
}

[data-theme="dark"] #hero::before,
[data-theme="dark"] #hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(72px);
}

[data-theme="dark"] #hero::before {
  left: -8%;
  top: 18%;
  width: 42%;
  height: 55%;
  background: radial-gradient(circle, var(--hero-glow-blue) 0%, transparent 68%);
}

[data-theme="dark"] #hero::after {
  right: -6%;
  bottom: 8%;
  width: 38%;
  height: 48%;
  background: radial-gradient(circle, var(--hero-glow-gold) 0%, transparent 70%);
}

#hero > .container {
  width: 100%;
  max-width: 1200px;
}

.hero-waves {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

.hero-wave-stop-a {
  stop-color: var(--hero-wave-a);
  stop-opacity: var(--hero-wave-a-opacity);
}

.hero-wave-stop-b {
  stop-color: var(--hero-wave-b);
  stop-opacity: var(--hero-wave-b-opacity);
}

.hero-wave-accent {
  opacity: 0;
}

[data-theme="dark"] #hero .hero-wave-accent {
  opacity: 0.85;
}

.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-heading {
  margin-bottom: 32px;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  line-height: 1.15;
  color: var(--text);
  animation: heroFadeUp 0.7s ease both;
}

.hero-heading__mobile { display: none; }

.hero-heading-logo {
  display: inline-block;
  vertical-align: middle;
  height: 1.1em;
  width: auto;
  margin: 0 0.12em;
  transform: translateY(-0.06em);
  filter: drop-shadow(0 2px 8px var(--hero-logo-shadow));
}

.hero-heading-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
}

.hero-heading__desktop .hero-heading-brand .hero-heading-logo {
  height: 2.25em;
  margin: 0;
  transform: none;
  vertical-align: unset;
}

.hero-sub {
  margin-bottom: 32px;
  color: var(--text-sub);
  font-size: 1.25rem;
  max-width: 576px;
  animation: heroFadeUp 0.7s ease 0.18s both;
}

.hero-btns {
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: heroFadeUp 0.7s ease 0.34s both;
}

.hero-tagline {
  color: var(--gray-light);
  font-size: 1em;
  font-style: italic;
  letter-spacing: .02em;
  animation: heroFadeUp 0.7s ease 0.48s both;
}

.hero-tagline span { margin: 0 8px; color: var(--gold); }

.hero-btn-icon--arrow { display: none; }

/* ── HERO: DARK MODE ────────────────────────────────── */
[data-theme="dark"] #hero .hero-heading {
  color: #ffffff;
}

[data-theme="dark"] #hero .hero-sub {
  color: var(--text-sub);
  line-height: 1.7;
}

[data-theme="dark"] #hero .btn-primary {
  background: linear-gradient(180deg, #2a61e6 0%, var(--blue) 50%, var(--blue-dark) 100%);
  box-shadow: 0 4px 20px rgba(0, 51, 160, 0.42), inset 0 1px 0 rgba(120, 175, 255, 0.2);
}
[data-theme="dark"] #hero .btn-primary:hover {
  background: linear-gradient(180deg, #3a6ee8 0%, #1e4fc4 50%, #003399 100%);
  box-shadow: 0 6px 24px rgba(0, 51, 160, 0.55), inset 0 1px 0 rgba(120, 175, 255, 0.25);
  transform: translateY(-1px);
}

[data-theme="dark"] #hero .btn-outline {
  color: #5b8ef0;
  border-color: var(--blue);
  background: transparent;
}
[data-theme="dark"] #hero .btn-outline:hover {
  color: #7aa8f5;
  border-color: #2a61e6;
  background: rgba(26, 82, 219, 0.1);
}

[data-theme="dark"] #hero .hero-tagline {
  color: var(--hero-tagline, #7a8fa8);
  font-size: 0.95rem;
}
[data-theme="dark"] #hero .hero-tagline span {
  color: var(--gold);
  opacity: 0.8;
}

.hero-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 800px;
}

.hero-logo-card {
  width: 420px;
  max-width: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: heroLogoFlip 8s linear infinite;
}

.hero-logo {
  width: 100%;
  display: block;
  filter: drop-shadow(0 8px 32px var(--hero-logo-shadow));
  transition: filter var(--transition);
  backface-visibility: hidden;
}

.hero-logo-back {
  position: absolute;
  top: 0; left: 0;
  transform: rotateY(180deg);
}

/* ── HERO ENTRANCE ANIMATIONS ───────────────────────── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroLogoFlip {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(-360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-heading, .hero-sub, .hero-btns, .hero-tagline, .hero-logo-card {
    animation: none;
  }
}

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-btns { justify-content: center; }
  .hero-sub { margin-inline: auto; }
  .hero-logo-card { width: 280px; }
  #hero { padding-top: 88px; padding-bottom: 48px; }
}

@media (max-width: 768px) {
  #hero {
    min-height: 100dvh;
    min-height: 100svh;
    padding: 0;
    background: var(--bg);
  }

  .hero-waves,
  [data-theme="dark"] #hero::before,
  [data-theme="dark"] #hero::after {
    display: none;
  }

  #hero > .container {
    min-height: 100dvh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    box-sizing: border-box;
  }

  .hero-inner {
    display: block;
    width: 100%;
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .hero-heading__desktop { display: none; }
  .hero-heading__mobile { display: block; }

  .hero-heading {
    margin-bottom: 20px;
    font-size: clamp(1.75rem, 8.5vw, 2.25rem);
    line-height: 1.3;
    max-width: min(360px, 92vw);
    margin-inline: auto;
    letter-spacing: -0.01em;
  }

  .hero-heading-logo {
    height: 1.35em;
    margin: 0 0.1em;
    transform: translateY(-0.08em);
    filter: none;
  }

  .hero-heading__mobile .hero-heading-brand .hero-heading-logo {
    margin: 0;
    transform: none;
  }

  .hero-logo-wrap { display: none; }

  .hero-sub {
    margin-bottom: 32px;
    font-size: 0.9375rem;
    line-height: 1.7;
    max-width: min(360px, 92vw);
    padding: 0;
    color: var(--text-sub);
  }

  .hero-btns {
    flex-direction: column;
    align-items: stretch;
    max-width: 280px;
    width: 100%;
    margin-inline: auto;
    margin-bottom: 0;
    gap: 12px;
  }

  .hero-btns .btn-primary,
  .hero-btns .btn-outline {
    width: 100%;
    justify-content: center;
    padding: 15px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
  }

  .hero-tagline {
    margin-top: 28px;
    margin-bottom: 0;
    padding-top: 0;
    font-size: 0.8125rem;
    max-width: min(320px, 90vw);
    margin-inline: auto;
    line-height: 1.5;
    color: var(--text-sub);
    opacity: 0.75;
  }

  .hero-tagline span {
    margin: 0 5px;
    color: var(--text-sub);
    opacity: 0.45;
  }

  .hero-btn-icon--chart { display: none; }
  .hero-btn-icon--arrow { display: block; }
}
