/* ============================================================
   Hero — AURA-reference layout on The Only Peace of Mind brand.
   Scoped so the study library below keeps its own styling.
   ============================================================ */

.hero {
  /* The website's exact button blue, measured from theonlypeaceofmind.org. */
  --logo-blue: #5070f8;
  /* Exact gold of "Peace of Mind" in the header wordmark. */
  --logo-gold: #f4c95d;
  /* Same bronze as the Download button on the promo card. */
  --bronze: #c8871a;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  position: relative;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------- Background video: fills the frame, loops, no letterbox ---------- */

.hero-video-stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #04060c; }
.hero-video-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Side fade + top/bottom scrims, matching the reference's legibility wash. */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(4,6,12,.93) 0%,
      rgba(4,6,12,.82) 24%,
      rgba(4,6,12,.50) 52%,
      rgba(4,6,12,.16) 76%,
      rgba(4,6,12,.46) 100%),
    linear-gradient(180deg,
      rgba(4,6,12,.72) 0%,
      rgba(4,6,12,.16) 16%,
      rgba(4,6,12,.10) 58%,
      rgba(4,6,12,.80) 88%,
      rgba(4,6,12,.94) 100%);
}

/* Fades the footage into the navy of the section below, so there is no seam. */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(9,12,26,0) 0%, rgba(9,12,26,.5) 42%, rgba(9,12,26,.88) 76%, #090c1a 100%);
}

/* ---------- Top bar ---------- */

.topbar {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: clamp(12px, 2.6vh, 26px) clamp(22px, 3.6vw, 58px);
}

.brand { display: flex; align-items: center; gap: 16px; justify-self: start; }
/* The logo art carries its own circle — never ring, crop or plate it. */
.brand img {
  width: clamp(94px, 6.6vw, 136px);
  height: clamp(94px, 6.6vw, 136px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  object-fit: contain;
}
.wordmark { display: flex; flex-direction: column; line-height: 1.12; }
.wordmark .wm-top {
  font-family: var(--sans);
  font-size: clamp(25px, 1.8vw, 37px);
  font-weight: 600;
  letter-spacing: .2px;
  color: #fff;
}
.wordmark .wm-bot {
  font-family: var(--sans);
  font-size: clamp(13px, .95vw, 19px);
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--logo-gold);
}

.nav { display: flex; align-items: center; justify-self: stretch; justify-content: space-evenly; gap: clamp(26px, 5.5vw, 92px); }
.nav a {
  font-family: var(--sans);
  font-size: clamp(16px, 1.32vw, 25px);
  font-weight: 400;
  letter-spacing: .2px;
  color: rgba(255,255,255,.88);
  padding: 10px 0;
  transition: color .18s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }

/* Soft blue glow on the logo, like the Study Now button. */
.brand img { transition: filter .3s ease; }
.brand .wordmark span { transition: text-shadow .3s ease; }
.brand:hover img, .brand:focus-visible img {
  filter: drop-shadow(0 0 8px rgba(80,112,248,.55)) drop-shadow(0 0 20px rgba(80,112,248,.3));
}
.brand:hover .wordmark span, .brand:focus-visible .wordmark span { text-shadow: 0 0 14px rgba(80,112,248,.5); }

/* Soft grey glow on the menu links. */
.nav a { transition: color .18s ease, text-shadow .25s ease; }
.nav a:hover, .nav a:focus-visible { text-shadow: 0 0 10px rgba(205,210,222,.6), 0 0 22px rgba(205,210,222,.28); }

.topbar > .signin {
  justify-self: end;
  min-width: clamp(158px, 12.2vw, 236px);
  padding: clamp(14px, 1.05vw, 21px) clamp(30px, 2.3vw, 44px);
  border-radius: 999px;
  background: var(--logo-blue);
  color: #fff;
  font-family: var(--sans);
  font-size: clamp(15px, 1.15vw, 22px);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

/* ---------- Headline block (left aligned, upper third) ---------- */

.hero-center {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: clamp(16px, 13vh, 170px) clamp(22px, 3.6vw, 58px) clamp(4px, 1.5vh, 24px);
}

.headline {
  font-family: var(--serif);
  /* Sized by width and height, so the hero fits one screen. */
  font-size: clamp(30px, min(5vw, 10vh), 96px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.5px;
  /* Widened with the type: at the old 1000px cap the bigger size broke "Before the Mark of
     the Beast" onto a third line. */
  max-width: min(100%, 1280px);
  color: #fff;
  text-shadow: 0 2px 26px rgba(0,0,0,.42);
}
/* Bronze, matching the Download button, lifted off the footage by its own glow. */
/* "The Last Elijah Message" always stays on one line. */
.headline .gold {
  white-space: nowrap;
  color: var(--bronze);
  text-shadow:
    0 0 18px rgba(226,160,52,.95),
    0 0 44px rgba(200,135,26,.72),
    0 0 92px rgba(200,135,26,.42),
    0 2px 24px rgba(0,0,0,.6);
}

.subtitle {
  margin-top: clamp(10px, 2.4vh, 24px);
  max-width: 46ch;
  font-family: var(--sans);
  font-size: clamp(16px, 1.5vw, 29px);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: .1px;
  color: rgba(255,255,255,.82);
  text-shadow: 0 2px 14px rgba(0,0,0,.5);
}

.ctas { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 16px; margin-top: clamp(14px, 3.4vh, 34px); }

.hero .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(196px, 14.6vw, 282px);
  padding: clamp(17px, 1.2vw, 24px) clamp(32px, 2.5vw, 48px);
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: clamp(16px, 1.2vw, 23px);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: none;
  transition: background .2s ease, border-color .2s ease, box-shadow .25s ease, transform .2s ease;
}
.hero .btn.primary { background: var(--logo-blue); color: #fff; }
.hero .btn.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); backdrop-filter: none; }

