/* ========================================================================
   Fundación Sergio Bravo — Home
   v1.5.2. Editorial project composition with deliberate vertical rhythm.
   The newest project leads at left; two secondary projects stack at right.
   Whitespace is controlled by explicit spacing tokens rather than incidental
   card heights.
   ======================================================================== */

/* -------------------------------------------------------------------------
   PROJECTS — designed whitespace and balanced desktop height.
   ------------------------------------------------------------------------- */
body.home .fsb-home-projects-featured {
  overflow: clip;
}

body.home .fsb-home-projects-featured .fsb-home-projects__canvas {
  box-sizing: border-box;
}

body.home .fsb-home-project-list {
  --fsb-project-image-copy-lead: clamp(18px, 1.8vw, 26px);
  --fsb-project-image-copy-secondary: clamp(14px, 1.4vw, 20px);
  --fsb-project-meta-title: 10px;
  --fsb-project-title-summary: clamp(14px, 1.2vw, 18px);
  --fsb-project-summary-cta: clamp(18px, 1.6vw, 24px);
  border-bottom: 1px solid var(--fsb-line);
  display: grid;
  gap: 0 clamp(38px, 4.4vw, 72px);
  grid-template-columns: minmax(0, 1.48fr) minmax(350px, .82fr);
  grid-template-rows: auto auto;
  margin: 0;
  width: 100%;
}

body.home .fsb-home-project-row {
  box-sizing: border-box;
  margin: 0;
  min-width: 0;
}

/* Lead project ----------------------------------------------------------- */
body.home .fsb-home-project-row--lead {
  border-right: 1px solid var(--fsb-line);
  display: flex;
  flex-direction: column;
  grid-column: 1;
  grid-row: 1 / span 2;
  padding: 0 clamp(34px, 3.8vw, 60px) clamp(30px, 3vw, 46px) 0;
}

/* A slightly taller lead frame visually absorbs the height of the two
   secondary cards and prevents a large accidental void under the lead copy. */
body.home .fsb-home-project-row--lead .fsb-home-project-row__media {
  aspect-ratio: 16 / 10.2;
}

body.home .fsb-home-project-row--lead .fsb-home-project-row__copy {
  padding-top: var(--fsb-project-image-copy-lead);
}

body.home .fsb-home-project-row--lead h3 {
  font-size: clamp(2.75rem, 3.85vw, 4.9rem) !important;
  line-height: .93 !important;
  max-width: 14ch;
}

body.home .fsb-home-project-row--lead .fsb-home-project-row__summary {
  font-size: clamp(.96rem, 1.08vw, 1.08rem);
  max-width: 42ch;
}

/* Secondary projects ---------------------------------------------------- */
body.home .fsb-home-project-row--secondary {
  display: flex;
  flex-direction: column;
  grid-column: 2;
  padding: 0 0 clamp(28px, 2.8vw, 38px);
}

body.home .fsb-home-project-row--2 {
  grid-row: 1;
}

body.home .fsb-home-project-row--3 {
  border-top: 1px solid var(--fsb-line);
  grid-row: 2;
  padding-top: clamp(28px, 2.8vw, 38px);
}

/* Secondary frames are intentionally shallower than the lead image. */
body.home .fsb-home-project-row--secondary .fsb-home-project-row__media {
  aspect-ratio: 16 / 8.15;
}

body.home .fsb-home-project-row--secondary .fsb-home-project-row__copy {
  padding-top: var(--fsb-project-image-copy-secondary);
}

body.home .fsb-home-project-row--secondary h3 {
  font-size: clamp(1.8rem, 2.18vw, 2.72rem) !important;
  line-height: .98 !important;
  max-width: 17ch;
}

body.home .fsb-home-project-row--secondary .fsb-home-project-row__summary {
  font-size: clamp(.88rem, .95vw, .98rem);
  line-height: 1.48;
  max-width: 38ch;
}

/* Shared card elements -------------------------------------------------- */
body.home .fsb-home-project-row__media {
  background: var(--fsb-black);
  display: block;
  margin: 0;
  overflow: hidden;
  width: 100%;
}

body.home .fsb-home-project-row__media img {
  filter: grayscale(1);
  height: 100%;
  object-fit: cover;
  transition: transform .8s ease;
  width: 100%;
}

body.home .fsb-home-project-row__media:hover img {
  transform: scale(1.012);
}

body.home .fsb-home-project-row__copy {
  min-width: 0;
}

