/* ═══════════════════════════════════════════════════════════════════
   Harmony Helpers — hub pages (Anchor & Bloom, Family Systems,
   Books & Stories, Custom Apps, Retreats & Goods) and the home page's
   problem-first cards.

   No new design tokens: every value below reuses the variables and the
   type scale declared in /css/styles.css. Load this AFTER styles.css.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Photo hero ─────────────────────────────────────────────────── */

.hh-hub-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(3rem, 9vw, 6rem) var(--space);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hh-hub-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hh-hub-hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hh-hub-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
      100deg,
      rgba(247, 243, 235, 0.72) 0%,
      rgba(247, 243, 235, 0.52) 40%,
      rgba(247, 243, 235, 0.2) 72%,
      rgba(247, 243, 235, 0.1) 100%
    ),
    linear-gradient(180deg, rgba(42, 39, 36, 0.04), rgba(42, 39, 36, 0.1));
}

.hh-hub-hero__inner {
  max-width: var(--max);
  margin: 0 auto;
}

/* The copy carries its own surface. Nothing here is legible-by-gradient. */
.hh-hub-hero__copy {
  max-width: 38rem;
  padding: clamp(1.5rem, 3.5vw, 2.25rem) clamp(1.35rem, 3vw, 2.1rem);
  background: rgba(250, 247, 240, 0.97);
  border: 1px solid rgba(184, 149, 79, 0.3);
  border-left: 3px solid var(--lux-gold-line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(42, 39, 36, 0.16);
}

@supports (backdrop-filter: blur(6px)) {
  .hh-hub-hero__copy {
    background: rgba(250, 247, 240, 0.93);
    backdrop-filter: blur(8px) saturate(1.05);
  }
}

.hh-hub-hero h1 {
  margin-bottom: 0.5em;
}

.hh-hub-hero__lede {
  font-size: clamp(1.02rem, 1.7vw, 1.16rem);
  max-width: 34rem;
}

.hh-hub-hero__note {
  margin: 1.1rem 0 0;
  font-size: 0.88rem;
}

.hh-hub-hero__copy > :last-child {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  /* Narrow screens: show the photograph above the copy instead of behind it. */
  .hh-hub-hero {
    padding: 0 0 clamp(2rem, 7vw, 2.75rem);
    display: flex;
    flex-direction: column;
  }

  .hh-hub-hero__media {
    position: relative;
    inset: auto;
    order: -1;
    height: clamp(11rem, 44vw, 16rem);
  }

  .hh-hub-hero__photo {
    object-position: 50% 30%;
  }

  .hh-hub-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(42, 39, 36, 0.06) 0%, rgba(247, 243, 235, 0.55) 100%);
  }

  .hh-hub-hero__inner {
    padding: 0 var(--space);
    margin-top: -2.5rem;
    position: relative;
    z-index: 2;
  }

  .hh-hub-hero__copy {
    max-width: none;
    background: var(--lux-white);
  }
}

/* ── Editorial photo row (photo + problem + CTA) ────────────────── */

.hh-hub-row {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(1.35rem, 3.5vw, 2.75rem);
  align-items: center;
}

.hh-hub-row + .hh-hub-row {
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  padding-top: clamp(2.25rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}

.hh-hub-row--reverse .hh-hub-row__media {
  order: 2;
}

.hh-hub-row__media {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(184, 149, 79, 0.24);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(145deg, rgba(184, 149, 79, 0.1), rgba(235, 228, 212, 0.65));
}

.hh-hub-row__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hh-hub-row__body > :last-child {
  margin-bottom: 0;
}

.hh-hub-row__title {
  margin-bottom: 0.4em;
}

.hh-hub-row__problem {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.02rem, 1.8vw, 1.14rem);
  font-style: italic;
  color: var(--lux-charcoal);
  margin-bottom: 0.7rem;
}

.hh-hub-row__where {
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lux-gold-ink);
  margin: 1.1rem 0 0;
}

@media (max-width: 860px) {
  .hh-hub-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .hh-hub-row--reverse .hh-hub-row__media {
    order: 0;
  }
}

/* ── Problem-first cards (home page + hubs) ─────────────────────── */

.hh-problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: clamp(1rem, 2.4vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hh-problem-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 100%;
  background: var(--white);
  border: 1px solid rgba(184, 149, 79, 0.24);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 2.6vw, 1.6rem);
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hh-problem-card:hover,
.hh-problem-card:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hh-problem-card__label {
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lux-gold-ink);
}

