/* ==========================================================================
   CityFoundry AG — Shared components
   Pieces that appear on more than one template: page shell, section rhythm,
   eyebrow labels, headings, pill buttons, blog cards, image zoom.
   Requires: tokens.css
   ========================================================================== */

/* --- Layout -------------------------------------------------------------- */

/* Horizontal rhythm every section shares. */
.cf-section {
  padding: 110px var(--cf-gutter);
}

.cf-shell {
  max-width: var(--cf-shell);
  margin: 0 auto;
}

/* Section header: heading on the left, supporting text or a link on the
   right, wrapping to two rows when there is not enough room. */
.cf-sechead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

/* --- Eyebrow label ----------------------------------------------------------
   Small uppercase label preceded by a rule. Geometry varies a little
   between the homepage and the inner templates; colour is a separate
   modifier so either geometry can sit on a dark ground. */
.cf-eyebrow {
  --cf-dash: 26px;
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cf-link);
}

.cf-eyebrow__dash {
  width: var(--cf-dash);
  height: 1px;
  background: currentColor;
}

/* Homepage stats band — smaller type, wider tracking. */
.cf-eyebrow--wide {
  margin-bottom: 20px;
  gap: 11px;
  font-size: 12.5px;
  letter-spacing: .18em;
}

/* Inner templates — slightly wider tracking, shorter rule. */
.cf-eyebrow--inner {
  --cf-dash: 24px;
  margin-bottom: 20px;
  gap: 10px;
  letter-spacing: .16em;
}

.cf-eyebrow--on-dark { color: var(--cf-cyan); }

/* --- Headings -------------------------------------------------------------- */
.cf-h2 {
  margin: 0;
  font-family: var(--cf-font-head);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: -.04em;
}

/* --- Pill buttons ----------------------------------------------------------- */
.cf-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-radius: var(--cf-radius-pill);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

/* Anchors inherit the document font; <button> does not, so it is set
   explicitly rather than for every pill. */
button.cf-btn { font-family: var(--cf-font-body); }

/* Solid Spark Cyan — the primary action. */
.cf-btn--primary {
  padding: 11px 11px 11px 28px;
  border: 0;
  background: var(--cf-cyan);
  color: var(--cf-ink);
  transition: transform .3s var(--cf-ease), background .3s ease;
}

.cf-btn--primary:hover {
  background: #7ED957;
  color: var(--cf-ink);
  transform: translateY(-3px);
}

/* Lift only, no colour shift — used by the inner templates. */
.cf-btn--lift {
  padding: 11px 11px 11px 28px;
  border: 0;
  background: var(--cf-cyan);
  color: var(--cf-ink);
  transition: transform .3s ease;
}

.cf-btn--lift:hover {
  transform: translateY(-3px);
  color: var(--cf-ink);
}

/* Outlined, for use on dark grounds. */
.cf-btn--ghost {
  gap: 10px;
  padding: 17px 28px;
  border: 1px solid var(--cf-line-light-28);
  background: transparent;
  color: var(--cf-white);
  transition: border-color .3s ease, background .3s ease;
}

.cf-btn--ghost:hover {
  border-color: var(--cf-cyan);
  background: rgba(0, 220, 185, .1);
  color: var(--cf-white);
}

/* Outlined on dark, border-colour shift only — inner templates. */
.cf-btn--ghost-line {
  gap: 10px;
  padding: 17px 28px;
  border: 1px solid var(--cf-line-light-28);
  background: transparent;
  color: var(--cf-white);
  transition: border-color .3s ease;
}

.cf-btn--ghost-line:hover {
  border-color: var(--cf-cyan);
  color: var(--cf-white);
}

/* Outlined, for use on light grounds; inverts on hover. */
.cf-btn--outline {
  gap: 12px;
  padding: 9px 9px 9px 24px;
  border: 1px solid var(--cf-line-ink-18);
  background: transparent;
  color: var(--cf-ink);
  font-size: 16px;
  white-space: nowrap;
  transition: all .3s ease;
}

.cf-btn--outline:hover {
  background: var(--cf-ink);
  color: var(--cf-white);
  border-color: var(--cf-ink);
}

/* Circular arrow that rides inside a pill button. */
.cf-btn__icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cf-ink);
  color: var(--cf-cyan);
}

.cf-btn__icon--sm {
  width: 34px;
  height: 34px;
}

/* Inverted: dark pill, cyan disc. */
.cf-btn__icon--cyan {
  background: var(--cf-cyan);
  color: var(--cf-ink);
}

.cf-btn__icon--veil {
  background: var(--cf-line-light-12);
  color: var(--cf-white);
}

/* --- Plain emphasised link ----------------------------------------------------- */
.cf-link {
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

/* --- Text link with a trailing arrow ----------------------------------------- */
.cf-textlink {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

/* --- Breadcrumb --------------------------------------------------------------
   Used on the legal and careers templates, always on a dark ground. */
.cf-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--cf-placeholder);
}

.cf-breadcrumb a {
  color: var(--cf-placeholder);
  text-decoration: none;
}

.cf-breadcrumb__current { color: var(--cf-white); }

/* --- Offer type badge ---------------------------------------------------------
   Dienstleistung / Webinar / Software, used on the pillar and services
   templates. */
.cf-badge {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: var(--cf-radius-pill);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cf-badge--service { background: var(--cf-cyan); }
.cf-badge--webinar { background: #7ED957; }
.cf-badge--software { background: var(--cf-yellow); }

/* --- Service card -----------------------------------------------------------
   Image, title, rotating arrow. Used on the homepage and the services
   overview. */
.cf-svc {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--cf-ink);
}

.cf-svc:hover { color: var(--cf-ink); }

.cf-svc__media {
  display: block;
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.cf-svc__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cf-svc__index {
  position: absolute;
  left: 16px;
  top: 16px;
  padding: 7px 14px;
  border-radius: var(--cf-radius-pill);
  background: rgba(255, 255, 255, .92);
  font-family: var(--cf-font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--cf-ink);
}

.cf-svc__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.cf-svc__title {
  font-family: var(--cf-font-head);
  font-weight: 700;
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: -.03em;
}

.cf-svc__arrow {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--cf-line-ink-18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all .4s var(--cf-ease);
}

.cf-svc:hover .cf-svc__arrow {
  background: var(--cf-ink);
  color: var(--cf-white);
  border-color: var(--cf-ink);
  transform: rotate(-45deg);
}

.cf-svc__text {
  display: block;
  margin-top: 12px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--cf-muted);
}

/* --- Post meta ------------------------------------------------------------------ */
.cf-postmeta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--cf-muted);
}

.cf-postmeta__cat {
  color: var(--cf-link);
  font-weight: 500;
}

/* --- Post grid -------------------------------------------------------------------- */
.cf-postgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.cf-postcard {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: var(--cf-ink);
}

.cf-postcard:hover { color: var(--cf-ink); }

.cf-postcard__media {
  display: block;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.cf-postcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cf-postcard__title {
  display: block;
  font-family: var(--cf-font-head);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.2;
  font-size: 21px;
}

.cf-postcard__text {
  display: block;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cf-muted);
}

@media (max-width: 1000px) {
  .cf-postgrid { grid-template-columns: 1fr; }
}

/* --- Image zoom on hover ------------------------------------------------------ */
.cf-zoom { overflow: hidden; }

.cf-zoom img { transition: transform var(--cf-zoom-duration) var(--cf-ease); }

.cf-zoom:hover img { transform: scale(var(--cf-zoom-scale)); }
