/* Heineken case figures, in the same hand as case-figures.css (loaded after it).
   Only the three compositions live here; ground, cards, lift and type are shared. */

.cf { --case-ink: #097E3A; }

.cf .cfh-note { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--cf-quiet); max-width: 34ch; }

/* ---------- 1. scattered markets, one core lifted ---------- */
.cfh1 {
  width: 100%; max-width: 820px;
  display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); align-items: center;
}
.cfh1__src .cf__k { margin: 0 0 18px 4px; }
.cfh1__bits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cfh1 .cfh1__bit { padding: 13px 14px; }
.cfh1 .cfh1__bit .cf-card__n { margin-top: 0; font-size: 14px; }
.cfh1 .cfh1__bit .cf-card__s { font-size: 11.5px; }
.cfh1__bit:nth-child(1) { transform: rotate(-3deg); z-index: 1; margin: 0 -6px 0 0; }
.cfh1__bit:nth-child(2) { transform: rotate(2deg); z-index: 2; margin: 22px 0 0 0; }
.cfh1__bit:nth-child(3) { transform: rotate(1.5deg); z-index: 3; margin: -8px 4px 0 10px; }
.cfh1__bit:nth-child(4) { transform: rotate(-2deg); z-index: 1; margin: 10px 6px 0 -8px; }

.cfh1__to { position: relative; align-self: center; height: 1.5px; margin: 0 12px; background: var(--cf-line); }
.cfh1__to::after {
  content: ""; position: absolute; right: 0; top: 50%; width: 7px; height: 7px;
  border: solid var(--cf-marker); border-width: 1.5px 1.5px 0 0; transform: translate(0, -50%) rotate(45deg);
}

.cfh1__out { display: grid; }
.cfh1__out .cf__k { margin: 0 0 12px 4px; }
.cfh1__layers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 18px; }
.cfh1 .cfh1__layer { padding: 12px 14px 28px; border-radius: 12px 12px 0 0; }
.cfh1 .cfh1__layer .cf-card__n { margin-top: 0; font-size: 14px; }
.cfh1 .cfh1__layer .cf-card__s { font-size: 11.5px; }
.cfh1 .cfh1__layer--next { background: var(--cf-soft); }
.cfh1 .cfh1__core { margin-top: -16px; }
.cfh1 .cfh1__core .cf-hi__n { margin-top: 0; }
.cfh1 .cfh-note { margin: 18px 0 0 4px; }

@container (max-width: 699px) {
  .cfh1 { grid-template-columns: 1fr; grid-template-rows: auto 52px auto; max-width: 420px; }
  .cfh1__src .cf__k { margin-bottom: 14px; }
  .cfh1 .cfh1__bit { padding: 11px 12px; }
  .cfh1 .cfh1__bit .cf-card__n { font-size: 13.5px; }
  .cfh1__to { justify-self: center; width: 1.5px; height: 28px; margin: 0; }
  .cfh1__to::after { right: auto; top: auto; bottom: 0; left: 50%; transform: translate(-50%, 0) rotate(135deg); }
  .cfh1__layers { margin: 0 14px; }
}

/* ---------- 2. two rooms, the alignment lifted between them ---------- */
.cfh2 {
  width: 100%; max-width: 860px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr) minmax(0, 1fr); align-items: center;
}
.cfh2__side { position: relative; z-index: 1; padding: 18px 20px 20px; }
.cfh2__side--a { padding-right: 40px; align-self: start; }
.cfh2__side--b { padding-left: 40px; align-self: end; }
.cfh2__side .cf__k { margin-bottom: 12px; }
.cfh2__list { list-style: none; margin: 0; padding: 0; display: grid; }
.cfh2__list li { padding: 9px 0; display: flex; flex-direction: column; gap: 3px; }
.cfh2__list li + li { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--cf-rule) 45%, transparent); }
.cfh2__n { font-size: 13.5px; line-height: 1.3; font-weight: 500; color: var(--cf-text); }
.cfh2__s { font-family: var(--cf-mono); font-size: 11.5px; line-height: 1.35; color: var(--cf-quiet); }
.cfh2 .cfh2__hub { margin: 0 -24px; text-align: left; }
.cfh2__ic { display: block; width: 18px; height: 18px; color: var(--cf-ink); }
.cfh2 .cfh2__hub .cf-hi__n { margin-top: 12px; }

