/* ============================================
   CFL Intro — full-width photo hero + two-column intro on a white sheet
   Hero mechanics match the INST Hero with KPIs: the stage is position:fixed
   and the hero clips it (clip-path), so the photo stays put while the page
   scrolls over it. The rounded lip at its bottom starts the white sheet.
   ============================================ */

.cfl-in {
  --cfl-ease: cubic-bezier(.22, 1, .36, 1);
  --cfl-in-ease: cubic-bezier(.22, .61, .36, 1);
  --cfl-green: #557a1d;
  --cfl-ink: #22262e;
  --cfl-muted: #5e626a;
  --cfl-in-h: min(886px, calc(100vh - var(--cfl-in-above, 0px)));
  --cfl-in-min: 620px;
  --cfl-in-lip: 40px;
  --cfl-in-copy-b: calc(var(--cfl-in-lip) + 56px);
  --cfl-in-cue-b: calc(var(--cfl-in-lip) + 62px);

  position: relative;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.cfl-in, .cfl-in *, .cfl-in *::before, .cfl-in *::after { box-sizing: border-box; }

/* the theme caps drag-and-drop rows — let the hero run full width */
.dnd-section:has([data-cfl-in]) > .row-fluid { max-width: none; }

/* ---------- hero ---------- */
.cfl-in__hero {
  position: relative;
  z-index: 0;
  height: var(--cfl-in-h);
  min-height: var(--cfl-in-min);
  /* slide up under the fixed global header (value set by JS) */
  margin-top: calc(-1 * var(--cfl-in-pull, 0px));
  overflow: hidden;
  clip-path: inset(0);
  background: #3a4a24;
  color: #fff;
}

.cfl-in__stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--cfl-in-h);
  min-height: var(--cfl-in-min);
  overflow: hidden;
}

.cfl-in__bg {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.cfl-in .cfl-in__img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--cfl-in-pos);
  transform-origin: var(--cfl-in-pos);
}

.cfl-in__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .42) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
}

.cfl-in__copy {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: var(--cfl-in-copy-b);
  width: min(1200px, 100% - 32px);
  margin: 0 auto;
  padding-right: 80px; /* keep clear of the scroll button */
  will-change: transform, opacity;
}

.cfl-in .cfl-in__title {
  margin: 0;
  font-family: inherit;
  font-weight: 600;
  font-size: 88px;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-transform: none;
  text-wrap: balance;
  color: #fff;
}

/* entrance (only once JS runs, so content is never hidden without JS) */
.cfl-in__hero.is-ready .cfl-in__title {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(20px);
  transition: opacity .9s var(--cfl-in-ease), transform .9s var(--cfl-in-ease), filter .9s var(--cfl-in-ease);
}
.cfl-in__hero.is-ready.is-in .cfl-in__title { opacity: 1; transform: none; filter: none; }

/* scroll cue */
.cfl-in__cue {
  position: absolute;
  z-index: 2;
  right: max(16px, calc((100% - 1200px) / 2));
  bottom: var(--cfl-in-cue-b);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  transition: opacity .3s, background .25s;
}
.cfl-in .cfl-in__cue:hover,
.cfl-in .cfl-in__cue:focus { color: #fff; background: rgba(255, 255, 255, .15); text-decoration: none !important; }
.cfl-in__cue:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.cfl-in__cue svg { display: block; }
.cfl-in__cue-arrow { animation: cfl-in-cue 2.2s var(--cfl-in-ease) infinite; }
.cfl-in__hero.is-scrolled .cfl-in__cue { opacity: 0; pointer-events: none; }

@keyframes cfl-in-cue {
  0%, 100% { transform: translateY(-3px); }
  50% { transform: translateY(4px); }
}

/* sheet lip: the white sheet's rounded top edge */
.cfl-in__lip {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: -1px;
  height: calc(var(--cfl-in-lip) + 1px);
  border-radius: var(--cfl-in-lip) var(--cfl-in-lip) 0 0;
  background: #fff;
  pointer-events: none;
}

/* the scroll button lands right where the sheet starts */
.cfl-in__end { position: absolute; bottom: var(--cfl-in-lip); left: 0; width: 1px; height: 1px; }

/* editor: plain static hero */
.cfl-in__hero--static { margin-top: 0; clip-path: none; }
.cfl-in__hero--static .cfl-in__stage { position: absolute; }

/* ---------- intro on the white sheet ---------- */
.cfl-in__sheet {
  position: relative;
  z-index: 1;
  background: #fff;
}

.cfl-in--pt-none { padding-top: 0; }
.cfl-in--pt-small { padding-top: 48px; }
.cfl-in--pt-medium { padding-top: 88px; }
.cfl-in--pt-large { padding-top: 128px; }

.cfl-in__intro {
  width: min(1200px, 100% - 32px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: start;
}

.cfl-in__statement p {
  margin: 0;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.22;
  color: var(--cfl-ink);
}
.cfl-in__statement p + p { margin-top: 12px; }
.cfl-in__statement strong,
.cfl-in__statement b { font-weight: inherit; color: var(--cfl-green); }

.cfl-in__desc p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--cfl-muted);
}
.cfl-in__desc p + p { margin-top: 12px; }
.cfl-in__desc strong { color: var(--cfl-ink); }
.cfl-in__desc a { color: var(--cfl-green); }

/* reveal (classes added by JS only, never hides content without JS) */
.cfl-in [data-cfl-reveal] {
  transition: opacity .9s var(--cfl-ease), transform .9s var(--cfl-ease);
  transition-delay: calc(var(--d, 0) * .12s);
}
.cfl-in [data-cfl-reveal].is-pre { opacity: 0; transform: translateY(32px); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cfl-in .cfl-in__title { font-size: clamp(44px, 8.6vw, 88px); }
}

@media (max-width: 760px) {
  .cfl-in {
    --cfl-in-h: clamp(500px, 135vw, 600px);
    --cfl-in-min: 0px;
    --cfl-in-lip: 28px;
    --cfl-in-copy-b: calc(var(--cfl-in-lip) + 44px);
  }
  /* whole pixels, so the photo never peeks out under the sheet edge */
  @supports (width: round(down, 1.5px, 1px)) {
    .cfl-in { --cfl-in-h: round(down, clamp(500px, 135vw, 600px), 1px); }
  }
  .cfl-in .cfl-in__img { object-position: var(--cfl-in-pos-m); transform-origin: var(--cfl-in-pos-m); }
  .cfl-in__copy { padding-right: 0; }
  .cfl-in .cfl-in__title { font-size: clamp(36px, 10.4vw, 56px); line-height: 1.05; }
  .cfl-in__cue { display: none; }
  .cfl-in--pt-small { padding-top: 32px; }
  .cfl-in--pt-medium { padding-top: 48px; }
  .cfl-in--pt-large { padding-top: 72px; }
  .cfl-in__intro { grid-template-columns: 1fr; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .cfl-in *,
  .cfl-in *::before,
  .cfl-in *::after { animation: none !important; }
  .cfl-in [data-cfl-reveal],
  .cfl-in__hero.is-ready .cfl-in__title { transition: none; opacity: 1; transform: none; filter: none; }
}
