/* HisWingz — sermon notes site
   Palette taken from the original brand logo (#880db4) and CTA (#ffe057). */

:root {
  --purple: #880db4;
  --purple-deep: #6a0a8c;
  --purple-soft: #f4e9f9;
  --yellow: #ffe057;
  --yellow-deep: #f0c400;
  --ink: #16151a;
  --body: #45434f;
  --muted: #5f5c6b;
  --line: #e6e1ee;
  --bg: #ffffff;
  --soft: #fbf8fd;
  --radius: 22px;
  --radius-sm: 14px;
  --wrap: 1180px;
  --shadow: 0 18px 50px rgba(35, 12, 55, .10);
  --shadow-sm: 0 6px 24px rgba(35, 12, 55, .07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); font-weight: 400; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 400; }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 500; }

p { margin: 0 0 1.05em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.section { padding: 74px 0; }
.section--soft { background: var(--soft); }
.section--tight { padding-top: 46px; }
.section.section--merge { padding-top: 0; }
.section.section--intro { padding-bottom: 18px; }

.eyebrow {
  font-size: .80rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; color: var(--purple); margin: 0 0 .7em;
}
.lede { font-size: 1.19rem; color: var(--body); max-width: 62ch; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 78px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; }
.brand span { font-weight: 600; color: var(--purple); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  color: var(--ink); font-size: .95rem; font-weight: 400; text-decoration: none;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--purple); border-bottom-color: var(--purple); text-decoration: none; }
.nav a.is-external::after { content: " \2197"; font-size: .8em; color: var(--muted); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; cursor: pointer; color: var(--ink); font: inherit; font-size: .9rem;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .nav {
    position: fixed; inset: 0; z-index: 70;
    flex-direction: column; align-items: stretch; justify-content: center;
    gap: 6px; padding: 96px 30px 40px;
    background: #fff; transform: translateY(-100%);
    transition: transform .28s ease; visibility: hidden;
  }
  .nav.is-open { transform: translateY(0); visibility: visible; }
  .nav a { font-size: 1.25rem; padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; max-width: 100%;
  background: var(--yellow); color: #241d00; font-weight: 600;
  padding: 14px 30px; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { background: var(--yellow-deep); text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(240, 196, 0, .34); }
.btn--purple { background: var(--purple); color: #fff; }
.btn--purple:hover { background: var(--purple-deep); box-shadow: 0 8px 22px rgba(136, 13, 180, .28); }
.btn--ghost { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn--ghost:hover { background: var(--purple-soft); box-shadow: none; }

.link-arrow { font-weight: 600; }
.link-arrow::after { content: " \2192"; }

/* ---------- hero ---------- */
.hero { padding: 52px 0 0; }
.hero h1 { margin-bottom: .55em; }

/* Edge-to-edge hero band: the image runs the full width of the screen while its
   height is capped, so it stays a band rather than a full screenful.
   Height is set explicitly (NOT aspect-ratio + max-height, which would shrink
   the WIDTH and leave the band short of the right edge). */
.hero__frame { position: relative; width: 100%; }
.hero__media {
  width: 100%; max-width: none; margin: 0;
  /* 48.8vw keeps the band's shape close to the photo's own (it is 1186x660), so the
     picture is shown whole instead of being sliced at the figure's chest. */
  height: clamp(440px, 48.8vw, 760px);
  overflow: hidden; background: var(--purple-soft);
}
.hero__media img {
  width: 100%; height: 114%;            /* a little taller than the window so it can travel */
  object-fit: cover; object-position: 50% 50%;
  transform: translate3d(0, -12.28%, 0); /* = -0.14 x window height: still fully covering */
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .hero__media img { height: 114%; transform: translate3d(0, -7%, 0); }
}

/* The text card stays aligned to the same right edge as the page content. */
.hero__overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: flex-end;
  pointer-events: none;
}
.hero__overlay > .wrap { display: flex; justify-content: flex-end; }
.hero__card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 32px; pointer-events: auto;
  width: min(392px, 46%);
}
.hero__card p { margin-bottom: 1.15em; color: var(--body); font-size: 1.12rem; }

@media (max-width: 860px) {
  .hero__media { height: clamp(320px, 80vw, 520px); }
  .hero__overlay { position: static; display: block; pointer-events: auto; }
  .hero__overlay > .wrap { display: block; }
  /* The card used to be pulled 34px UP over the photo (margin: -34px). On a phone that put
     its first line of text level with the image, so the words read as sitting on the picture.
     Stack them with a real gap instead. */
  .hero__card { width: 100%; margin: 20px 0 0; padding: 26px 22px; }
}

/* ---------- two-column feature ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center;
}
.feature--reverse .feature__media { order: 2; }
.feature__media img { border-radius: var(--radius); width: 100%; height: auto; }
.feature__body { align-self: center; }
@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .feature--reverse .feature__media { order: 0; }
}

/* ---------- section head ---------- */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 34px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); }