@container (max-width: 699px) {
  .cfh2 { grid-template-columns: 1fr; max-width: 420px; align-items: stretch; }
  .cfh2__side--a { padding: 16px 18px 36px; margin-right: 22px; }
  .cfh2__side--b { padding: 36px 18px 16px; margin-left: 22px; }
  .cfh2 .cfh2__hub { margin: -22px 0 -22px 34px; }
}

/* ---------- 3. the window, with V1 lifted inside it ---------- */
.cfh3 {
  --cut: 60%;
  position: relative; width: 100%; max-width: 820px;
  display: grid; grid-template-columns: minmax(0, var(--cut)) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto; column-gap: 0;
}
.cfh3__win { /* the window: a soft band that ends at the deadline */
  grid-area: 1 / 1 / 4 / 2; border-radius: 14px 0 0 14px;
  background: color-mix(in srgb, var(--cf-card) 34%, transparent);
  box-shadow: inset -1.5px 0 0 var(--cf-marker);
}
.cfh3__lic { grid-area: 1 / 1; padding: 20px 22px 18px; }
.cfh3 .cfh3__licn { font-size: 15px; line-height: 1.25; font-weight: 600; color: var(--cf-text); margin-top: 6px; }
.cfh3 .cfh3__lics { font-family: var(--cf-mono); font-size: 12px; line-height: 1.4; color: var(--cf-quiet); margin-top: 4px; }
.cfh3__amb { grid-area: 2 / 1 / 3 / 3; margin: 0 18% 0 22px; padding-bottom: 26px; position: relative; z-index: 1; }
.cfh3 .cfh3__amb .cf-card__n { margin-top: 4px; }
.cfh3__v1 { grid-area: 3 / 1; margin: -12px 26px 24px 12px; align-self: start; }
.cfh3__p2 {
  grid-area: 3 / 2; align-self: center; justify-self: start; margin: 0 0 0 22px; padding: 14px 16px; border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cf-line) 70%, transparent);
}
.cfh3 .cfh3__p2 .cf-card__n { margin-top: 0; color: var(--cf-quiet); font-weight: 500; }
.cfh3 .cfh3__note { grid-area: 4 / 1 / 5 / 3; margin: 22px 0 0 4px; max-width: 60ch; }

@container (max-width: 699px) {
  .cfh3 { grid-template-columns: minmax(0, 1fr); max-width: 440px; }
  .cfh3__win { grid-area: 1 / 1 / 4 / 2; margin-right: 12%; }
  .cfh3__lic { padding: 16px 14px 14px; }
  .cfh3__amb { grid-area: 2 / 1; margin: 0 0 0 10px; padding: 14px 14px 24px; }
  .cfh3__v1 { grid-area: 3 / 1; margin: -12px calc(12% + 10px) 16px 4px; padding: 16px 16px 18px; }
  .cfh3__p2 { grid-area: 4 / 1; justify-self: end; margin: 18px 0 0; padding: 12px 14px; }
  .cfh3 .cfh3__note { grid-area: 5 / 1; margin-top: 20px; }
}

/* ---------- the demo: the fortnightly cycle, the current step lifted ---------- */
.cycle {
  --case-ink: #097E3A;
  --cf-card: #fff; --cf-soft: #F2EFE9; --cf-rule: #CFCBC3; --cf-line: #B3AC9F; --cf-marker: #8A8479;
  --cf-ink: var(--case-ink); --cf-text: #1f1e1b; --cf-quiet: #5f5a51; --cf-mono: "JetBrains Mono", ui-monospace, monospace;
  --cf-rest: 0 1px 2px rgba(61,56,46,.06), 0 8px 24px -8px rgba(61,56,46,.10);
  --cf-lift: 0 2px 4px rgba(61,56,46,.08), 0 12px 28px -6px rgba(61,56,46,.16);
}
.cycle .cycle__stage {
  container-type: inline-size; cursor: pointer;
  background: #E7E2D8; border: 0; border-radius: 12px;
  padding: clamp(24px, 6vw, 48px) clamp(16px, 5vw, 44px);
}