.hh-problem-card__problem {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.32;
  color: var(--text);
  margin: 0;
}

.hh-problem-card__text {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: rgba(61, 56, 51, 0.82);
}

.hh-problem-card__answer {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(61, 56, 51, 0.88);
}

.hh-problem-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.hh-problem-card__aside {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(61, 56, 51, 0.7);
}

/* ── Section intro shared by the hubs ───────────────────────────── */

.hh-hub-intro {
  max-width: 48rem;
  margin-bottom: clamp(1.5rem, 3.5vw, 2.25rem);
}

.hh-hub-intro > :last-child {
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   Anchor & Bloom page
   ═══════════════════════════════════════════════════════════════════ */

/* Lane cards — the Today / Life / Wellbeing / People editorial lanes,
   reconciled with the main site's cream + gold language. */

body[data-page="anchor-bloom"] .ab-lane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: clamp(0.9rem, 2.2vw, 1.35rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

body[data-page="anchor-bloom"] .ab-lane-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  padding: clamp(1.15rem, 2.5vw, 1.5rem);
  padding-left: clamp(1.3rem, 2.8vw, 1.7rem);
  background: var(--white);
  border: 1px solid rgba(184, 149, 79, 0.24);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

body[data-page="anchor-bloom"] .ab-lane-card::before {
  content: "";
  position: absolute;
  inset: 0.9rem auto 0.9rem 0;
  width: 2px;
  border-radius: 2px;
  background: var(--lux-gold-line);
  opacity: 0.35;
  transition: opacity 220ms ease;
}

body[data-page="anchor-bloom"] .ab-lane-card:hover,
body[data-page="anchor-bloom"] .ab-lane-card:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

body[data-page="anchor-bloom"] .ab-lane-card:hover::before,
body[data-page="anchor-bloom"] .ab-lane-card:focus-within::before {
  opacity: 1;
}

body[data-page="anchor-bloom"] .ab-lane-card__title {
  margin: 0;
  font-size: 1.16rem;
}

body[data-page="anchor-bloom"] .ab-lane-card__copy {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: rgba(61, 56, 51, 0.82);
}

/* Editorial display line — the luxury page's "Tend what fills the week" beat */
body[data-page="anchor-bloom"] .ab-display-line {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  max-width: 34rem;
  margin: 0;
}

body[data-page="anchor-bloom"] .ab-display-line__break {
  display: block;
  color: rgba(61, 56, 51, 0.78);
}

body[data-page="anchor-bloom"] .ab-rhythm-tag {
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lux-gold-ink);
  margin: 0 0 0.65rem;
}

body[data-page="anchor-bloom"] .ab-note-surface {
  background: var(--white);
  border: 1px solid rgba(184, 149, 79, 0.24);
  border-left: 3px solid var(--lux-gold-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.2rem, 3vw, 1.75rem);
  max-width: 42rem;
}

body[data-page="anchor-bloom"] .ab-note-surface > :last-child {
  margin-bottom: 0;
}

/* Video clip grid — same interaction as the home page's "Watch short clips",
   restyled against this page's tokens rather than the home-only selectors. */

body[data-page="anchor-bloom"] .ab-clips-toggle-wrap {
  justify-content: center;
}

body[data-page="anchor-bloom"] .aab-feature-grid-wrap:not(.is-expanded) {
  display: none;
}

body[data-page="anchor-bloom"] .aab-feature-grid-wrap.is-expanded {
  margin-top: 1.1rem;
}

body[data-page="anchor-bloom"] .ab-clips-intro {
  text-align: center;
  margin-bottom: 1rem;
}

body[data-page="anchor-bloom"] .aab-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.7rem, 1.8vw, 1.1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

body[data-page="anchor-bloom"] .aab-feature-grid > li {
  margin: 0;
  padding: 0;
}

body[data-page="anchor-bloom"] .aab-feature-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: 100%;
  text-align: left;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font: inherit;
  color: inherit;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

body[data-page="anchor-bloom"] .aab-feature-tile:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--lux-gold-line);
}

body[data-page="anchor-bloom"] .aab-feature-tile:focus {
  outline: none;
}

body[data-page="anchor-bloom"] .aab-feature-tile:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
}

body[data-page="anchor-bloom"] .aab-feature-tile__media {
  display: block;
  aspect-ratio: 600 / 338;
  background: var(--beige);
  overflow: hidden;
  flex-shrink: 0;
}

