/* ============================================================
   Breakdown — page-only styles
   The plumb-line hero, the four-sources merge window, the path
   step cards on a plumb line, stacked rule cards with small
   illustrations, and the three-layer map tiles. Loaded only by
   breakdown.html, after custom.css.

   Palette: navy, orange, white only (see the site's three-color
   rule). Hidden/start states only apply under html.bk-motion (set
   by breakdown.js when main.js's js-reveal is on and reduced
   motion is off), so without JS every element shows its finished
   state.
   ============================================================ */

:root {
  --bk-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --bk-navy: #0f172a;
  --bk-orange: #FE5D01;
  --bk-orange-dk: #C24600;
  --bk-orange-lt: #FE8A39;
}

/* ---------- Hero: the plumb line ---------- */

.bk-hero {
  background-image:
    radial-gradient(ellipse 45% 55% at 78% 45%, rgba(254, 93, 1, 0.14), transparent 70%),
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
}

.bk-drift {
  transform: translateY(calc(var(--s, 0) * -48px));
  opacity: calc(1 - var(--s, 0) * 0.5);
}

/* The crane build. Under .bk-motion the layers wait off the hook
   (breakdown.js carries each one in) and the stack stays closed;
   .is-built on .bd-explode then plays custom.css's drift-apart. */
.bk-motion .bk-lift {
  opacity: 0;
}

.bk-motion .bd-explode:not(.is-built) .bd-slab-1 {
  animation: none;
  transform: translateY(48px);
}

.bk-motion .bd-explode:not(.is-built) .bd-slab-3 {
  animation: none;
  transform: translateY(-48px);
}

.bk-motion .bd-explode.is-built .bd-slab-1 {
  animation: bd-slab-up 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s both;
}

.bk-motion .bd-explode.is-built .bd-slab-3 {
  animation: bd-slab-down 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s both;
}


.bk-leg {
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  border-radius: 0 0.625rem 0.625rem 0;
  transition: background-color 0.5s ease;
}

.bk-leg.is-lit { background-color: rgba(255, 255, 255, 0.07); }
.bk-leg-2.is-lit { background-color: rgba(254, 93, 1, 0.14); }

/* ---------- What it does: four sources, one screen ---------- */

.bk-why {
  overflow-x: clip;
}

.bk-merge {
  position: relative;
  padding: 1.5rem;
}

/* A dark product window, like the screens on the Features page */
.bk-merge-frame {
  position: relative;
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    #0b1120;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), 0 40px 70px -34px rgba(15, 23, 42, 0.6), 0 30px 80px -50px rgba(254, 93, 1, 0.5);
  transition: border-color 0.8s ease, box-shadow 0.8s ease, background-color 0.8s ease;
}

.bk-merge-bar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  transition: opacity 0.6s ease 0.5s;
}

.bk-merge-bar span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #334155;
}

.bk-merge-bar p {
  margin-left: auto;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #FE8A39;
}

.bk-merge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
  padding: 1rem;
}

.bk-slip {
  position: relative;
  min-height: 7.5rem;
  padding: 1rem 1rem 1rem 1.125rem;
  border-radius: 0.875rem;
  background: #131c2f;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transition:
    transform 1.1s var(--bk-ease) calc(var(--d) * 110ms),
    opacity 0.6s ease calc(var(--d) * 110ms),
    border-color 0.3s ease,
    box-shadow 0.4s ease;
}

.bk-slip::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #FE5D01;
}

.bk-slip-icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: #FE8A39;
  background: rgba(254, 93, 1, 0.14);
}

.bk-slip-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.bk-slip-label {
  margin-top: 0.625rem;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.1;
  color: #ffffff;
}

.bk-slip-line {
  display: block;
  height: 0.375rem;
  margin-top: 0.5rem;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.22);
}

.bk-slip:hover {
  border-color: rgba(254, 93, 1, 0.45);
  box-shadow: 0 14px 30px -14px rgba(254, 93, 1, 0.45);
}

