/* ============================================================
   MATI BHADRA SAGARA — LINEAGE PAGE
   css/pages/lineage.css
   ============================================================ */


/* ─────────────────────────────────────────────────────────────
   HERO — portrait photo, frosted left-panel overlay
   ───────────────────────────────────────────────────────────── */

.lineage-hero {
  position: relative;
  min-height: 480px;
  background-image: url('../../assets/images/Dagpo Rinpoche 1920x860.jpeg');
  background-size: cover;
  background-position: center 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.lineage-hero__mobile-photo {
  display: none;
}

.lineage-hero__inner {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-height) + var(--space-9));
  padding-bottom: var(--space-11);
  width: 100%;
}

.lineage-hero__content {
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: var(--space-7) var(--space-8);
}

.lineage-hero__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--type-size-h1-l);
  line-height: var(--type-lh-h1-l);
  color: var(--color-brand-rust);
}

.lineage-hero__subtitle {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--type-size-body-m);
  line-height: var(--type-lh-body-m);
  color: var(--color-text-body);
  max-width: 44ch;
}

@media (max-width: 768px) {
  .lineage-hero {
    background-image: none;
    min-height: auto;
  }

  .lineage-hero__inner {
    padding-bottom: var(--space-8);
  }

  .lineage-hero__content {
    max-width: 100%;
  }

  .lineage-hero__mobile-photo {
    display: block;
    width: 100%;
  }

  .lineage-hero__mobile-photo-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center 20%;
  }
}

@media (min-width: 769px) {
  .lineage-hero {
    min-height: 600px;
  }
}

@media (min-width: 1025px) {
  .lineage-hero {
    min-height: 819px;
  }

  .lineage-hero__inner {
    padding-top: calc(var(--nav-height) + var(--space-12));
    padding-bottom: var(--space-12);
  }

  .lineage-hero__heading {
    font-size: var(--type-size-h1-l);
  }
}


/* ─────────────────────────────────────────────────────────────
   BIOGRAPHY — 4+7 label + text
   ───────────────────────────────────────────────────────────── */

.biography {
  background-color: var(--color-bg-primary);
}

.biography__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.biography__label .eyebrow {
  color: var(--color-brand-crimson);
}

.biography__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.biography__text p {
  font-size: var(--type-size-body-m);
  line-height: var(--type-lh-body-m);
  color: var(--color-text-body);
  max-width: 60ch;
}

@media (min-width: 769px) {
  .biography__inner {
    grid-template-columns: 4fr 7fr;
    gap: var(--space-9);
    align-items: start;
  }
}

@media (min-width: 1025px) {
  .biography__inner {
    gap: var(--space-11);
  }
}


/* ─────────────────────────────────────────────────────────────
   LINEAGE MASTERS — 3-col cards
   ───────────────────────────────────────────────────────────── */

.masters {
  background-color: var(--color-bg-secondary);
}

.masters__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-9);
}

.masters__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 48rem;
}

.masters__heading {
  font-size: var(--type-size-h2-l);
  line-height: var(--type-lh-h2-l);
  color: var(--color-brand-rust);
}

.masters__intro {
  font-size: var(--type-size-body-m);
  line-height: var(--type-lh-body-m);
  color: var(--color-text-body);
  max-width: 60ch;
}

.masters__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

/* Master card */
.master-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-primary);
}

.master-card__img-wrap {
  overflow: hidden;
  aspect-ratio: 5 / 6;
}

.master-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.master-card:hover .master-card__img {
  transform: scale(1.03);
}

.master-card__body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.master-card__period {
  font-family: var(--font-sans);
  font-size: var(--type-size-eyebrow-m);
  letter-spacing: var(--type-ls-eyebrow-m);
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 700;
}

.master-card__name {
  font-family: var(--font-display);
  font-size: var(--type-size-h3);
  line-height: var(--type-lh-h3);
  color: var(--color-brand-rust);
  font-weight: 400;
}

.master-card__text {
  font-family: var(--font-sans);
  font-size: var(--type-size-body);
  line-height: var(--type-lh-body);
  color: var(--color-text-body);
  max-width: 38ch;
}

@media (min-width: 480px) {
  .masters__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Third card centred on its own row at 480px */
  .master-card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    justify-self: center;
  }
}

@media (min-width: 769px) {
  .masters__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .master-card:last-child {
    grid-column: auto;
    max-width: none;
    justify-self: auto;
  }
}


/* ─────────────────────────────────────────────────────────────
   QUOTE — red full-width block
   ───────────────────────────────────────────────────────────── */

.lineage-quote {
  background-color: var(--color-cta);
}

.lineage-quote__inner {
  display: flex;
  justify-content: center;
}

.lineage-quote__content {
  max-width: 52rem;
  text-align: center;
}

/* Override base blockquote */
.lineage-quote__text {
  border: none;
  padding: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--type-size-quote-l);
  line-height: var(--type-lh-quote-l);
  color: var(--color-text-white);
  letter-spacing: 0;
}

@media (min-width: 769px) {
  .lineage-quote__text {
    font-size: var(--type-size-quote-l);
  }
}


/* ─────────────────────────────────────────────────────────────
   BRIDGE ACROSS WORLDS — 2-col text + image
   ───────────────────────────────────────────────────────────── */

.bridge {
  background-color: var(--color-bg-white);
}

.bridge__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-9);
}

.bridge__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  justify-content: center;
}

.bridge__heading {
  font-size: var(--type-size-h2-l);
  line-height: var(--type-lh-h2-l);
  color: var(--color-brand-rust);
}

.bridge__text p {
  font-size: var(--type-size-body-m);
  line-height: var(--type-lh-body-m);
  color: var(--color-text-body);
  max-width: 54ch;
}

.bridge__media {
  order: -1;    /* image above text on mobile */
}

.bridge__image {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  display: block;
}

@media (min-width: 769px) {
  .bridge__inner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-9);
  }

  .bridge__media {
    order: 0;   /* image right of text */
  }

  .bridge__image {
    aspect-ratio: auto;
    height: 100%;
    min-height: 420px;
  }
}

@media (min-width: 1025px) {
  .bridge__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-11);
  }
}