/* the cities: one quiet strip, lifted when the cycle is back with them */
.cycle .cycle__cities {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  background: color-mix(in srgb, var(--cf-card) 55%, transparent); border-radius: 12px;
  transition: background .3s ease, box-shadow .3s ease, transform .3s ease;
}
.cycle .cycle__city { border: 0; border-radius: 0; background: none; padding: 14px 16px; }
.cycle .cycle__city + .cycle__city { box-shadow: inset 1px 0 0 color-mix(in srgb, var(--cf-rule) 60%, transparent); }
.cycle .cycle__city-name { font-size: 14px; font-weight: 600; color: var(--cf-text); }
.cycle .cycle__city-sub { font-family: var(--cf-mono); font-size: 11.5px; letter-spacing: 0; color: var(--cf-quiet); margin-top: 5px; }
.cycle[data-step="0"] .cycle__cities {
  background: var(--cf-card); border-radius: 16px; transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--cf-rule), var(--cf-lift);
}
.cycle[data-step="0"] .cycle__city-sub { color: var(--cf-ink); }

.cycle .cycle__feed { color: var(--cf-marker); margin: 16px 0 18px 14px; padding: 0; }
.cycle .cycle__feed svg { width: 16px; height: 16px; }
.cycle .cycle__feed-label { font-family: inherit; font-size: 13px; letter-spacing: 0; font-weight: 500; color: var(--cf-quiet); }

/* the loop: quiet steps, the current one lifted */
.cycle .cycle__loop { flex-direction: row; align-items: stretch; gap: 8px; }
.cycle .cycle__node {
  border: 0; border-radius: 12px; padding: 14px 14px 16px;
  background: color-mix(in srgb, var(--cf-card) 55%, transparent); box-shadow: none;
  transition: background .3s ease, box-shadow .3s ease, transform .3s ease;
}
.cycle .cycle__node:hover { transform: none; background: color-mix(in srgb, var(--cf-card) 80%, transparent); box-shadow: none; }
.cycle .cycle__node-tag { font-family: var(--cf-mono); font-size: 11.5px; letter-spacing: 0; color: var(--cf-quiet); margin: 0 0 8px; }
.cycle .cycle__node-name { font-size: 15px; line-height: 1.25; font-weight: 600; color: var(--cf-text); }
.cycle .cycle__node-desc { font-size: 12.5px; line-height: 1.45; color: var(--cf-quiet); margin-top: 6px; }
.cycle .cycle__node.is-active, .cycle .cycle__node.is-active:hover {
  position: relative; z-index: 2; background: var(--cf-card); border-radius: 16px; transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--cf-rule), var(--cf-lift);
}
.cycle .cycle__node.is-active .cycle__node-tag { color: var(--cf-ink); }
.cycle .cycle__node:focus-visible { outline: 2px solid var(--cf-ink); outline-offset: 2px; }
.cycle .cycle__arrow { transform: none; margin: 0; color: var(--cf-marker); }
.cycle .cycle__arrow svg { width: 16px; height: 16px; }

.cycle .cycle__return { margin: 22px 0 0 2px; font-size: 13.5px; line-height: 1.45; font-weight: 500; color: var(--cf-quiet); }
.cycle .cycle__return-icon { color: var(--cf-ink); }

@container (max-width: 619px) {
  .cycle .cycle__loop { flex-direction: column; gap: 4px; }
  .cycle .cycle__arrow { transform: rotate(90deg); margin: 0; }
  .cycle .cycle__node { padding: 14px 16px; }
  .cycle .cycle__node.is-active { transform: none; margin: 0 -6px; }
  .cycle .cycle__city { padding: 12px 12px; }
}
@container (max-width: 299px) {
  .cycle .cycle__cities { grid-template-columns: 1fr; }
  .cycle .cycle__city + .cycle__city { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--cf-rule) 60%, transparent); }
  .cycle .cycle__city { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cycle .cycle__node, .cycle .cycle__cities { transition: none; }
}