.bk-motion .bk-merge:not(.is-on) .bk-slip {
  opacity: 0;
  transform: translate(var(--sx), var(--sy)) rotate(var(--sr)) scale(0.92);
}

.bk-motion .bk-merge:not(.is-on) .bk-merge-frame {
  border-color: transparent;
  background-color: transparent;
  box-shadow: none;
}

.bk-motion .bk-merge:not(.is-on) .bk-merge-bar {
  opacity: 0;
}

/* ---------- How it works: step cards on the plumb line ---------- */

.bk-path-sec {
  border-top: 1px solid #e2e8f0;
  background:
    radial-gradient(ellipse 40% 50% at 0% 100%, rgba(254, 93, 1, 0.06), transparent 70%),
    #f8fafc;
  overflow-x: clip;
}

.bk-steps {
  display: grid;
  gap: 1.25rem;
}

.bk-step {
  position: relative;
  display: grid;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition:
    transform 0.9s var(--bk-ease),
    opacity 0.6s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

/* Navy band with a blueprint grid; the current step's band warms to orange */
.bk-step-band {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  border-radius: 1.2rem 1.2rem 0 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(148, 163, 184, 0.1) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px) 0 0 / 16px 16px,
    #0f172a;
}

.bk-step-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(135deg, #FE5D01, #C24600);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.bk-step.is-current .bk-step-band::before { opacity: 1; }

.bk-step-num,
.bk-step-label {
  position: relative;
}

.bk-step-num {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: #ffffff;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1;
  color: #0f172a;
  transition: color 0.4s ease;
}

.bk-step.is-current .bk-step-num { color: #C24600; }

/* dashed ring that turns on hover and on the current step */
.bk-step-num::after {
  content: "";
  position: absolute;
  inset: -0.45rem;
  border-radius: 9999px;
  border: 2px dashed rgba(255, 255, 255, 0.55);
}

.bk-step-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
}

.bk-step-body {
  padding: 1.75rem;
}

.bk-step:hover {
  border-color: #cbd5e1;
  box-shadow: 0 24px 44px -26px rgba(15, 23, 42, 0.45);
  transform: translateY(-4px);
}

.bk-step:hover .bk-step-num::after,
.bk-step.is-current .bk-step-num::after {
  animation: bk-spin 9s linear infinite;
}

.bk-step.is-current {
  border-color: rgba(254, 93, 1, 0.45);
  box-shadow: 0 26px 50px -28px rgba(254, 93, 1, 0.55);
}

@keyframes bk-spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 768px) {
  .bk-step {
    grid-template-columns: 12rem 1fr;
  }

  .bk-step-band {
    flex-direction: column;
    justify-content: center;
    gap: 1.1rem;
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 1.2rem 0 0 1.2rem;
  }

  .bk-step-num {
    width: 5.5rem;
    height: 5.5rem;
    font-size: 2.5rem;
  }

  .bk-step-body {
    padding: 2.25rem;
  }
}

/* slide in from alternating sides */
.bk-motion .bk-step:not(.is-on) {
  opacity: 0;
  transform: translateX(var(--dx));
}

/* The plumb line down the left: a dashed string that fills orange
   as you scroll, with the bob hanging at the end of it. */
.bk-journey {
  --g: 2.5rem;  /* gutter left of the cards */
  --t: 0.75rem; /* line x */
  --fill: 0px;
  position: relative;
  padding-left: var(--g);
}

.bk-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--t);
  width: 2px;
  background: repeating-linear-gradient(to bottom, #cbd5e1 0 4px, transparent 4px 10px);
}

.bk-track-fill {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--fill);
  background: #FE5D01;
}

