/* ═══════════════════════════════════════════════════════════════════════════
   ANCHOR & BLOOM — TAB IMAGE HEROES + ANCHOR ICON
   Senior-design editorial header images for the 5 primary tabs.
   Loaded AFTER css/app.css so it can override existing chrome where needed.

   Tabs: Pulse · Home · Family · Wellness · Life
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Base tab hero ─────────────────────────────────────────────────────── */
.ab-tab-hero {
  position: relative;
  width: 100%;
  height: 230px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--ab-cream-dk, #F2EDE4);
  isolation: isolate;
}

@media (min-width: 720px) {
  .ab-tab-hero { height: 300px; }
}

.ab-tab-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 1;
  /* Critical width/height set on element for layout stability */
}

/* Editorial overlay — keeps text legible without crushing the photo */
.ab-tab-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    0deg,
    rgba(20, 16, 12, 0.45) 0%,
    rgba(20, 16, 12, 0.18) 35%,
    rgba(20, 16, 12, 0.00) 70%
  );
}

/* Content slot — Playfair title + Jost subtitle, bottom-left aligned */
.ab-tab-hero__content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 20px 22px 22px;
  pointer-events: none;
}

@media (min-width: 720px) {
  .ab-tab-hero__content { padding: 28px 36px 30px; }
}

.ab-tab-hero__eyebrow {
  font-family: var(--font-ui, 'Jost', sans-serif);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(253, 250, 244, 0.85);
  margin: 0 0 6px;
  pointer-events: auto;
}

.ab-tab-hero__title {
  font-family: 'Playfair Display', var(--font-display, serif);
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #FDFAF4;
  margin: 0 0 6px;
  text-shadow: 0 2px 18px rgba(20, 16, 12, 0.32);
  pointer-events: auto;
  max-width: min(560px, 92%);
}

@media (min-width: 720px) {
  .ab-tab-hero__title { font-size: 40px; }
}

.ab-tab-hero__sub {
  font-family: var(--font-ui, 'Jost', sans-serif);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0.005em;
  color: rgba(253, 250, 244, 0.92);
  margin: 0;
  text-shadow: 0 1px 12px rgba(20, 16, 12, 0.4);
  pointer-events: auto;
  max-width: min(540px, 94%);
}

@media (min-width: 720px) {
  .ab-tab-hero__sub { font-size: 15px; }
}

/* prefers-reduced-motion: keep entirely still */
@media (prefers-reduced-motion: reduce) {
  .ab-tab-hero,
  .ab-tab-hero__img {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* ── Tab-specific tint nudges (subtle, editorial) ─────────────────────── */
.ab-tab-hero--pulse .ab-tab-hero__overlay {
  background: linear-gradient(
    0deg,
    rgba(20, 16, 12, 0.52) 0%,
    rgba(20, 16, 12, 0.18) 40%,
    rgba(20, 16, 12, 0.00) 75%
  );
}
.ab-tab-hero--house .ab-tab-hero__overlay {
  background: linear-gradient(
    0deg,
    rgba(20, 14, 8, 0.50) 0%,
    rgba(20, 14, 8, 0.16) 38%,
    rgba(20, 14, 8, 0.00) 72%
  );
}
.ab-tab-hero--people .ab-tab-hero__overlay {
  background: linear-gradient(
    0deg,
    rgba(20, 14, 12, 0.50) 0%,
    rgba(20, 14, 12, 0.18) 40%,
    rgba(20, 14, 12, 0.00) 72%
  );
}
.ab-tab-hero--wellbeing .ab-tab-hero__overlay {
  background: linear-gradient(
    0deg,
    rgba(18, 22, 18, 0.48) 0%,
    rgba(18, 22, 18, 0.16) 38%,
    rgba(18, 22, 18, 0.00) 72%
  );
}
.ab-tab-hero--life .ab-tab-hero__overlay {
  background: linear-gradient(
    0deg,
    rgba(20, 16, 10, 0.52) 0%,
    rgba(20, 16, 10, 0.18) 40%,
    rgba(20, 16, 10, 0.00) 75%
  );
}

/* ── Pulse-specific layering ───────────────────────────────────────────
   The Pulse hero sits ABOVE the existing wordmark / hero-wrap. We give
   the existing hero-wrap a small negative margin so it nests visually
   under the new image header without leaving a gap. */
#sc-home > .ab-tab-hero--pulse {
  margin-bottom: 0;
}
#sc-home > .ab-tab-hero--pulse + .ab-home-root,
#sc-home > .ab-tab-hero--pulse + .ab-home-hero-wrap {
  margin-top: -12px;
}

