/* ==========================================================================
   CityFoundry AG — Inner template shell
   The banner, section rhythm and closing CTA every inner page shares.
   Requires: tokens.css, components.css
   ========================================================================== */

@keyframes cf-fade {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* --- Dark page banner ------------------------------------------------------- */
/* Aligned with the Figma page heroes (see pillar.css .cf-phero): Foundry Teal
   ground, 120px vertical padding, 1280 container. Pages that still use this
   shell now match the rebuilt ones without touching their markup. */
.cf-ihero {
  background: var(--cf-teal);
  padding: var(--cf-sec-pad) var(--cf-gutter);
}

.cf-ihero__inner {
  max-width: var(--cf-shell);
  margin: 0 auto;
  animation: cf-fade .8s ease both;
}

.cf-ihero__title {
  margin: 0 0 24px;
  max-width: 18ch;
  font-family: var(--cf-font-head);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: var(--cf-lh-h1);
  font-size: clamp(34px, 4.4vw, var(--cf-fs-h1));
  color: var(--cf-white);
  hyphens: auto;
  overflow-wrap: break-word;
}

.cf-ihero__title--narrow { max-width: 14ch; }

.cf-ihero__lead {
  margin: 0;
  max-width: 68ch;
  font-family: var(--cf-font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: var(--cf-lh-body-dark);
  color: var(--cf-sky);
}

/* --- Section shells ---------------------------------------------------------- */
.cf-isection {
  background: var(--cf-white);
  padding: var(--cf-sec-pad) var(--cf-gutter);
}

/* The Figma surface rhythm: cream and Crystal Haze alternating with white. */
.cf-isection--surface { background: var(--cf-cream); }
.cf-isection--mint { background: var(--cf-crystal); }

/* Continues the block above it, so no top padding. */
.cf-isection--flush { padding-top: 0; }

/* A narrow band that introduces the section below it. */
.cf-isection--intro { padding: 56px var(--cf-gutter) 0; }

/* The body that follows an intro band. */
.cf-isection--body { padding: 40px var(--cf-gutter) 96px; }

.cf-isection__head {
  max-width: 640px;
  margin-bottom: 44px;
}

/* Head with a link parked on the right. */
.cf-isection__head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

.cf-isection__head-text { max-width: 640px; }

.cf-isection__title {
  margin: 0;
  font-family: var(--cf-font-head);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.05;
  font-size: clamp(30px, 3.6vw, 46px);
}

/* --- Closing CTA panel --------------------------------------------------------- */
.cf-endcta {
  max-width: var(--cf-shell);
  margin: 0 auto;
  border-radius: 32px;
  background: var(--cf-ink);
  padding: 64px 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.cf-endcta__text { max-width: 620px; }

.cf-endcta__title {
  margin: 0 0 12px;
  font-family: var(--cf-font-head);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.05;
  font-size: clamp(28px, 3.4vw, 44px);
  color: var(--cf-white);
}

.cf-endcta__lead {
  margin: 0;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--cf-sky);
}

/* --- Responsive ------------------------------------------------------------------ */
@media (max-width: 720px) {
  .cf-ihero,
  .cf-isection {
    padding-left: var(--cf-gutter-sm);
    padding-right: var(--cf-gutter-sm);
  }

  /* Only the templates that opted into it tighten the panel on mobile. */
  .cf-endcta--compact { padding: 28px; }
}