.bk-track-bob {
  position: absolute;
  left: 50%;
  top: var(--fill);
  width: 1.25rem;
  height: 2.125rem;
  margin-left: -0.625rem;
  transform-origin: 50% 0;
  transform: rotate(var(--sway, 0deg));
  filter: drop-shadow(0 6px 6px rgba(194, 70, 0, 0.35));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bk-track-bob svg {
  display: block;
  width: 100%;
  height: 100%;
}

.bk-journey.has-bob .bk-track-bob { opacity: 1; }

/* Each step is a level mark on the line: a small diamond that
   fills orange once the line has passed it. */
.bk-step::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 2.6rem;
  left: calc(var(--t) + 1px - var(--g) - 0.45rem);
  width: 0.9rem;
  height: 0.9rem;
  background: #ffffff;
  border: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.bk-step.is-passed::before {
  background: #FE5D01;
  border-color: #FE5D01;
}

.bk-step.is-current::before {
  box-shadow: 0 0 0 5px rgba(254, 93, 1, 0.2);
}

@media (min-width: 768px) {
  .bk-journey {
    --g: 4rem;
    --t: 1.5rem;
  }

  .bk-step::before {
    top: 50%;
    margin-top: -0.45rem;
  }
}

/* ---------- Rules: stacked cards ---------- */

.bk-rules {
  position: relative;
  background-color: #0b1120;
  background-image:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(254, 93, 1, 0.14), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 100%, rgba(254, 93, 1, 0.1), transparent 70%),
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
}

.bk-rules .eyebrow {
  border-color: rgba(254, 93, 1, 0.35);
  background-color: rgba(254, 93, 1, 0.08);
  color: #FE8A39;
}

.bk-stack {
  display: grid;
  gap: 1.25rem;
}

.bk-rule {
  --p: 0;
  position: relative;
  display: grid;
  gap: 1.75rem;
  padding: 1.75rem;
  border-radius: 1.75rem;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--edge, transparent);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.1) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transform-origin: 50% 0;
  transform: scale(calc(1 - var(--p) * 0.06));
  filter: brightness(calc(1 - var(--p) * 0.35));
}

/* Card colors: orange, navy, white. Body text contrast checked
   against each background (all at or above 4.5:1). */