body.home .fsb-home-project-row__meta {
  color: var(--fsb-graphite);
  display: flex;
  font-size: 10px;
  gap: 14px;
  letter-spacing: .03em;
  margin: 0 0 var(--fsb-project-meta-title);
}

body.home .fsb-home-project-row .fsb-kicker {
  margin: 0 0 8px !important;
}

body.home .fsb-home-project-row h3 {
  font-family: var(--fsb-serif) !important;
  font-weight: 400 !important;
  letter-spacing: -.045em !important;
  margin: 0 !important;
}

body.home .fsb-home-project-row h3 a {
  color: inherit !important;
  text-decoration: none !important;
}

body.home .fsb-home-project-row h3 a:hover {
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
}

body.home .fsb-home-project-row__summary {
  color: var(--fsb-graphite);
  margin: var(--fsb-project-title-summary) 0 0 !important;
}

body.home .fsb-home-project-row .fsb-text-link {
  margin: var(--fsb-project-summary-cta) 0 0 !important;
}

/* Tablet: image and copy share one row with a compact, repeatable rhythm. */
@media (max-width: 1199px) {
  body.home .fsb-home-project-list {
    --fsb-project-image-copy-lead: 0px;
    --fsb-project-image-copy-secondary: 0px;
    display: flex;
    flex-direction: column;
  }

  body.home .fsb-home-project-row,
  body.home .fsb-home-project-row--lead,
  body.home .fsb-home-project-row--secondary {
    align-items: center;
    border-right: 0;
    border-top: 1px solid var(--fsb-line);
    display: grid;
    gap: clamp(24px, 3.5vw, 42px);
    grid-template-columns: minmax(0, 1.08fr) minmax(260px, .92fr);
    padding: clamp(30px, 3.8vw, 48px) 0;
  }

  body.home .fsb-home-project-row:first-child,
  body.home .fsb-home-project-row--lead {
    border-top: 0;
    padding-top: 0;
  }

  body.home .fsb-home-project-row__media,
  body.home .fsb-home-project-row--lead .fsb-home-project-row__media,
  body.home .fsb-home-project-row--secondary .fsb-home-project-row__media {
    aspect-ratio: 16 / 10;
  }

  body.home .fsb-home-project-row__copy,
  body.home .fsb-home-project-row--lead .fsb-home-project-row__copy,
  body.home .fsb-home-project-row--secondary .fsb-home-project-row__copy {
    padding-top: 0;
  }

  body.home .fsb-home-project-row h3,
  body.home .fsb-home-project-row--lead h3,
  body.home .fsb-home-project-row--secondary h3 {
    font-size: clamp(2rem, 4vw, 3.35rem) !important;
    max-width: 15ch;
  }
}

/* Mobile: one vertical card with deliberately tight image-to-copy spacing. */
@media (max-width: 760px) {
  body.home .fsb-home-project-list {
    --fsb-project-title-summary: 14px;
    --fsb-project-summary-cta: 20px;
  }

  body.home .fsb-home-project-row,
  body.home .fsb-home-project-row--lead,
  body.home .fsb-home-project-row--secondary {
    align-items: start;
    gap: 18px;
    grid-template-columns: 1fr;
    padding: 28px 0;
  }

  body.home .fsb-home-project-row:first-child,
  body.home .fsb-home-project-row--lead {
    padding-top: 0;
  }

  body.home .fsb-home-project-row__media,
  body.home .fsb-home-project-row--lead .fsb-home-project-row__media,
  body.home .fsb-home-project-row--secondary .fsb-home-project-row__media {
    aspect-ratio: 4 / 3;
  }

  body.home .fsb-home-project-row h3,
  body.home .fsb-home-project-row--lead h3,
  body.home .fsb-home-project-row--secondary h3 {
    font-size: clamp(2.1rem, 9.2vw, 3.25rem) !important;
    max-width: 14ch;
  }
}


/* -------------------------------------------------------------------------
   AGENDA — same visual contract as the principal sergiobravo.cl Home.
   ------------------------------------------------------------------------- */
