/* Heritage Crest - Extensions "Start to finish" build sequence (tools/build_bseq.py + js/hcb-buildseq.js), 27 Oct.
   Sits in the same dark band as the New Builds film (css/sp-feature.css). Gold #ac8d56, Urbanist. */
.hcb-bseq-sec { --gold: #ac8d56; padding-bottom: 86px; }
.hcb-bseq-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 0 auto 28px; border-radius: 999px; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1); }
.hcb-bseq-tabs button { font: 600 14px/1 'Urbanist', sans-serif; letter-spacing: .03em; color: rgba(255, 255, 255, .7); background: none; border: 0;
  border-radius: 999px; padding: 11px 20px; cursor: pointer; transition: background .3s, color .3s; white-space: nowrap; }
.hcb-bseq-tabs button small { font-size: 11px; font-weight: 500; letter-spacing: .08em; margin-left: 6px; opacity: .6; }
.hcb-bseq-tabs button[aria-selected="true"] { background: #fff; color: #111; }
.hcb-bseq-tabs button:hover { color: #fff; }
.hcb-bseq-tabs button[aria-selected="true"]:hover { color: #111; }
.hcb-bseq-tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.hcb-bseq { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; text-align: left; }
.hcb-bseq[hidden] { display: none; }
.hcb-bseq-stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: #151515;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8); }
.hcb-bseq-f { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06);
  transition: opacity .7s ease, transform 3.2s cubic-bezier(.22, .61, .36, 1); }
.hcb-bseq-f.is-on { opacity: 1; transform: scale(1); }
.hcb-bseq-stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 38%; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent); }
.hcb-bseq-chip { position: absolute; left: 22px; bottom: 26px; z-index: 2; display: flex; align-items: baseline; gap: 12px; color: #fff; font-family: 'Urbanist', sans-serif; }
.hcb-bseq-chip .n { font-size: 13px; font-weight: 700; letter-spacing: .18em; color: var(--gold); }
.hcb-bseq-chip .t { font-size: clamp(20px, 2.2vw, 28px); font-weight: 400; letter-spacing: .01em; text-shadow: 0 2px 14px rgba(0, 0, 0, .4); }
.hcb-bseq-play { position: absolute; right: 18px; top: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(10, 10, 10, .45); color: #fff; cursor: pointer;
  font: 600 12px/1 'Urbanist', sans-serif; letter-spacing: .1em; text-transform: uppercase; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .3s, border-color .3s, opacity .3s; }
.hcb-bseq-play svg { width: 16px; height: 16px; }
.hcb-bseq-play:hover, .hcb-bseq-play:focus-visible { background: rgba(172, 141, 86, .85); border-color: var(--gold); outline: none; }
.hcb-bseq.is-playing .hcb-bseq-play { opacity: .55; }
.hcb-bseq-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 2; background: rgba(255, 255, 255, .15); }
.hcb-bseq-bar i { display: block; height: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(1); transition: transform .7s ease; }

/* the stage list: a gold line fills as the build goes up */
.hcb-bseq-steps { position: relative; list-style: none; margin: 0; padding: 4px 0 4px 22px; display: flex; flex-direction: column; justify-content: space-between; }
.hcb-bseq-steps::before, .hcb-bseq-steps::after { content: ""; position: absolute; left: 4px; top: 14px; bottom: 14px; width: 1px; background: rgba(255, 255, 255, .14); }
.hcb-bseq-steps::after { background: var(--gold); transform-origin: 50% 0; transform: scaleY(var(--bseq-p, 1)); transition: transform .7s ease; }
.hcb-bseq-steps li { margin: 0; }
.hcb-bseq-steps button { position: relative; display: flex; align-items: baseline; gap: 12px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: none;
  color: rgba(255, 255, 255, .5); font: 400 15px/1.3 'Urbanist', sans-serif; text-align: left; cursor: pointer; transition: color .3s, background .3s; }
.hcb-bseq-steps button::before { content: ""; position: absolute; left: -22px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: #0a0a0a; border: 1px solid rgba(255, 255, 255, .3); transition: background .3s, border-color .3s, transform .3s; }
.hcb-bseq-steps .no { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: rgba(255, 255, 255, .35); transition: color .3s; }
.hcb-bseq-steps button:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.hcb-bseq-steps button:focus-visible { outline: 1px solid var(--gold); outline-offset: 0; }
.hcb-bseq-steps button.is-done { color: rgba(255, 255, 255, .78); }
.hcb-bseq-steps button.is-done::before { background: var(--gold); border-color: var(--gold); }
.hcb-bseq-steps button.is-on { color: #fff; }
.hcb-bseq-steps button.is-on .no { color: var(--gold); }
.hcb-bseq-steps button.is-on::before { background: var(--gold); border-color: var(--gold); transform: scale(1.5); box-shadow: 0 0 0 4px rgba(172, 141, 86, .25); }

@media (max-width: 991px) {
  .hcb-bseq { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hcb-bseq-steps { flex-direction: row; gap: 8px; padding: 2px 2px 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .hcb-bseq-steps::-webkit-scrollbar { display: none; }
  .hcb-bseq-steps::before, .hcb-bseq-steps::after { display: none; }
  .hcb-bseq-steps li { flex: 0 0 auto; scroll-snap-align: center; }
  .hcb-bseq-steps button { white-space: nowrap; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; font-size: 14px; }
  .hcb-bseq-steps button::before { display: none; }
  .hcb-bseq-steps button.is-done { border-color: rgba(172, 141, 86, .45); }
  .hcb-bseq-steps button.is-on { background: #fff; color: #111; border-color: #fff; }
  .hcb-bseq-steps button.is-on .no { color: var(--gold); }
}
@media (max-width: 600px) {
  .hcb-bseq-sec { padding-left: 16px; padding-right: 16px; padding-bottom: 60px; }
  .hcb-bseq-tabs button { padding: 10px 14px; font-size: 13px; }
  .hcb-bseq-chip { left: 14px; bottom: 16px; }
  .hcb-bseq-play { right: 10px; top: 10px; padding: 9px; }
  .hcb-bseq-play { font-size: 0; gap: 0; }
  .hcb-bseq-play svg { width: 18px; height: 18px; }
}
/* four projects (3 Nov): below 740px the tabs sit two by two so no name breaks and the page never scrolls sideways */
@media (max-width: 739px) {
  .hcb-bseq-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 22px; }
  .hcb-bseq-tabs button { padding: 10px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hcb-bseq-f, .hcb-bseq-bar i, .hcb-bseq-steps::after, .hcb-bseq-steps button, .hcb-bseq-steps button::before { transition: none !important; }
  .hcb-bseq-f { transform: none !important; }
}

/* 3 Nov: a page with one project gets a full-width tab on phones; on narrow phones the "N stages" note drops so names never clip */
@media (max-width: 739px) { .hcb-bseq-tabs:has(> button:only-child) { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .hcb-bseq-tabs button small { display: none; } }
