/*
 * Cosmos Page Hero (acf/page-hero)  -  self-contained styles.
 *
 * This is the Cosmos STANDARD hero, matched 1:1 to the Bulletin page hero
 * (style.css .cc-bul-hero family): maroon #7b1113 gradient, gold rule lines
 * flanking the CC cipher, gold letterspaced eyebrow, centered white serif
 * title, italic subtitle. Tokens are declared on .cc-page-hero itself (NOT on
 * a page wrapper) so the block carries its design anywhere, including pages
 * built with Kadence blocks. Enqueued by inc/page-hero.php only where the
 * block is present (frontend + editor).
 *
 * Every text element sets text-align:center explicitly (and the markup adds
 * has-text-align-center) because theme/global-styles heading rules otherwise
 * left-align the title inside the alignfull block.
 */

.cc-page-hero {
  --pch-maroon: #7b1113;
  --pch-maroon-dark: #5a0c0e;
  --pch-gold: #d7b46a;

  position: relative;
  overflow: hidden;
  padding: 64px 24px 56px;
  margin: 0;
  color: #ffffff;
  text-align: center;
  background: var(--pch-maroon);
  background:
    radial-gradient(circle at 14% 32%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(135deg, var(--pch-maroon) 0%, var(--pch-maroon-dark) 100%);
  box-shadow: 0 16px 34px rgba(60, 32, 18, 0.14);
  animation: pch-fadeDown 0.7s ease both;
}

/* The block uses align:full; keep the inner content max-readable. */
.cc-page-hero > * {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.cc-page-hero .pch-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 0 auto 18px;
  color: var(--pch-gold);
  max-width: 520px;
}
/* Gold rule lines flanking the cipher, 2px with a bright mid-gold midstop so
   they stay visible on the maroon gradient (same recipe as the Bulletin).
   Opacity-only pulse (a scaleX transform was visually shrinking the lines). */
.cc-page-hero .pch-ornament::before,
.cc-page-hero .pch-ornament::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 180, 106, 0.65) 35%, var(--pch-gold));
  animation: pch-lineLinger 3s ease-in-out infinite;
}
.cc-page-hero .pch-ornament::after {
  background: linear-gradient(90deg, var(--pch-gold), rgba(215, 180, 106, 0.65) 65%, transparent);
}
.cc-page-hero .pch-ornament img {
  width: 64px;
  height: 71px;
  object-fit: contain;
  display: block;
  flex: none;
  margin: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

/* Gold letterspaced eyebrow, identical to .cc-bul-hero-eyebrow. */
.cc-page-hero .pch-eyebrow {
  color: var(--pch-gold);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  margin: 0 auto 6px;
}

/* Title, identical to .cc-bul-hero-title. */
.cc-page-hero .pch-title {
  font-family: 'Sorts Mill Goudy', Georgia, serif;
  font-weight: 500;
  color: #ffffff;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.15;
  text-align: center;
  margin: 0 auto 12px;
}

/* Visually hidden heading (Bulletin-style hero where the gold eyebrow is the
   visible title). Own clip pattern so the block does not depend on the theme
   shipping .screen-reader-text. */
.cc-page-hero .pch-title.pch-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* Subtitle, identical to .cc-bul-hero-sub. */
.cc-page-hero .pch-subtitle {
  color: #ffffff;
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

@keyframes pch-fadeDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pch-lineLinger {
  0%, 100% { opacity: 0.75; }
  50%      { opacity: 1; }
}

@media (max-width: 560px) {
  .cc-page-hero {
    padding: 48px 18px 44px;
  }
  .cc-page-hero .pch-title {
    font-size: clamp(30px, 8vw, 42px);
  }
  .cc-page-hero .pch-ornament {
    max-width: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-page-hero,
  .cc-page-hero .pch-ornament::before,
  .cc-page-hero .pch-ornament::after {
    animation: none !important;
  }
}