/* Hover keeps the brand glow. */
.hero .btn.primary:hover,
.topbar > .signin:hover {
  background: var(--logo-blue);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(80,112,248,.62), 0 10px 26px -8px rgba(80,112,248,.55);
}
.hero .btn.secondary:hover {
  background: rgba(255,255,255,.10);
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(255,255,255,.26);
}

/* ---------- Bottom topic strip ---------- */

.hero-topics {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 12px;
  padding: clamp(8px, 2vh, 22px) clamp(22px, 3.6vw, 58px) clamp(12px, 3vh, 30px);
}
.hero-topics a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  font-family: var(--sans);
  font-size: clamp(14px, 1.05vw, 21px);
  font-weight: 400;
  letter-spacing: .2px;
  color: rgba(255,255,255,.86);
  white-space: nowrap;
  transition: color .18s ease;
}
.hero-topics a svg { width: clamp(18px, 1.3vw, 26px); height: clamp(18px, 1.3vw, 26px);
  flex: 0 0 clamp(18px, 1.3vw, 26px); color: var(--logo-gold); }
.hero-topics a:hover { color: #fff; }

.hero a:focus-visible, .video-toggle:focus-visible { outline: 2px solid var(--logo-blue); outline-offset: 6px; }

.video-toggle {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 84px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(0,0,0,.3);
  color: #fff;
  font: 11px var(--sans);
  cursor: pointer;
  opacity: .55;
  transition: opacity .2s ease;
}
.video-toggle:hover { opacity: 1; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .topbar { gap: 18px; padding-inline: 22px; }
  .nav { gap: 22px; }
  .nav a { font-size: 14px; }
  .topbar > .signin { min-width: 120px; padding: 13px 22px; font-size: 14px; }
  .hero .btn { min-width: 170px; padding: 16px 24px; font-size: 15px; }
  .hero-topics a { font-size: 13px; }
  .hero-topics a svg { width: 16px; height: 16px; flex-basis: 16px; }
}

@media (max-width: 768px) {
  .hero { min-height: 560px; }

  /* Logo + Sign In on row 1; the five menus spread across row 2. */
  .topbar { grid-template-columns: 1fr auto; padding: 16px 18px; gap: 14px 12px; }
  .brand img { width: 62px; height: 62px; }
  .wordmark .wm-top { font-size: 19px; }
  .wordmark .wm-bot { font-size: 10px; letter-spacing: 2px; }
  .nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
  }
  .nav a { display: block; font-size: 13px; padding: 4px 0; }
  .topbar > .signin { grid-row: 1; grid-column: 2; min-width: 0; padding: 11px 20px; font-size: 13px; }

  .hero-center { padding: clamp(16px, 9vh, 96px) 18px clamp(6px, 2vh, 24px); }
  .headline { font-size: clamp(22px, 7.3vw, 52px); max-width: 100%; }
  .subtitle { font-size: 15px; margin-top: 18px; max-width: 100%; }

  /* Study Now and Free Books stay side by side — they shrink, they never stack. */
  .ctas { flex-wrap: nowrap; width: 100%; max-width: 460px; gap: 10px; margin-top: 26px; }
  .hero .btn { flex: 1 1 0; min-width: 0; padding: 14px 8px; font-size: 14px; }

  /* All four stay on one line — shrink, don't wrap. */
  .hero-topics { flex-wrap: nowrap; justify-content: space-between; gap: 4px; padding: 14px 12px 26px; }
  .hero-topics a { font-size: 11px; gap: 5px; padding: 6px 0; }
  .hero-topics a svg { width: 14px; height: 14px; flex-basis: 14px; }
  .video-toggle { bottom: 8px; right: 12px; }
}

@media (max-width: 380px) {
  .topbar { padding-inline: 14px; }
  .brand { gap: 9px; }
  .brand img { width: 54px; height: 54px; }
  .wordmark .wm-top { font-size: 16px; }
  .wordmark .wm-bot { font-size: 8.5px; letter-spacing: 1.5px; }
  .nav a { font-size: 11.5px; }
  .topbar > .signin { padding: 10px 15px; font-size: 12px; }
  .hero-center { padding-inline: 14px; }
  .headline { font-size: 7vw; }
  .hero .btn { font-size: 13px; padding: 13px 6px; }
  .hero-topics a { font-size: 10px; gap: 4px; }
  .hero-topics a svg { width: 12px; height: 12px; flex-basis: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero *, .hero .btn, .topbar > .signin { transition: none !important; }
}
