/*
Theme Name: BPCBC Tag Ministry
Template: frost
Version: 1.01
Text Domain: bpcbc-tag-ministry
Description: Modified Child Theme
Author: Oscar Ira
*/

@import url("../frost/style.css");

/* Begin Custom Styles */

/*
* BRAND FONTS - self-hosted Helvetica Neue (assets/fonts), registered under
* the family name "Helvetica" so it wins over whatever Helvetica a visitor's
* device may or may not have installed. theme.json's "primary" font preset
* (used site-wide via --wp--preset--font-family--primary, including by
* block/post content) already leads with this same family name, so
* registering it here is enough to re-brand the whole site - no theme.json
* edit needed. Only Light/Bold were supplied; the browser uses the closest
* of the two for any other font-weight in use (e.g. p's font-weight: 200).
*/
@font-face {
  font-family: "Helvetica";
  src: url("assets/fonts/Helvetica-Neue-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica";
  src: url("assets/fonts/Helvetica-Neue-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/*
* GLOBAL
*/
html, body, input, textarea, button, select {
  font-family: "Helvetica", "Helvetica Neue", Arial, sans-serif;
}
h1 {
  font-size: 2.5rem; /* ~40px */
  font-weight: 700;
}

h2 {
  font-size: 2rem; /* ~32px */
  font-weight: 700;
}

h3 {
  font-size: 1.75rem; /* ~28px */
  font-weight: 600;
}

h4 {
  font-size: 1.5rem; /* ~24px */
  font-weight: 600;
}

h5 {
  font-size: 1.25rem; /* ~20px */
  font-weight: 500;
}

h6 {
  font-size: 1rem; /* ~16px */
  font-weight: 500;
}

em {
  font-family: Baskerville, 'Times New Roman', serif;
  font-size: 120%;
  font-style: italic;
  font-weight: normal;
  color: inherit;
}
p {
  font-weight: 200;
}

/*
* NAVIGATION - hamburger-only toggle (always shown, not just on mobile),
* opening as a drawer that slides in from the right edge of the screen.
*/
.wp-block-navigation__responsive-container-open.always-shown {
  width: auto !important;
  height: auto !important;
  display: flex !important;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0.2em !important;
}
.wp-block-navigation__responsive-container-open.always-shown svg {
  width: 28px !important;
  height: 28px !important;
}
.wp-block-navigation__responsive-container-open.always-shown::after {
  content: "Menu";
  font-size: 1.375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wp-block-navigation__responsive-container {
  display: flex !important;
  top: 0;
  bottom: 0;
  left: auto;
  right: 0;
  width: min(85vw, 360px);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  pointer-events: none;
  z-index: 100000;
}
.wp-block-navigation__responsive-container.is-menu-open {
  transform: translateX(0);
  pointer-events: auto;
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .wp-block-navigation__responsive-container {
    transition: none;
  }
}

/*
* On the home page and any page using the "Featured Image Banner" template,
* float the header (logo + hamburger) transparently over whatever sits at the
* very top of the content - the hero Cover video/image, or the featured image
* banner - instead of pushing it down. Relies on that media being the first
* thing in the page content (home page's "No Title" template has no heading
* above it; the banner template puts the image before the title).
*/
body.home .site-header,
body.page-template-featured-banner .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: transparent;
  color: #fff;
}
/* Logo is a raster image, so recolor it via filter rather than `color`. */
body.home .site-header .wp-block-site-logo img,
body.page-template-featured-banner .site-header .wp-block-site-logo img {
  filter: brightness(0) invert(1);
}

/* Dark scrim on the home page's hero Cover video/image, overriding whatever
   "Dim" percentage is set on the Cover block itself. */
body.home .wp-block-cover .wp-block-cover__background {
  opacity: 0.15 !important;
}

/*
* Home page hero: the 5 rotating ministry-element words (Equipping, Service,
* Fellowship, Spiritual Giftedness, Shepherding), as real text - not baked
* into the video - so it sits above the dim overlay and scales responsively.
* The HTML lives in a Custom HTML block inside the Cover block; see
* assets/js/hero-captions.js for the word-cycling logic.
*/
/* WP core's .wp-block-cover__inner-container has no explicit height, so it
   only grows to fit its actual content and then gets centered within the
   700px cover - making it a small box sitting mid-height, not the full hero.
   `height:100%` doesn't fix this: percentage heights need the parent to have
   a *definite* height, and .wp-block-cover only sets min-height, which
   doesn't count. Anchoring with inset:0 instead sidesteps that limitation -
   it sizes to the parent's actual rendered box, not a resolved percentage. */
body.home .wp-block-cover .wp-block-cover__inner-container {
  position: absolute;
  inset: 0;
}
.tag-hero-caption-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.tag-hero-caption {
  display: inline-block;
  color: #ef6a40;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.3;
  padding: 0.5em 1em;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.tag-hero-caption.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .tag-hero-caption {
    transition: none;
  }
}

/* Simple Calendar event locations, linked to Google Maps by
   assets/js/calendar-location-links.js. */
.simcal-event-address-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
}
.simcal-event-address-link:hover {
  text-decoration-style: solid;
}

/*
* "Featured Image Banner" page template: full-width featured image at a fixed
* minimum height. Falls back to a default image (see functions.php) when the
* page has no featured image set.
*/
.page-featured-banner {
  position: relative;
  min-height: 700px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-featured-banner .wp-block-post-featured-image {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}
.page-featured-banner .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Dark scrim so the header (logo/menu) and the centered title stay readable
   over any featured image, regardless of how light/busy that photo is. */
.page-featured-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}
.page-featured-banner__title {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
}
.page-featured-banner__title .wp-block-post-title {
  color: #fff;
  margin: 0;
}