/* OE – Key Themes Building Foundation Shock: After (v1.3.0)
 * The After half of "The ground is shifting" in kt27-foundations-draft.html:
 * plan cards, button row and the building that lights up. Rules are the
 * combined block's (v1.0.1) After rules, in the same order, with the scope
 * .oe-kf-bfa (always "after", so .is-after is dropped); the switch and all
 * Before rules are left out. Values, keyframes, easings and breakpoints are
 * the prototype's. Framework classes and --oe-* tokens come from the site;
 * hex values are only fallbacks.
 */

/* 1. Page tokens (oe-kt-, oe-kf-), scoped to the block */
.oe-kf-bfa {
	--oe-kt-ease: cubic-bezier(.2, .8, .2, 1);
	--oe-kt-rule: color-mix(in srgb, var(--oe-color-heritage-blue, #003466) 12%, transparent);
	--oe-kt-shadow: 0 24px 48px -36px color-mix(in srgb, var(--oe-color-heritage-blue, #003466) 70%, transparent);
	/* campaign colours (creative guidelines; not in the site token set) */
	--oe-kf-inf: #E7A800;
	--oe-kf-yld: #B3107A;
	--oe-kf-steel: color-mix(in srgb, var(--oe-color-heritage-blue, #003466) 22%, var(--oe-color-primary-4, #ffffff));
	--oe-kf-glass: color-mix(in srgb, var(--oe-color-heritage-blue, #003466) 7%, var(--oe-color-primary-4, #ffffff));
	width: 100%;
	line-height: 1.5;
}
/* Prototype base: no margins on text elements (the theme adds some) */
.oe-kf-bfa :is(h2, h3, h4, p, ul, li, figure) { margin: 0; }

/* 2. Layout */
.oe-kf-bfa .oe-kf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(var(--oe-spacing-large, 2rem), 4vw, var(--oe-spacing-2xlarge, 4rem)); align-items: center; }

/* 3. Heading and intro (no switch above: the heading is the first thing in the block) */
.oe-kf-bfa .oe-kf-pane { display: flex; flex-direction: column; }
.oe-kf-bfa .oe-kf-pane .oe-kf-pane-h { margin-top: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.2; letter-spacing: .2px; color: var(--oe-color-heritage-blue, #003466); }
.oe-kf-bfa .oe-kf-pane > p { margin-top: 2px; font-size: .92rem; color: var(--oe-color-cool-grey, #455055); }

/* 4. List rows: small cards with a colour edge, a number badge; the active card lifts and fills a timer bar */
.oe-kf-bfa .oe-kf-rows { display: grid; gap: 8px; margin: var(--oe-spacing-small, .75rem) 0 0; padding: 0; list-style: none; }
.oe-kf-bfa .oe-kf-p1 .oe-kf-rows { --step: var(--oe-kf-step, 6s); } /* v1.1.0: from the block's "Seconds per floor" (prototype 1.85s) */
.oe-kf-bfa .oe-kf-rows li { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: var(--oe-spacing-small, .75rem); align-items: center; padding: 8px 14px 8px 16px; border: 1px solid var(--oe-kt-rule); border-radius: var(--oe-border-radius-base, 8px); background: var(--oe-color-primary-4, #ffffff); overflow: hidden; transition: background .35s, border-color .35s, box-shadow .35s, transform .45s var(--oe-kt-ease); }
.oe-kf-bfa .oe-kf-rows li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); opacity: .35; transition: opacity .35s; }
.oe-kf-bfa .oe-kf-rows li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); transform: scaleX(0); transform-origin: left; }
.oe-kf-bfa .oe-kf-rows li.is-hot { background: color-mix(in srgb, var(--c) 7%, var(--oe-color-primary-4, #ffffff)); border-color: color-mix(in srgb, var(--c) 45%, var(--oe-color-primary-4, #ffffff)); box-shadow: var(--oe-kt-shadow); transform: translateX(6px); }
.oe-kf-bfa .oe-kf-rows li.is-hot::before,
.oe-kf-bfa.is-found .oe-kf-p1 li::before { opacity: 1; }
.oe-kf-bfa .oe-kf-rows li.is-hot::after { transform: scaleX(1); transition: transform var(--step) linear; }
.oe-kf-bfa .oe-kf-rows i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, var(--oe-color-primary-4, #ffffff)); font-style: normal; font-size: var(--oe-font-size-small, .8rem); font-weight: 700; color: var(--c); transition: background .3s, color .3s; }
.oe-kf-bfa .oe-kf-rows li.is-hot i { background: var(--c); color: var(--oe-color-primary-4, #ffffff); }
.oe-kf-bfa .oe-kf-rows b { display: block; font-size: .95rem; font-weight: 600; color: var(--oe-color-heritage-blue, #003466); }
.oe-kf-bfa .oe-kf-rows span { display: block; font-size: .88rem; line-height: 1.4; color: var(--oe-color-cool-grey, #455055); }
.oe-kf-bfa .oe-kf-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--oe-spacing-small, .75rem); margin-top: var(--oe-spacing-large, 2rem); }
.oe-kf-bfa .oe-kf-ctrl,
.oe-kf-bfa .oe-kf-ctrl:hover,
.oe-kf-bfa .oe-kf-ctrl:focus { margin-left: auto; padding: 0; background: none; border: 0; font: inherit; font-size: var(--oe-font-size-small, .8rem); font-weight: 500; text-transform: none; letter-spacing: normal; color: var(--oe-color-cool-grey, #455055); cursor: pointer; }
.oe-kf-bfa .oe-kf-ctrl:hover { color: var(--oe-color-heritage-blue, #003466); }

/* 5. The building */
.oe-kf-bfa .oe-kf-art { position: relative; width: 100%; max-width: var(--oe-kf-art-max, 560px); margin: 0 0 0 auto; }
.oe-kf-bfa .oe-kf-art svg { display: block; width: 100%; height: auto; overflow: visible; font-family: 'Poppins', Arial, sans-serif; }
.oe-kf-bfa .oe-kf-in { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .7s var(--oe-kt-ease); transition-delay: var(--d, 0s); }
.oe-kf-bfa .is-built .oe-kf-in { opacity: 1; transform: none; }
.oe-kf-bfa .oe-kf-earth { fill: color-mix(in srgb, var(--oe-color-heritage-blue, #003466) 4%, var(--oe-color-primary-4, #ffffff)); }
.oe-kf-bfa .oe-kf-ground { stroke: var(--oe-color-heritage-blue, #003466); stroke-opacity: .45; stroke-width: 2; }
.oe-kf-bfa .oe-kf-shadow { fill: var(--oe-color-heritage-blue, #003466); opacity: .08; }
.oe-kf-bfa .oe-kf-slab { fill: color-mix(in srgb, var(--oe-color-sky-blue, #008AC8) 10%, var(--oe-color-primary-4, #ffffff)); stroke: var(--oe-color-sky-blue, #008AC8); stroke-width: 1.6; transition: fill .5s, stroke-width .5s; }
.oe-kf-bfa .oe-kf-slabtext { font-size: 10px; font-weight: 700; letter-spacing: 1.4px; fill: var(--oe-color-heritage-blue, #003466); }
.oe-kf-bfa .oe-kf-pile .p { stroke: var(--oe-color-sky-blue, #008AC8); stroke-width: 3; stroke-linecap: round; transition: stroke .4s; }
.oe-kf-bfa .oe-kf-pile text { font-size: 10.5px; font-weight: 600; fill: var(--oe-color-cool-grey, #455055); transition: fill .4s; }
.oe-kf-bfa .oe-kf-pile .ic { fill: var(--oe-color-primary-4, #ffffff); stroke: var(--oe-color-sky-blue, #008AC8); stroke-width: 1.6; transition: fill .4s, stroke .4s; }
.oe-kf-bfa .oe-kf-pile .ig { fill: none; stroke: var(--oe-color-sky-blue, #008AC8); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s; }
.oe-kf-bfa.is-found .oe-kf-pile .ic { fill: var(--oe-color-heritage-blue, #003466); stroke: var(--oe-color-heritage-blue, #003466); }
.oe-kf-bfa.is-found .oe-kf-pile .ig { stroke: var(--oe-color-primary-4, #ffffff); }
.oe-kf-bfa .oe-kf-slabtext { transition: opacity .4s ease; }
.oe-kf-bfa .oe-kf-pile .ig,
.oe-kf-bfa .oe-kf-pile text { transition: stroke .4s, fill .4s, opacity .4s; }
.oe-kf-bfa.is-found .oe-kf-slab { fill: color-mix(in srgb, var(--oe-color-sky-blue, #008AC8) 22%, var(--oe-color-primary-4, #ffffff)); stroke-width: 2.4; }
.oe-kf-bfa.is-found .oe-kf-pile .p { stroke: var(--oe-color-heritage-blue, #003466); }
.oe-kf-bfa.is-found .oe-kf-pile text { fill: var(--oe-color-heritage-blue, #003466); }
.oe-kf-bfa .oe-kf-lobby { fill: var(--oe-color-primary-4, #ffffff); stroke: var(--oe-kf-steel); stroke-width: 2; transition: stroke .4s, stroke-width .4s; }
.oe-kf-bfa .oe-kf-door { fill: var(--oe-kf-glass); stroke: var(--oe-kf-steel); stroke-width: 1.5; transition: stroke .4s; }
/* the lobby joins the plan to the foundations, so it takes the sky blue outline (no fill) when they light up */
.oe-kf-bfa.is-found .oe-kf-lobby { stroke: var(--oe-color-sky-blue, #008AC8); stroke-width: 2.5; }
.oe-kf-bfa.is-found .oe-kf-door { stroke: var(--oe-color-sky-blue, #008AC8); }
.oe-kf-bfa .oe-kf-shell { fill: var(--oe-color-primary-4, #ffffff); stroke: var(--oe-kf-steel); stroke-width: 2; }
.oe-kf-bfa .oe-kf-plate { fill: var(--oe-kf-steel); }
.oe-kf-bfa .oe-kf-roof { fill: var(--oe-kf-steel); }
.oe-kf-bfa .oe-kf-floor .edge { fill: var(--c); opacity: 0; transition: opacity .4s; }
.oe-kf-bfa .oe-kf-win { fill: var(--oe-kf-glass); transition: fill .35s ease; transition-delay: var(--w, 0s); }
.oe-kf-bfa .oe-kf-floor.is-lit .oe-kf-win { fill: color-mix(in srgb, var(--c) 70%, var(--oe-color-primary-4, #ffffff)); }
.oe-kf-bfa .oe-kf-floor.is-lit .edge { opacity: 1; }
.oe-kf-bfa .oe-kf-antenna { stroke: var(--oe-kf-steel); stroke-width: 2.5; stroke-linecap: round; }
.oe-kf-bfa .oe-kf-beacon { fill: var(--oe-color-primary, #00addc); transition: fill .4s; }
.oe-kf-bfa .oe-kf-glow { fill: var(--oe-color-primary, #00addc); opacity: 0; transform-box: fill-box; transform-origin: center; animation: oe-kf-glow 2.2s ease-in-out infinite; }
@keyframes oe-kf-glow { 0%, 100% { opacity: .15; transform: scale(1); } 50% { opacity: .35; transform: scale(1.35); } }
/* stage labels beside the building */
.oe-kf-bfa .oe-kf-tag { opacity: 0; transform: translateX(-8px); transition: opacity .4s ease, transform .45s var(--oe-kt-ease); }
.oe-kf-bfa .oe-kf-tag line { stroke: var(--c); stroke-width: 1.5; }
.oe-kf-bfa .oe-kf-tag circle { fill: var(--c); }
.oe-kf-bfa .oe-kf-tag text { font-size: 11px; font-weight: 700; letter-spacing: 1px; fill: var(--c); }
.oe-kf-bfa .oe-kf-tag text.t { font-size: 12.5px; letter-spacing: 0; fill: var(--oe-color-heritage-blue, #003466); }
.oe-kf-bfa .oe-kf-tag.is-on { opacity: 1; transform: none; }
.oe-kf-bfa .oe-kf-caption { font-size: 11px; font-weight: 700; letter-spacing: 2px; fill: var(--oe-color-sky-blue, #008AC8); }

/* 6. Responsive (the prototype's breakpoints) */
@media (max-width: 960px) {
	.oe-kf-bfa .oe-kf-grid { grid-template-columns: minmax(0, 1fr); }
	.oe-kf-bfa .oe-kf-art { order: -1; max-width: var(--oe-kf-art-max-sm, 460px); margin: 0 auto var(--oe-spacing-medium, 1.5rem); }
}
@media (max-width: 640px) {
	.oe-kf-bfa .oe-kf-ctrl,
	.oe-kf-bfa .oe-kf-ctrl:hover,
	.oe-kf-bfa .oe-kf-ctrl:focus { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.oe-kf-bfa, .oe-kf-bfa *, .oe-kf-bfa *::before, .oe-kf-bfa *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}
