/* ════════════════════════════════════════════════════════════════
   BLUE EMBER — rotating home hero
   Markup + images are generated by website_tools/hero (build-hero.mjs).
   Loads after styles.css and reuses its tokens, .eyebrow and .btn classes.
   Layout: photo on top (phones, tablets), text left / photo right (≥900px),
   so faces and hands never sit under the headline.
   ════════════════════════════════════════════════════════════════ */

.be-hero {
  /* kit token names → the site's real tokens */
  --color-deep:     var(--be-ink);
  --color-cream:    var(--be-paper);
  --color-ember:    var(--be-ember);
  --color-ember-lit: var(--be-ember-lit);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--color-deep);
  color: var(--be-paper-lit);
}

/* ── Photo ─────────────────────────────────────────── */
.be-hero__media {
  position: relative;
  height: min(125vw, 62svh);              /* phones: 4:5 box, capped so copy peeks above the fold */
  background: var(--color-deep);
  --pos: var(--pos-m, 50% 50%);
}
.be-hero__media picture { display: block; width: 100%; height: 100%; }
.be-hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--pos);
  filter: saturate(0.92) contrast(0.96);
}
/* Soft fade into the deep background where photo meets copy */
.be-hero__media::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14,42,54,0) 62%, var(--color-deep) 100%);
}

/* ── Copy ──────────────────────────────────────────── */
.be-hero__copy {
  padding: 0.5rem var(--gutter) clamp(2.5rem, 8vw, 3.5rem);
  max-width: 640px;
}
/* Tighter than the site's .eyebrow so "Reiki · Breathwork · Richmond, VA" stays on one line
   (the text needs ~300px; the column can be as narrow as ~280px on small phones / ~335px at 900px) */
.be-hero__eyebrow { color: var(--color-ember-lit); letter-spacing: 0.12em; gap: 0.5rem; }
.be-hero__eyebrow::before { width: 1.25rem; }
@media (max-width: 380px) {
  .be-hero__eyebrow { font-size: 0.7rem; letter-spacing: 0.1em; }
  .be-hero__eyebrow::before { width: 1rem; }
}
.be-hero h1 {
  font-size: clamp(2.3rem, 9vw, 3.4rem);
  line-height: 1.08;
  font-weight: 300;
  color: var(--be-paper-lit);
  margin-bottom: 1.1rem;
  text-wrap: balance;
}
.be-hero h1 em { font-style: italic; color: var(--color-ember-lit); font-weight: 400; }
.be-hero__sub {
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(251,247,240,0.85);
  margin-bottom: 2rem;
  max-width: 520px;
}
.be-hero__ctas { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; margin-bottom: 2rem; }
.be-hero__ctas .btn { width: 100%; }
.be-hero__meta { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; font-size: 0.85rem; color: rgba(251,247,240,0.7); }
.be-hero__meta-item { display: inline-flex; align-items: center; gap: 0.5rem; }
.be-hero__meta-item svg { width: 16px; height: 16px; opacity: 0.9; }

/* ── Tablets, portrait (600–899px): 4:3 box ────────── */
@media (min-width: 600px) {
  .be-hero__media { height: min(75vw, 62svh); --pos: var(--pos-t, 50% 50%); }
  .be-hero__copy { padding-inline: var(--gutter); }
  .be-hero__ctas .btn { width: auto; }
  .be-hero h1 { font-size: clamp(2.6rem, 6vw, 3.4rem); }
  .be-hero__sub { font-size: var(--t-base); }
}

/* ── Side by side (≥900px): copy left, photo right ─── */
@media (min-width: 900px) {
  .be-hero {
    display: grid;
    grid-template-columns: 45% 55%;
    align-items: stretch;
    min-height: clamp(560px, calc(100svh - var(--header-h, 120px)), 780px);
  }
  .be-hero__copy {
    grid-column: 1; grid-row: 1;
    align-self: center;
    max-width: none;
    /* line the copy up with the site's .container edge */
    padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
    padding-right: clamp(1.5rem, 3vw, 3rem);
    padding-block: clamp(2.5rem, 6vh, 4.5rem);
  }
  .be-hero__media { grid-column: 2; grid-row: 1; height: auto; --pos: var(--pos-t, 50% 50%); }
  .be-hero__media::after {
    background: linear-gradient(90deg, var(--color-deep) 0%, rgba(14,42,54,0) 14%);
  }
  .be-hero h1 { font-size: clamp(2.3rem, 1rem + 2.4vw, 3.6rem); margin-bottom: 1.25rem; }
  .be-hero__sub { font-size: var(--t-base); margin-bottom: 2rem; }
  .be-hero__ctas { margin-bottom: 2rem; }
  .be-hero__meta { gap: 0.75rem 1.5rem; font-size: var(--t-sm); }
}

/* ── Wide screens (≥1800px): 16:9 crop, larger type ── */
@media (min-width: 1800px) {
  .be-hero__media { --pos: var(--pos-d, 50% 50%); }
  .be-hero h1 { font-size: clamp(3.6rem, 2.2rem + 1.4vw, 4.4rem); }
}

/* ════════════════════════════════════════════════════════════════
   Overlay variant — the original full-bleed photo with copy over the left.
   Switched on by the head/body scripts (adds .be-hero--overlay) for sets
   with "layout": "overlay" in hero.config.json.
   ════════════════════════════════════════════════════════════════ */
.be-hero.be-hero--overlay {
  display: flex;
  align-items: center;
  min-height: clamp(560px, 80vh, 740px);
}
.be-hero--overlay .be-hero__media {
  position: absolute; inset: 0; z-index: -2;
  height: auto;
  --pos: var(--pos-m, 50% 50%);
}
.be-hero--overlay .be-hero__media::after {
  /* heavier toward the bottom than the old hero so the meta row stays legible over the pale blanket */
  background: linear-gradient(180deg, rgba(14,42,54,0.65) 0%, rgba(14,42,54,0.7) 50%, rgba(14,42,54,0.9) 100%);
}
.be-hero--overlay .be-hero__copy {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(4.5rem, 10vh, 7rem) var(--gutter);
}
.be-hero--overlay .be-hero__copy > * { max-width: 620px; }
.be-hero--overlay .be-hero__sub { max-width: 520px; }
.be-hero--overlay .be-hero__ctas .btn { width: 100%; }

@media (min-width: 720px) {
  .be-hero.be-hero--overlay { min-height: clamp(620px, 92vh, 920px); }
  .be-hero--overlay .be-hero__media::after {
    background:
      linear-gradient(95deg, rgba(14,42,54,0.92) 0%, rgba(14,42,54,0.72) 38%, rgba(14,42,54,0.18) 62%, rgba(14,42,54,0.02) 100%),
      linear-gradient(180deg, rgba(14,42,54,0.30) 0%, rgba(14,42,54,0) 30%, rgba(14,42,54,0.40) 100%);
  }
  .be-hero--overlay .be-hero__copy { padding: clamp(7rem, 14vh, 11rem) var(--gutter); }
  .be-hero.be-hero--overlay h1 { font-size: var(--t-hero); line-height: 1.1; margin-bottom: 1.5rem; }
  .be-hero--overlay .be-hero__sub { font-size: var(--t-lg); margin-bottom: 2.5rem; }
  .be-hero--overlay .be-hero__ctas { margin-bottom: 2.5rem; gap: 0.75rem 1rem; }
  .be-hero--overlay .be-hero__ctas .btn { width: auto; }
  .be-hero--overlay .be-hero__meta { gap: 1.25rem 2rem; font-size: var(--t-sm); }
}