/* When Pulse hero is present, the existing inner hero blob can feel
   redundant — tone it down lightly without removing anything. */
#sc-home > .ab-tab-hero--pulse ~ * .ab-home-hero-visual--bloom {
  /* leave alone — masthead pill still lives here */
}

/* ── Life: hero sits in place of the old aurora mast.
   When the new image hero is present, hide the old .ab-life-mast aurora
   block to avoid two stacked title regions. The image hero absorbs the
   Playfair title text. */
#sc-life > .ab-tab-hero--life + .ab-life-root .ab-life-mast,
#sc-life > .ab-life-root > .ab-tab-hero--life + .ab-life-mast,
.ab-life-root.ab-life-root--has-hero .ab-life-mast {
  display: none !important;
}

/* ── Wellness: the image hero sits above the existing .ab-well-hdr.
   Keep the existing rhythms band visible — DO NOT hide anything. */

/* ───────────────────────────────────────────────────────────────────────
   ANCHOR ICON — Pulse masthead pill
   Replaces the literal "Anchor Line" text with a stroked nautical anchor.
   Same handler, same href, same data flow — only presentation changes.
   ─────────────────────────────────────────────────────────────────────── */

/* Hide any descendant text-label inside the anchor-line link on Pulse;
   the icon now carries the meaning. aria-label preserves screen-reader text. */
#sc-home .ab-home-hero-visual button.ab-anchorline-link.ab-anchorline-link--icon .ab-home-hero-anchor-line__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Re-shape the masthead pill into an icon button with 44×44 tap target */
#sc-home .ab-home-hero-visual button.ab-anchorline-link.ab-anchorline-link--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(20, 16, 12, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--lux-gold, #ae8f48);
  -webkit-tap-highlight-color: transparent;
  transition: transform 180ms ease, background-color 200ms ease, color 200ms ease;
}

#sc-home .ab-home-hero-visual button.ab-anchorline-link.ab-anchorline-link--icon .ab-anchorline-icon {
  width: 28px;
  height: 28px;
  display: block;
  color: inherit;
  pointer-events: none;
}

#sc-home .ab-home-hero-visual button.ab-anchorline-link.ab-anchorline-link--icon:hover {
  background: rgba(20, 16, 12, 0.32);
  color: #f1d893;
  transform: scale(1.04);
  text-decoration: none;
}

#sc-home .ab-home-hero-visual button.ab-anchorline-link.ab-anchorline-link--icon:active {
  transform: scale(0.96);
}

#sc-home .ab-home-hero-visual button.ab-anchorline-link.ab-anchorline-link--icon:focus-visible {
  outline: 2px solid var(--lux-gold, #ae8f48);
  outline-offset: 3px;
  background: rgba(20, 16, 12, 0.32);
}

#sc-home .ab-home-hero-visual button.ab-anchorline-link.ab-anchorline-link--icon:hover .ab-home-hero-anchor-line__label,
#sc-home .ab-home-hero-visual button.ab-anchorline-link.ab-anchorline-link--icon:focus-visible .ab-home-hero-anchor-line__label {
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  #sc-home .ab-home-hero-visual button.ab-anchorline-link.ab-anchorline-link--icon,
  #sc-home .ab-home-hero-visual button.ab-anchorline-link.ab-anchorline-link--icon:hover,
  #sc-home .ab-home-hero-visual button.ab-anchorline-link.ab-anchorline-link--icon:active {
    transform: none;
    transition: none;
  }
}

/* ── Universal focus ring on tab-hero interactive content (none today,
   but reserves the contract for any future CTA inside the hero). */
.ab-tab-hero a:focus-visible,
.ab-tab-hero button:focus-visible {
  outline: 2px solid var(--lux-gold, #ae8f48);
  outline-offset: 3px;
}