body.home .fsb-home-agenda.sb-news-agenda,
body.home .fsb-home-agenda.sb-home-agenda {
  background: #000 !important;
  color: #fff !important;
  margin-top: 0 !important;
  padding-block: clamp(84px, 9vw, 140px) !important;
}
body.home .fsb-home-agenda .sb-news-agenda__header,
body.home .fsb-home-agenda .sb-news-agenda__events,
body.home .fsb-home-agenda .sb-news-agenda__cta {
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1440px !important;
  width: calc(100% - (2 * var(--fsb-gutter))) !important;
}
body.home .fsb-home-agenda .sb-news-agenda__header {
  display: grid !important;
  gap: clamp(38px, 6vw, 92px) !important;
  grid-template-columns: minmax(130px, .38fr) minmax(0, 1.62fr) !important;
  margin-bottom: clamp(48px, 6vw, 88px) !important;
}
body.home .fsb-home-agenda .sb-news-agenda__title {
  color: #fff !important;
  font-family: var(--fsb-serif) !important;
  font-size: clamp(3.4rem, 5.6vw, 6.7rem) !important;
  font-weight: 400 !important;
  letter-spacing: -.04em !important;
  line-height: .92 !important;
  margin: 0 !important;
}
body.home .fsb-home-agenda .sb-news-agenda__events {
  border-top: 1px solid rgba(255,255,255,.22) !important;
}
body.home .fsb-home-agenda .sb-calendar-event {
  align-items: start !important;
  border-bottom: 1px solid rgba(255,255,255,.22) !important;
  color: #fff !important;
  display: grid !important;
  gap: clamp(22px, 3vw, 48px) !important;
  grid-template-columns: minmax(120px,.48fr) minmax(0,1.42fr) 32px !important;
  padding: clamp(22px,2.5vw,34px) 0 !important;
}
body.home .fsb-home-agenda .sb-calendar-event:last-child { border-bottom: 0 !important; }
body.home .fsb-home-agenda .sb-calendar-event__date,
body.home .fsb-home-agenda .sb-calendar-event__time,
body.home .fsb-home-agenda .sb-calendar-event__type,
body.home .fsb-home-agenda .sb-calendar-event__place,
body.home .fsb-home-agenda .sb-calendar-event__excerpt {
  color: rgba(255,255,255,.62) !important;
  margin: 0 !important;
}
body.home .fsb-home-agenda .sb-calendar-event__date,
body.home .fsb-home-agenda .sb-calendar-event__time,
body.home .fsb-home-agenda .sb-calendar-event__type {
  font-size: clamp(.76rem,.9vw,.92rem) !important;
  line-height: 1.35 !important;
}
body.home .fsb-home-agenda .sb-calendar-event__time { margin-top: 7px !important; }
body.home .fsb-home-agenda .sb-calendar-event__type {
  font-size: 10px !important;
  letter-spacing: .08em !important;
  margin-bottom: 10px !important;
}
body.home .fsb-home-agenda .sb-calendar-event__title {
  color: #fff !important;
  font-family: var(--fsb-sans) !important;
  font-size: clamp(1.45rem,2.1vw,2.7rem) !important;
  font-weight: 400 !important;
  letter-spacing: -.025em !important;
  line-height: 1.02 !important;
  margin: 0 !important;
}
body.home .fsb-home-agenda .sb-calendar-event__title a,
body.home .fsb-home-agenda .sb-calendar-event__arrow a {
  color: #fff !important;
  text-decoration: none !important;
}
body.home .fsb-home-agenda .sb-calendar-event__place {
  font-size: .95rem !important;
  margin-top: 12px !important;
}
body.home .fsb-home-agenda .sb-calendar-event__excerpt {
  font-size: .92rem !important;
  line-height: 1.5 !important;
  margin-top: 18px !important;
  max-width: 680px !important;
}
body.home .fsb-home-agenda .sb-calendar-event__arrow a {
  display: block;
  font-size: 1.2rem;
  text-align: right;
}
body.home .fsb-home-agenda .sb-upcoming-empty {
  color: rgba(255,255,255,.62) !important;
  padding: 28px 0 !important;
}
body.home .fsb-home-agenda .sb-news-agenda__cta {
  border-top: 1px solid rgba(255,255,255,.22) !important;
  margin-top: clamp(20px, 2.4vw, 34px) !important;
  padding-top: 20px !important;
}
body.home .fsb-home-agenda .sb-news-agenda__cta p { margin: 0 !important; }
body.home .fsb-home-agenda .sb-news-agenda__cta a { color: #fff !important; text-decoration: none !important; }

@media (max-width: 900px) {
  body.home .fsb-home-agenda .sb-news-agenda__header {
    gap: 32px !important;
    grid-template-columns: minmax(0,1fr) !important;
  }
  body.home .fsb-home-agenda {
    padding-block: clamp(72px,14vw,108px) !important;
  }
}

/* -------------------------------------------------------------------------
   MOBILE HOME HERO — preserve the approved image-led composition from 1.4.8.
   ------------------------------------------------------------------------- */
@media (max-width: 640px) {
  body.home .fsb-home-collage-hero {
    background: var(--fsb-paper) !important;
    display: block !important;
    height: 100svh !important;
    min-height: 620px !important;
    overflow: hidden !important;
    position: relative !important;
  }
  body.home .fsb-home-visual {
    background: #111 !important;
    inset: 0 !important;
    min-height: 0 !important;
    position: absolute !important;
    z-index: 1 !important;
  }
  body.home .fsb-home-visual::after {
    background:
      linear-gradient(180deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,0) 17%),
      linear-gradient(180deg, rgba(0,0,0,0) 48%, rgba(0,0,0,.12) 62%, rgba(0,0,0,.78) 100%) !important;
    content: "" !important;
    inset: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: 6 !important;
  }
  body.home .fsb-home-collage {
    height: 100% !important;
    inset: 0 !important;
  }
  body.home .fsb-collage-slot--a {
    bottom: 0 !important;
    height: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 1 !important;
  }
  body.home .fsb-collage-slot--a img { object-position: center center !important; }
  body.home .fsb-collage-slot--b {
    height: 38% !important;
    right: -4% !important;
    top: 11% !important;
    width: 54% !important;
    z-index: 3 !important;
  }
  body.home .fsb-collage-slot--c {
    bottom: 29% !important;
    height: 25% !important;
    right: 5% !important;
    width: 46% !important;
    z-index: 4 !important;
  }
  body.home .fsb-home-rail {
    align-items: flex-end !important;
    background: transparent !important;
    bottom: 0 !important;
    display: flex !important;
    inset: 0 !important;
    justify-content: flex-start !important;
    padding: 0 max(var(--sb-editorial-edge), env(safe-area-inset-right)) max(30px, env(safe-area-inset-bottom)) max(var(--sb-editorial-edge), env(safe-area-inset-left)) !important;
    position: absolute !important;
    text-align: left !important;
    z-index: 8 !important;
  }
  body.home .fsb-home-rail__copy {
    align-items: flex-start !important;
    max-width: min(88vw, 500px) !important;
  }
  body.home .fsb-home-rail__label {
    color: rgba(255,255,255,.72) !important;
    margin: 0 0 10px !important;
  }
  body.home .fsb-home-rail h1 {
    color: #fff !important;
    font-size: clamp(2.2rem, 8.8vw, 3.25rem) !important;
    letter-spacing: -.045em !important;
    line-height: .92 !important;
    margin: 0 !important;
    max-width: 11ch !important;
    text-align: left !important;
    text-wrap: balance;
  }
  body.home .fsb-home-rail__descriptor {
    color: rgba(255,255,255,.8) !important;
    font-size: .76rem !important;
    line-height: 1.4 !important;
    margin: 16px 0 0 !important;
    max-width: 30ch !important;
    text-align: left !important;
  }

  body.home .fsb-home-agenda {
    padding-block: 68px 72px !important;
  }
  body.home .fsb-home-agenda .sb-news-agenda__header,
  body.home .fsb-home-agenda .sb-news-agenda__events,
  body.home .fsb-home-agenda .sb-news-agenda__cta {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    padding-left: max(var(--sb-editorial-edge), env(safe-area-inset-left)) !important;
    padding-right: max(var(--sb-editorial-edge), env(safe-area-inset-right)) !important;
    width: 100% !important;
  }
  body.home .fsb-home-agenda .sb-news-agenda__header { margin-bottom: 40px !important; }
  body.home .fsb-home-agenda .sb-news-agenda__title { font-size: clamp(3rem, 13vw, 4.7rem) !important; }
  body.home .fsb-home-agenda .sb-calendar-event {
    gap: 12px !important;
    grid-template-columns: minmax(0,1fr) 28px !important;
    padding: 24px 0 !important;
  }
  body.home .fsb-home-agenda .sb-calendar-event__meta { grid-column: 1 / -1 !important; }
  body.home .fsb-home-agenda .sb-calendar-event__title { font-size: clamp(1.65rem, 7.3vw, 2.35rem) !important; }
  body.home .fsb-home-agenda .sb-calendar-event__arrow {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home .fsb-home-project-row__media img { transition: none !important; }
}