body[data-page="anchor-bloom"] .aab-feature-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-page="anchor-bloom"] .aab-feature-tile__label {
  display: block;
  padding: 0.7rem 0.85rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.84rem;
  line-height: 1.35;
  flex-shrink: 0;
}

body[data-page="anchor-bloom"] .aab-feature-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(96vw, 880px);
  width: 100%;
}

body[data-page="anchor-bloom"] .aab-feature-dialog::backdrop {
  background: rgba(42, 39, 36, 0.55);
  backdrop-filter: blur(4px);
}

body[data-page="anchor-bloom"] .aab-feature-dialog__panel {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 3vw, 1.35rem);
}

body[data-page="anchor-bloom"] .aab-feature-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

body[data-page="anchor-bloom"] .aab-feature-dialog__title {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  padding-top: 0.15rem;
  flex: 1;
  min-width: 0;
}

body[data-page="anchor-bloom"] .aab-feature-dialog__close {
  flex-shrink: 0;
  margin: 0;
}

body[data-page="anchor-bloom"] .aab-feature-dialog__video-wrap {
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  background: #1a1816;
  border: 1px solid rgba(42, 39, 36, 0.2);
}

body[data-page="anchor-bloom"] .aab-feature-dialog__video-wrap video {
  display: block;
  width: 100%;
  max-height: min(70vh, 520px);
  height: auto;
}

@media (max-width: 900px) {
  body[data-page="anchor-bloom"] .aab-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body[data-page="anchor-bloom"] .aab-feature-dialog__head {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-page="anchor-bloom"] .aab-feature-dialog__close {
    align-self: flex-end;
  }
}

/* Final "Open Anchor & Bloom" band — the one door into /app/ on this page. */

.hh-open-app-panel {
  text-align: center;
}

.hh-open-app-panel .btn-row {
  justify-content: center;
}

.hh-open-app-panel .btn--open-app {
  padding: 0.95rem 2.1rem;
  font-size: 0.98rem;
}

.hh-open-app-panel__foot {
  margin: 1.1rem 0 0;
  font-size: 0.86rem;
}

/* ── Founder / brand-story figure (About) ──────────────────────────── */
.hh-story-figure {
  margin: 0 0 2rem;
}

.hh-story-figure__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--lux-gold-line);
  box-shadow: var(--shadow-sm);
}

.hh-story-figure__caption {
  margin: 0.85rem 0 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lux-gold-ink);
}

@media (prefers-reduced-motion: reduce) {
  .hh-problem-card,
  body[data-page="anchor-bloom"] .ab-lane-card,
  body[data-page="anchor-bloom"] .aab-feature-tile {
    transition: none;
  }

  .hh-problem-card:hover,
  body[data-page="anchor-bloom"] .ab-lane-card:hover,
  body[data-page="anchor-bloom"] .aab-feature-tile:hover {
    transform: none;
  }
}

/* Four-item variant: 2x2 on tablet, 4-up on wide screens, so a four-card row
   never leaves one orphan on a line of its own. */
@media (min-width: 640px) {
  .hh-problem-grid--quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .hh-problem-grid--quad {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Two-up story figures (used on Plan Your Adventure for the gift bundles). */
.hh-story-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(1rem, 2.4vw, 1.5rem);
}

.hh-story-pair .hh-story-figure {
  margin: 0;
}

.hh-story-pair .hh-story-figure__img {
  aspect-ratio: 4 / 3;
}

/* ── /anchor-bloom/ : real screen-recording clips, side by side ─────────── */
.ab-clip-grid {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  align-items: start;
}
.ab-clip-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}
.ab-clip-card__video {
  display: block;
  width: 100%;
  max-width: 18rem;
  height: auto;
  aspect-ratio: 590 / 1280;
  background: var(--lux-charcoal);
  border: 1px solid var(--lux-gold-line);
  border-radius: var(--radius-lg, 18px);
  box-shadow: 0 22px 56px rgba(42, 39, 36, 0.18);
}
.ab-clip-card__body {
  max-width: 26rem;
  text-align: center;
}
.ab-clip-card__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  margin: 0 0 0.5rem;
  color: var(--lux-charcoal);
}
.ab-clip-card__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── Tick list used by the restored Anchor & Bloom feature sections ─────── */
.hh-tick-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.hh-tick-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.97rem;
  line-height: 1.6;
  color: rgba(61, 56, 51, 0.88);
}
.hh-tick-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.62em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--lux-gold-ink);
}
.hh-tick-list strong {
  color: var(--lux-charcoal);
}