.bk-rule-orange { --bg: linear-gradient(135deg, #C24600, #8A3200); --ink: #ffffff; --muted: #FFE4CC; --accent: #FFD5A9; --panel: rgba(255, 255, 255, 0.1); --line: rgba(255, 255, 255, 0.22); }
.bk-rule-navy   { --bg: linear-gradient(135deg, #1e293b, #0f172a); --ink: #ffffff; --muted: #cbd5e1; --accent: #FE8A39; --panel: rgba(255, 255, 255, 0.05); --line: rgba(254, 93, 1, 0.28); --edge: rgba(148, 163, 184, 0.16); }
.bk-rule-white  { --bg: #ffffff; --ink: #0f172a; --muted: #475569; --accent: #C24600; --panel: #f8fafc; --line: #e2e8f0; --edge: #e2e8f0; }

.bk-rule-num {
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 5rem;
  font-weight: 700;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}

.bk-rule-title {
  margin-top: 1rem;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.01em;
}

.bk-rule-text {
  margin-top: 1rem;
  max-width: 30rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
}

.bk-shot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 15rem;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
}

@media (min-width: 768px) {
  .bk-stack {
    gap: 2.5rem;
    padding-bottom: 2rem;
  }

  .bk-rule {
    position: sticky;
    top: calc(6.5rem + var(--i) * 0.9rem);
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 2.5rem;
    min-height: 24rem;
    padding: 2.75rem;
  }

  .bk-rule-num { font-size: 7.5rem; }
  .bk-rule-title { font-size: 3rem; }
  .bk-shot { min-height: 18rem; }
}

/* Shared tiny document glyph */
.bk-doc {
  position: relative;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.9rem;
  border-radius: 0.25rem;
  background: currentColor;
  opacity: 0.9;
}

.bk-doc::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: 32%;
  height: 40%;
  background: repeating-linear-gradient(to bottom, var(--doc-ink, rgba(0, 0, 0, 0.35)) 0 2px, transparent 2px 5px);
}

.bk-doc-lg {
  width: 2.75rem;
  height: 3.5rem;
}

/* 01 — approved invoices */
.bk-inv {
  width: 100%;
  max-width: 21rem;
  display: grid;
  gap: 0.625rem;
}

.bk-inv-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  color: #C24600;
  --doc-ink: rgba(255, 255, 255, 0.7);
  transition: transform 0.7s var(--bk-ease) calc(var(--d) * 140ms), opacity 0.5s ease calc(var(--d) * 140ms), background-color 0.5s ease 0.9s;
}

.bk-inv-name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}

.bk-pill {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
}

.bk-pill-ok { background: #0f172a; color: #ffffff; }
.bk-pill-wait { background: #f1f5f9; color: #475569; }

.bk-inv-out {
  background: rgba(255, 255, 255, 0.2);
  border: 1px dashed rgba(255, 255, 255, 0.6);
  transform: translateX(1.25rem);
}

.bk-inv-out .bk-inv-name { color: #ffffff; text-decoration: line-through; }
.bk-inv-out .bk-doc { color: rgba(255, 255, 255, 0.7); }

.bk-inv-sum {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFE4CC;
}

.bk-inv-count { color: #ffffff; font-weight: 600; }

.bk-motion .bk-rule:not(.is-on) .bk-inv-row {
  opacity: 0;
  transform: translateY(14px);
}

.bk-motion .bk-rule:not(.is-on) .bk-inv-out {
  background: rgba(255, 255, 255, 0.95);
}

/* 02 — trace to a document */
.bk-trace {
  position: relative;
  width: 100%;
  max-width: 22rem;
  height: 13rem;
  color: var(--accent);
}

.bk-trace-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bk-trace-lines path {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s var(--bk-ease) 0.35s;
}

.bk-motion .bk-rule:not(.is-on) .bk-trace-lines path {
  stroke-dashoffset: 1;
}

.bk-trace-figure {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 0 0 6px rgba(254, 93, 1, 0.2);
}

.bk-trace-k {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f172a;
}

.bk-trace-v {
  display: block;
  width: 5.5rem;
  height: 0.6rem;
  border-radius: 9999px;
  background: #0f172a;
}

.bk-trace-doc {
  position: absolute;
  left: var(--x);
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  --doc-ink: rgba(15, 23, 42, 0.45);
  transition: transform 0.6s var(--bk-ease) 1.1s, opacity 0.5s ease 1.1s;
}

.bk-trace-doc .bk-doc { color: var(--accent); }

.bk-motion .bk-rule:not(.is-on) .bk-trace-doc {
  opacity: 0;
  transform: translate(-50%, 10px);
}

/* 03 — tape measure */
.bk-tape {
  position: relative;
  width: 100%;
  max-width: 22rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.bk-tape-case {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1.25rem;
  background: #0f172a;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.3);
}

.bk-tape-case span {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 5px solid #FE5D01;
}

.bk-tape-blade {
  position: relative;
  flex: 1;
  height: 2.25rem;
  margin-top: 1.75rem;
  border-radius: 0 0.25rem 0.25rem 0;
  background: #FE5D01;
  border: 1px solid rgba(15, 23, 42, 0.25);
  border-left: 0;
  transform-origin: 0 50%;
  transition: transform 1.2s var(--bk-ease) 0.2s;
}

.bk-tape-ticks {
  position: absolute;
  inset: 0 0 auto 0;
  height: 60%;
  background:
    repeating-linear-gradient(90deg, #0f172a 0 1.5px, transparent 1.5px 30px),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.5) 0 1px, transparent 1px 7.5px);
  background-size: auto 100%, auto 50%;
  background-repeat: repeat-x;
}

.bk-tape-blade::after {
  content: "";
  position: absolute;
  right: -0.375rem;
  top: -0.25rem;
  bottom: -0.25rem;
  width: 0.375rem;
  border-radius: 0 0.2rem 0.2rem 0;
  background: #0f172a;
}

.bk-tape-label {
  flex-basis: 100%;
  margin-top: 1.25rem;
  text-align: right;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #C24600;
  transition: opacity 0.5s ease 1.2s;
}

.bk-motion .bk-rule:not(.is-on) .bk-tape-blade { transform: scaleX(0.04); }
.bk-motion .bk-rule:not(.is-on) .bk-tape-label { opacity: 0; }

/* 04 — same total everywhere */
.bk-same {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 24rem;
}

.bk-same-tile {
  padding: 0.875rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  text-align: center;
}

.bk-same-tile p {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0f172a;
}

.bk-same-bar {
  display: block;
  height: 0.55rem;
  margin: 0.625rem auto 0;
  width: 80%;
  border-radius: 9999px;
  background: #FE5D01;
  transform-origin: 0 50%;
  transition: transform 0.9s var(--bk-ease) calc(0.2s + var(--d) * 0.12s);
}

.bk-same-eq {
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  transition: transform 0.5s var(--bk-ease) 1.1s, opacity 0.4s ease 1.1s;
}

.bk-motion .bk-rule:not(.is-on) .bk-same-bar { transform: scaleX(0); }
.bk-motion .bk-rule:not(.is-on) .bk-same-eq { opacity: 0; transform: scale(0.4); }

/* 05 — two-minute clock */
.bk-clock {
  position: relative;
  width: 12rem;
  height: 12rem;
}

.bk-clock svg {
  width: 100%;
  height: 100%;
}

.bk-clock-track {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 10;
}

.bk-clock-ring {
  stroke: #FE5D01;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s cubic-bezier(0.45, 0, 0.25, 1) 0.2s;
}

.bk-motion .bk-rule:not(.is-on) .bk-clock-ring { stroke-dashoffset: 1; }

.bk-clock-read {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.bk-clock-time {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.bk-clock-sub {
  margin-top: 0.5rem;
  max-width: 7rem;
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
}

/* ---------- The map: three layer tiles ---------- */

.bk-map-sec {
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  overflow-x: clip;
}

.bk-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: 1.5rem;
  overflow: hidden;
  transition:
    transform 0.9s var(--bk-ease) calc(var(--d) * 120ms),
    opacity 0.6s ease calc(var(--d) * 120ms),
    box-shadow 0.3s ease;
}

.bk-tile-head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.bk-tile-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
}

.bk-tile-icon svg {
  width: 2.25rem;
  height: 2.25rem;
  transition: transform 0.4s var(--bk-ease);
}

/* the layer icon lifts when you hover its tile */
.bk-tile:hover .bk-tile-icon svg {
  transform: translateY(-4px);
}

.bk-tile-title {
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 1.875rem;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.05;
}

.bk-tile-rows {
  margin-top: 1.5rem;
}

.bk-mrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--row-line);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--row-ink);
  transition: color 0.2s ease;
}

.bk-mrow .nav-dd-num {
  color: var(--row-num);
}

.bk-mrow::after {
  content: "→";
  margin-left: auto;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bk-mrow:hover::after,
.bk-mrow:focus-visible::after {
  opacity: 1;
  transform: none;
}

.bk-mrow:focus-visible {
  outline: 2px solid var(--row-num);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* Field: white with a navy blueprint strip */
.bk-tile-field {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 30px 50px -36px rgba(15, 23, 42, 0.45);
  padding-top: 0;
  --row-line: #f1f5f9;
  --row-ink: #0f172a;
  --row-num: #C24600;
}

.bk-tile-field .bk-tile-strip {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin: 0 -1.75rem 0;
  padding: 1.25rem 1.75rem;
  background:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px) 0 0 / 16px 16px,
    #0f172a;
}

.bk-tile-field .bk-tile-icon { background: rgba(255, 255, 255, 0.08); }
.bk-tile-field .bk-tile-title { color: #ffffff; }
.bk-tile-field .bk-mrow:hover { color: #C24600; }

/* Office: solid orange */
.bk-tile-office {
  background: linear-gradient(140deg, #C24600, #993800);
  box-shadow: 0 30px 50px -30px rgba(153, 56, 0, 0.8);
  --row-line: rgba(255, 255, 255, 0.18);
  --row-ink: #ffffff;
  --row-num: #FFD5A9;
}

.bk-tile-office .bk-tile-icon { background: rgba(255, 255, 255, 0.15); }
.bk-tile-office .bk-tile-title { color: #ffffff; }
.bk-tile-office .bk-mrow:hover { color: #FFE4CC; }

/* Books: navy */
.bk-tile-books {
  background:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(140deg, #1e293b, #0f172a);
  box-shadow: 0 30px 50px -30px rgba(15, 23, 42, 0.8);
  --row-line: rgba(148, 163, 184, 0.18);
  --row-ink: #ffffff;
  --row-num: #FE8A39;
}

.bk-tile-books .bk-tile-icon { background: rgba(255, 255, 255, 0.08); }
.bk-tile-books .bk-tile-title { color: #ffffff; }
.bk-tile-books .bk-mrow:hover { color: #FE8A39; }

.bk-motion .bk-map-grid:not(.is-on) .bk-tile {
  opacity: 0;
  transform: translateY(2.5rem) scale(0.96);
}

.bk-map-grid.is-on .bk-tile:hover {
  transform: translateY(-5px);
  transition-delay: 0s;
}

/* ---------- On-this-page rail ---------- */

.bk-rail {
  display: none;
}

@media (min-width: 1400px) {
  .bk-rail {
    position: fixed;
    z-index: 40;
    right: 1.5rem;
    top: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.25rem;
    padding: 0.25rem 0;
    transform: translate(0.75rem, -50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s var(--bk-ease), visibility 0s linear 0.4s;
  }

  .bk-rail.is-shown {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
    transition-delay: 0s;
  }
}

.bk-rail-line {
  position: absolute;
  right: 0.5rem;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 2px;
  margin-right: -1px;
  background: rgba(148, 163, 184, 0.45);
  border-radius: 9999px;
}

.bk-rail-fill {
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(var(--rail, 0) * 100%);
  background: #FE5D01;
  border-radius: inherit;
}

.bk-rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.bk-rail-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: #ffffff;
  border: 2px solid #94a3b8;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.bk-rail-label {
  padding: 0.3rem 0.6rem;
  border-radius: 9999px;
  background: #0f172a;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bk-rail-link:hover .bk-rail-label,
.bk-rail-link:focus-visible .bk-rail-label,
.bk-rail-link.is-active .bk-rail-label {
  opacity: 1;
  transform: none;
}

.bk-rail-link.is-active .bk-rail-dot {
  background: #FE5D01;
  border-color: #ffffff;
  transform: scale(1.2);
}

.bk-rail-link:focus-visible {
  outline: none;
}

.bk-rail-link:focus-visible .bk-rail-dot {
  outline: 2px solid #FE5D01;
  outline-offset: 3px;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .bk-rule { transform: none; filter: none; }
  .bk-step-num::after,
  .bk-step:hover .bk-step-num::after,
  .bk-step.is-current .bk-step-num::after { animation: none; }
  .bk-drift { transform: none; opacity: 1; }
  .bk-tile-icon svg { transition: none; }
  .bk-rail { transition: none; }
}

/* Phone fix (Nov 23 2026): let the text column of a rule card shrink with
   the card, so long lines wrap instead of running under the card's edge. */
@media (max-width: 767.98px) {
  .bk-rule > * { min-width: 0; }
}
@media (max-width: 479px) {
  /* Rule 04: the three tiles fit inside their panel */
  .bk-shot:has(> .bk-same) { padding-left: 0.75rem; padding-right: 0.75rem; }
  .bk-same { gap: 0.35rem; max-width: 100%; }
  .bk-same-tile { min-width: 0; padding-left: 0.5rem; padding-right: 0.5rem; }
  .bk-same-tile p { font-size: 9px; letter-spacing: 0.06em; }
}
@media (max-width: 359px) {
  .bk-shot:has(> .bk-same) { padding-left: 0.5rem; padding-right: 0.5rem; }
  .bk-same { gap: 0.2rem; }
  .bk-same-tile { padding-left: 0.3rem; padding-right: 0.3rem; }
  .bk-same-tile p { font-size: 9px; letter-spacing: 0; }
  .bk-same-eq { font-size: 1.25rem; }
}
