.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 86px;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 3.2rem;

  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;

  transition:
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    backdrop-filter 220ms ease;
}

.main-header.main-header--solid {
  background: linear-gradient(
    180deg,
    rgba(17, 24, 39, 0.94) 0%,
    rgba(17, 24, 39, 0.86) 100%
  );
  border-bottom-color: rgba(148, 163, 184, 0.12);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.main-header.main-header--solid::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.22),
    transparent
  );
  pointer-events: none;
}

.logo img {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.42));
}

.main-header.main-header--solid .logo img {
  filter: none;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav a {
  color: var(--hm-text-soft);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.48);
  transition:
    color 180ms ease,
    opacity 180ms ease;
}

.main-nav a.nav-link-gold {
  color: var(--hm-gold-bright);
  font-weight: 900;
}

.main-nav a.nav-link-gold:hover {
  color: #f4d35e;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.34);
}

.main-header.main-header--solid .main-nav a {
  text-shadow: none;
}

.main-nav a:hover {
  color: var(--hm-gold-bright);
}

.nav-button-substack {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 0 17px;
  border-radius: 7px;
  background: var(--hm-orange);
  color: white !important;
  box-shadow: 0 12px 28px rgba(255, 103, 25, 0.16);
}

.nav-button-substack:hover {
  opacity: 0.88;
}

.cta-button,
.cta-button-deep-dive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.cta-button.primary {
  padding: 1rem 2.5rem;
  border-radius: 4px;
  background: var(--hm-gold);
  border: 2px solid var(--hm-gold);
  color: #111827;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.28);
}

.cta-button.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(212, 175, 55, 0.34);
}

.cta-button.secondary {
  padding: 0.8rem 2rem;
  border-radius: 4px;
  background: transparent;
  border: 2px solid #444444;
  color: #888888;
}

.cta-button.secondary:hover {
  transform: translateY(-3px);
  border-color: var(--hm-gold);
  color: var(--hm-gold);
}

.section-wrapper {
  position: relative;
  padding: 112px 0;
  background: var(--hm-bg);
}

.section-wrapper.alternate-bg {
  background: linear-gradient(
    180deg,
    rgba(11, 18, 32, 0.96),
    rgba(17, 24, 39, 1)
  );
}

.section-header {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto 48px;
  text-align: center;
}

.section-title {
  margin: 0;
  color: var(--hm-text);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 4.1rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.title-underline {
  width: 82px;
  height: 2px;
  margin: 20px auto 0;
  background: linear-gradient(90deg, transparent, var(--hm-gold), transparent);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

.section-subtitle {
  margin: 18px auto 0;
  color: var(--hm-muted);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.placeholder-text {
  color: var(--hm-muted);
  text-align: center;
}

.highlight-text {
  display: block;
  margin-top: 0.85rem;
  color: var(--hm-gold-bright);
  font-weight: 700;
}

.inline-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: min(520px, 100%);
  margin: 0 auto;
}

.inline-form input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--hm-border);
  border-radius: 6px;
  background: rgba(5, 7, 13, 0.56);
  color: var(--hm-text);
  outline: none;
}

.inline-form input:focus {
  border-color: var(--hm-border-strong);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.08);
}

.form-success-message {
  margin-top: 16px;
  color: var(--hm-gold-bright);
  font-weight: 700;
}

.back-to-top-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  z-index: 90;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.78);
  border: 1px solid rgba(212, 175, 55, 0.22);
  color: var(--hm-gold-bright);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 200ms ease;
  backdrop-filter: blur(14px);
}

.back-to-top-button.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top-button:hover {
  background: rgba(212, 175, 55, 0.12);
}

.footer {
  padding: 34px 20px;
  text-align: center;
  background: #070b12;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--hm-faint);
  font-size: 0.88rem;
}

@media (max-width: 820px) {
  .main-header {
    height: auto;
    min-height: 78px;
    padding: 14px 18px;
    align-items: flex-start;
  }

  .logo img {
    height: 44px;
  }

  .main-nav ul {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .main-nav a {
    font-size: 0.82rem;
  }

  .section-wrapper {
    padding: 78px 0;
  }

  .inline-form {
    flex-direction: column;
  }

  .inline-form .cta-button.primary {
    width: 100%;
  }
}
