/* FUNCTION AT SCALE, v9 layer. Loads after v7.css. The monumental hero. */
.bh { margin: clamp(20px, 2.4vw, 36px) 0 0; }
.bh svg { width: 100%; height: auto; display: block; overflow: visible; }
.bh .el { transform-box: view-box; transform-origin: 0 0; transition: transform 1.3s cubic-bezier(.7, 0, .2, 1), opacity .9s var(--ease); }
.bh .el .in { transform-box: fill-box; transform-origin: center; }
.bh .el .sh { transition: fill .9s var(--ease), stroke .9s var(--ease); }
.bh .c-red .sh { fill: var(--red); } .bh .c-blue .sh { fill: var(--blue); } .bh .c-yellow .sh { fill: var(--yellow); } .bh .c-ink .sh { fill: var(--ink); }
.bh .hollow .sh { fill: var(--paper) !important; stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.bh .ring .sh { fill: none !important; stroke: var(--ink); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.bh .lbl { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; fill: var(--ink-55); opacity: 0; transition: opacity .6s var(--ease); }
.bh .lbl.bh-on { opacity: 1; transition-delay: 1.1s; }
.bh.bh-instant .el, .bh.bh-instant .el .sh, .bh.bh-instant .lbl { transition: none !important; }

/* Ambient motion inside each state */
.bh .el[data-m="float"] .in { animation: bhFloat 5.5s ease-in-out var(--md, 0s) infinite alternate; }
.bh .el[data-m="breathe"] .in { animation: bhBreathe 4s ease-in-out infinite alternate; }
.bh .el[data-m="slide"] .in { animation: bhSlide 2.4s cubic-bezier(.6, 0, .4, 1) infinite; }
.bh .el[data-m="beat"] .in { animation: bhBeat 2.8s ease-in-out var(--md, 0s) infinite; }
.bh .el[data-m="bob"] .in { animation: bhBob 2.6s ease-in-out infinite alternate; }
.bh .el[data-m="climb"] .in { animation: bhClimb 3.4s cubic-bezier(.55, 0, .3, 1) 1.2s 1 both; }
@keyframes bhFloat { from { transform: translateY(calc(var(--fl) * -1)) rotate(-4deg); } to { transform: translateY(var(--fl)) rotate(4deg); } }
@keyframes bhBob { from { transform: translateY(calc(var(--fl) * -1)); } to { transform: translateY(var(--fl)); } }
@keyframes bhBreathe { from { transform: scale(.97); } to { transform: scale(1.03); } }
@keyframes bhSlide { 0% { transform: translateX(calc(var(--sl) * -1)); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translateX(var(--sl)); opacity: 0; } }
@keyframes bhClimb { 0%, 6% { transform: translate(0, 0); } 100% { transform: translate(var(--cx), var(--cy)); } }
@keyframes bhBeat { 0%, 22%, 100% { transform: scale(1); } 9% { transform: scale(1.1); } }

/* Tabs: the four states, auto-advancing */
.bh-tabs { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(18px, 2.4vw, 30px); border-top: 1px solid var(--ink); }
.bh-tab { position: relative; text-align: left; padding: 14px 18px 4px 0; color: var(--ink-35); transition: color .4s var(--ease); }
.bh-tab::before { content: ""; position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--red); }
.bh-tab.bh-on { color: var(--ink); }
.bh-tab.bh-on::before { width: 100%; background: var(--ink); }
.bh-tab.bh-run::before { width: 0; background: var(--red); animation: bhRun 4.6s linear forwards; }
@keyframes bhRun { to { width: 100%; } }
.bh-tab .mono { display: block; color: inherit; }
.bh-tab .t { display: block; margin-top: 4px; font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.2; }
.bh-tab:hover { color: var(--ink); }
.bh-tab:focus-visible { outline-offset: 4px; }
@media (max-width: 640px) { .bh-tabs { grid-template-columns: 1fr 1fr; } .bh-tab { padding-bottom: 10px; } }
@media (prefers-reduced-motion: reduce) { .bh .el .in { animation: none !important; } .bh .el { transition-duration: .01s; } }

/* v9.3: the line under the headline runs the full width of the page */
.hero-sub { margin-top: clamp(24px, 2.8vw, 40px); }
.hero-sub .lede { grid-column: 1 / -1; max-width: none; text-wrap: balance; }
@media (min-width: 900px) { .hero-sub .lede { font-size: clamp(1.5rem, 2.25vw, 2.15rem); line-height: 1.3; } }
/* The headline's yellow beat uses a deeper gold for text so "business." stays readable on paper. Shapes keep the bright yellow. */
.hero-v5 h1 em { animation-name: bhTextCycle; }
@keyframes bhTextCycle { 0% { color: var(--red); } 33.333% { color: var(--blue); } 66.666% { color: #C99200; } }
/* Fewer examples: How it works stays; Built to scale and Where to start step out */
#built-to-scale, #start { display: none !important; }
/* The closing "business." and the email cycle red, blue, yellow with the headline. Brighter blue on the dark band. */
#contact-title em, #contact .contact-email { --blue: #5B8DDE; animation: bauhaus 7.5s steps(1, end) infinite; }
@media (prefers-reduced-motion: reduce) { #contact-title em, #contact .contact-email { animation: none; color: var(--red); } }

/* v9.2: phones. The diagram bleeds to the edges so the pieces read bigger, labels stay legible, credentials stack cleanly. */
@media (max-width: 640px) {
  @supports (overflow: clip) {
    .bh { overflow-x: clip; }
    .bh svg { width: 118%; margin-left: -9%; }
  }
  .bh .lbl { font-size: 30px; letter-spacing: .12em; }
  .bh-tab .t { font-size: 1.05rem; }
  .cred-list { flex-direction: column; gap: 6px; }
  .cred-list li + li::before { content: none; }
}