/* ---------- note cards ---------- */
.grid { display: grid; gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); } }

.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 4 / 3; background: var(--purple-soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card__meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; margin-bottom: 10px;
}
.card__tag {
  background: var(--purple-soft); color: var(--purple-deep);
  padding: 4px 11px; border-radius: 999px; font-size: .74rem; font-weight: 600;
  letter-spacing: .06em;
}
.card h3 { margin: 0 0 10px; font-size: 1.16rem; line-height: 1.28; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--purple); text-decoration: none; }
.card__excerpt { color: var(--muted); font-size: 1.07rem; margin: 0 0 18px; }
.card__foot { margin-top: auto; font-weight: 600; font-size: .93rem; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip {
  font: inherit; font-size: .88rem; font-weight: 500;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  padding: 9px 17px; border-radius: 999px; cursor: pointer;
}
.chip:hover { border-color: var(--purple); color: var(--purple); }
.chip[aria-pressed="true"] { background: var(--purple); color: #fff; border-color: var(--purple); }

.searchbar { margin-bottom: 26px; }
.searchbar input {
  font: inherit; font-size: 1rem; width: 100%; max-width: 430px;
  padding: 13px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.searchbar input:focus { outline: 2px solid var(--purple); outline-offset: 1px; border-color: var(--purple); }
.empty-note { color: var(--muted); font-style: italic; }

/* ---------- videos ---------- */
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
@media (max-width: 820px) { .video-grid { grid-template-columns: minmax(0, 1fr); } }
.video { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.video__frame { aspect-ratio: 16 / 9; background: #000; width: 100%; }
.video__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video__body { padding: 20px 22px 24px; }
.video__body h3 { margin: 0 0 6px; font-size: 1.08rem; }
.video__body p { margin: 0; color: var(--muted); font-size: 1.02rem; }

/* ---------- instagram ---------- */
.ig {
  display: grid; grid-template-columns: minmax(0, 1fr) 430px;
  gap: 46px; align-items: start;
}
.ig__copy, .ig__panel { min-width: 0; }
.ig__copy { max-width: 52ch; }
@media (max-width: 900px) {
  .ig { grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: start; }
  .ig__copy { order: 2; }
  .ig .ig__panel { order: 1; }
}
.ig__frame {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
/* Instagram's profile embed will not lay out narrower than ~420px: give it that width and
   the grid is complete, give it less and the third column is sliced off mid-image (very
   visible on a 320/360/390 phone). So the iframe keeps a fixed 430px layout width and
   site.js scales it down to whatever the column offers, setting the box's height to match.
   `scrolling="yes"` is also wrong here — the scrollbar narrows the layout and clips a row. */
.ig__frame iframe {
  width: 430px; height: 472px; border: 0; display: block; background: #fff;
  transform-origin: top left;
}
.ig__note { font-size: .98rem; color: var(--muted); margin: 26px 0 0; max-width: 46ch; }

/* ---------- gallery ---------- */
.gallery {
  columns: 3; column-gap: 18px;
}
@media (max-width: 860px) { .gallery { columns: 2; } }
@media (max-width: 540px) { .gallery { columns: 1; } }
.gallery a { display: block; margin: 0 0 18px; border-radius: var(--radius-sm); overflow: hidden; break-inside: avoid; }
.gallery img { width: 100%; height: auto; border-radius: var(--radius-sm); transition: transform .3s ease; }
.gallery a:hover img { transform: scale(1.03); }

/* ---------- article ---------- */
.article { max-width: 780px; }
.article__head { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 34px; }
.article__head h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: .35em; }
.article__meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .93rem; }
.article__body { line-height: 1.55; }
.article__body p { margin: 0 0 .45em; }
.article__body h2 { font-size: 1.42rem; margin: 1.4em 0 .45em; }
.article__body ul { margin: 0 0 .7em; padding-left: 1.25em; }
.article__body li { margin-bottom: .3em; }
.article__body blockquote {
  margin: 1.1em 0; padding: 4px 0 4px 22px;
  border-left: 4px solid var(--purple); color: var(--ink); font-style: italic;
}
.article__body img {
  width: 100%; height: auto; border-radius: var(--radius-sm);
  margin: 1.1em 0; box-shadow: var(--shadow-sm);
}
.article__foot { margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line); }

/* ---------- footer ---------- */
.site-footer { background: #16151a; color: #cfc9d8; padding: 58px 0 34px; margin-top: 20px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; } }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid #322f3a; margin-top: 42px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .88rem; color: #a49db3;
}

/* ---------- preview notice ---------- */
.preview-bar {
  background: var(--purple); color: #fff; text-align: center;
  font-size: .88rem; padding: 9px 18px; font-weight: 500;
}
.preview-bar strong { color: var(--yellow); }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: #fff; color: var(--purple);
  padding: 10px 16px; z-index: 200; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

@media (max-width: 620px) {
  .section { padding: 54px 0; }
  .section.section--merge { padding-top: 0; }
  .section.section--intro { padding-bottom: 18px; }
  .hero__card { margin-inline: 0; }
  .btn { padding: 13px 22px; white-space: normal; }
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(20, 12, 28, .93);
  display: flex; align-items: center; justify-content: center; padding: 4vw;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 88vh; width: auto; border-radius: 14px; }
.lightbox__close {
  position: absolute; top: 18px; right: 22px;
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; color: #16151a; border: 0; cursor: pointer;
  font-size: 1.9rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.lightbox__close:hover { background: var(--yellow); }

/* ---------- footer wordmark ---------- */
.wordmark {
  color: #fff; font-weight: 600; letter-spacing: .10em;
  line-height: .98; font-size: 1.62rem; text-transform: uppercase;
  margin-bottom: 16px;
}
.wordmark span { display: block; }
.site-footer h4 { color: #b9a7cc; }

/* ---------- video page banner (inset, unlike the edge-to-edge home hero) ---------- */
.page-banner {
  width: 100%; height: clamp(260px, 38vh, 460px);
  border-radius: var(--radius); overflow: hidden; background: var(--purple-soft);
}
.page-banner img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- music / Spotify ---------- */
.music {
  display: grid; grid-template-columns: minmax(0, 1fr) 420px;
  gap: 46px; align-items: start;
}
.music__player, .music__releases { min-width: 0; }
.music__player iframe {
  width: 100%; border: 0; border-radius: 12px; display: block; background: #fff;
}
.music__releases h3 { margin: 0 0 16px; }
.releases { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.releases a {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 500; text-decoration: none;
}
.releases a:hover { border-color: var(--purple); color: var(--purple); text-decoration: none; }
.releases img { width: 54px; height: 54px; border-radius: 8px; flex: 0 0 auto; }
@media (max-width: 900px) {
  .music { grid-template-columns: minmax(0, 1fr); gap: 26px; }
}

/* ---------- newest sermon spotlight ---------- */
.spot {
  display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  align-items: stretch; overflow: hidden;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.spot__media { position: relative; display: block; min-height: 320px; background: var(--soft); }
.spot__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spot__body {
  padding: 40px 44px; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
}
.spot__meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; font-size: .95rem; color: var(--muted);
}
.spot__body .lede { margin: 0 0 24px; }
.spot__body p:last-of-type { margin-bottom: 0; }
.spot__note { margin: 20px 0 0; font-size: .95rem; color: var(--muted); }
@media (max-width: 900px) {
  .spot { grid-template-columns: minmax(0, 1fr); }
  .spot__media { min-height: 230px; }
  .spot__body { padding: 26px 24px 30px; }
}

/* ---------- latest BibleMotionAI video (inside the spotlight section) ----------
   Instagram renders a reel in a fixed portrait player of its own choosing, so the
   Instagram card gets a column matching that player's real measured size (a 440px
   column with a 620px box). A YouTube or self-hosted video is widescreen instead.
   Sizing the box to the embed avoids the page showing a half-empty card. */
.spot-video {
  display: grid; align-items: start; overflow: hidden; margin-top: 26px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.spot-video--wide { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.spot-video--tall { grid-template-columns: 440px minmax(0, 1fr); }
/* width comes from the column, height from the aspect ratio — never the other way round */
.spot-video__frame { position: relative; width: 100%; min-width: 0; background: #101014; }
.spot-video__frame--wide { aspect-ratio: 16 / 9; }
.spot-video__frame--tall { height: 505px; }
.spot-video__frame iframe,
.spot-video__frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; object-fit: contain; }
.spot-video__body { align-self: stretch; padding: 34px 38px; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.spot-video__body h3 { margin: 0 0 10px; }
.spot-video__meta { margin: 0 0 12px; font-size: .95rem; color: var(--muted); }
.spot-video__body .muted { margin: 0 0 18px; font-size: .95rem; }
.spot-video__body p:last-child { margin-bottom: 0; }
@media (max-width: 900px) {
  .spot-video--wide,
  .spot-video--tall { grid-template-columns: minmax(0, 1fr); }
  .spot-video__frame--tall { height: 520px; }
  .spot-video__body { padding: 24px 24px 28px; }
}

/* a linked still used in place of Instagram's own player */
.spot-video__play { position: absolute; inset: 0; display: block; }
.spot-video__play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-video__btn {
  position: absolute; left: 50%; top: 50%; width: 74px; height: 74px;
  margin: -37px 0 0 -37px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); box-shadow: 0 6px 24px rgba(0, 0, 0, .28);
  transition: transform .18s ease;
}
.spot-video__btn::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  margin: -13px 0 0 -7px; border-style: solid;
  border-width: 13px 0 13px 20px; border-color: transparent transparent transparent var(--purple);
}
.spot-video__play:hover .spot-video__btn { transform: scale(1.07); }

/* ---------- film pop-up (portrait, matches Instagram's player) ---------- */
.film-modal {
  position: fixed; inset: 0; z-index: 90; padding: 24px;
  background: rgba(12, 8, 18, .78);
  display: grid; place-items: center;
}
.film-modal__box {
  position: relative; width: min(420px, 100%); height: min(660px, 84vh);
  background: #000; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}
.film-modal__box iframe { width: 100%; height: 100%; border: 0; display: block; }
/* kept clear of the player: Instagram's own bar sits in the top-right of its embed */
.film-modal__close {
  position: absolute; top: 16px; right: 20px; z-index: 2;
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .94); color: var(--ink);
  font-size: 26px; line-height: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
@media (max-width: 620px) { .film-modal__close { top: 10px; right: 12px; } }

/* release list: date under each title, newest first */
.releases span em { display: block; font-style: normal; font-size: .85em; font-weight: 400; opacity: .72; }
