/* Variant B — "Colour stack". The page is a stack of boxes in the Box 6420's four colours.
   Loaded after site.css; everything is scoped to body.v-b. */

:root {
  /* Approximate product colours, read off the product photos.
     Replace with the shop's swatch values once they are defined. */
  --box-yellow: #f5b800;
  --box-green: #2f5d3a;
  --box-blue: var(--blue-500);
  --box-black: #15191d;
}

/* ---------- Hero: four boxes, stacked ---------- */
.stack-hero { padding-top: clamp(32px, 5vw, 72px); padding-bottom: clamp(56px, 7vw, 104px); }
.stack-hero .booxit-overline { font-size: 12px; }

.stack {
  margin: clamp(36px, 4vw, 56px) 0 0;
  display: flex; flex-direction: column; gap: 6px;
  font-size: clamp(26px, 5vw, 74px); line-height: 1; letter-spacing: -0.015em;
  text-transform: uppercase;
}
.stack__box {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: clamp(12px, 2vw, 32px);
  padding: clamp(14px, 1.7vw, 26px) clamp(16px, 2.4vw, 36px) clamp(18px, 2vw, 30px);
  border-radius: var(--radius-lg);
  background: var(--c); color: var(--on);
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, 0.2);   /* the base rim of a box */
}
.stack__box--yellow { --c: var(--box-yellow); --on: var(--gray-900); }
.stack__box--green  { --c: var(--box-green);  --on: var(--white); }
.stack__box--blue   { --c: var(--box-blue);   --on: var(--white); }
.stack__box--black  { --c: var(--box-black);  --on: var(--white); }

/* click studs on the top box */
.stack__box--yellow::before {
  content: ""; position: absolute; left: 3%; right: 3%; top: -10px; height: 10px;
  background: repeating-linear-gradient(90deg, var(--box-yellow) 0 46px, transparent 46px 104px);
  border-radius: 3px 3px 0 0;
}
.stack__tag {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 2px solid currentColor; border-radius: 50%;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600; letter-spacing: 0;
}
.stack__line { font-family: var(--font-display); font-weight: 700; }
.stack__part {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.02em; text-transform: none;
  white-space: nowrap; opacity: 0.85;
}

/* The boxes land bottom-up, each with a short mechanical snap. */
.js .stack__box { animation: bx-drop .5s var(--ease-standard) both; }
.js .stack__box--black  { animation-delay: .10s; }
.js .stack__box--blue   { animation-delay: .32s; }
.js .stack__box--green  { animation-delay: .54s; }
.js .stack__box--yellow { animation-delay: .76s; }
@keyframes bx-drop {
  0%   { transform: translateY(-56px); opacity: 0; }
  70%  { transform: translateY(3px); opacity: 1; }
  85%  { transform: translateY(-1px); }
  100% { transform: none; opacity: 1; }
}

/* ---------- The box ---------- */
.box-sec { padding-block: var(--sec-pad); border-top: 1px solid var(--border-subtle); }
.box-sec .product { margin-top: 0; }
.swatches {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px;
}
.swatch { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--text-primary); }
.swatch::before {
  content: ""; flex: none; width: 30px; height: 20px; border-radius: 4px;
  background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22);
}
.swatch--yellow { --c: var(--box-yellow); }
.swatch--green  { --c: var(--box-green); }
.swatch--black  { --c: var(--box-black); }
.swatch--blue   { --c: var(--box-blue); }
.swatch code { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

/* ---------- Why: the black box ---------- */
.v-b .why { background: var(--box-black); color: var(--gray-100); border: 0; }
.v-b .why .booxit-overline { color: var(--box-yellow); }
.v-b .why .h2, .v-b .why__sub, .v-b .obstacles h4 { color: var(--white); }
.v-b .why .lead, .v-b .obstacles p, .v-b .then-now dt, .v-b .then-now__unit { color: var(--gray-300); }
.v-b .then-now__row, .v-b .then-now .source { border-color: rgba(255, 255, 255, 0.16); }
.v-b .then-now__fig { color: var(--gray-400); }
.v-b .then-now__row--now .then-now__fig { color: var(--box-yellow); }
.v-b .why .source { color: var(--gray-400); }
.v-b .obstacles li { border-top-color: var(--box-yellow); }

/* ---------- Results: on white ---------- */
.v-b .results { background: var(--white); color: var(--text-primary); }
.v-b .results .booxit-overline { color: var(--color-primary); }
.v-b .results .h2 { color: var(--text-primary); }
.v-b .results .lead { color: var(--text-secondary); }
.v-b .results .lead em { color: var(--text-primary); }
.v-b .panel { background: var(--surface-subtle); border-color: var(--border-default); }
.v-b .panel__title, .v-b .panel__sub { color: var(--text-primary); }
.v-b .panel__setup, .v-b .legend, .v-b .status { color: var(--text-secondary); }
.v-b .key--card, .v-b .bar--card { --c: var(--gray-500); }
.v-b .bars tbody tr, .v-b .breakeven td { border-top-color: var(--border-default); }
.v-b .bars th, .v-b .bar__val, .v-b .breakeven td, .v-b .breakeven__never { color: var(--text-primary); }
.v-b .breakeven th, .v-b .panel .source { color: var(--text-muted); }
.v-b .results__takeaway { color: var(--text-primary); border-left-color: var(--box-yellow); }

/* ---------- Book: the green box ---------- */
.v-b .book { background: var(--box-green); }
.v-b .book .booxit-overline, .v-b .book__editors, .v-b .book__meta, .v-b .toc li::before { color: rgba(255, 255, 255, 0.78); }
.v-b .book__subtitle { color: rgba(255, 255, 255, 0.92); }
.v-b a.book__btn { color: var(--box-green); }
.v-b a.book__btn:hover { background: #eaf1eb; color: var(--box-green); }

/* ---------- Contact: the yellow box ---------- */
.v-b .contact { background: var(--box-yellow); padding-bottom: clamp(64px, 8vw, 112px); }
.v-b .contact .booxit-overline { color: var(--gray-900); }
.v-b .contact__intro, .v-b .contact__meta { color: var(--gray-800); }
.v-b .contact__mail:hover { color: var(--blue-800); }
.v-b .contact__meta a { color: var(--gray-900); text-decoration: underline; text-underline-offset: 3px; }
.v-b .contact a:focus-visible { outline-color: var(--gray-900); }

/* ---------- Footer: the black base ---------- */
.v-b .site-footer { background: var(--box-black); padding-top: 8px; }
.v-b .site-footer__row { border-top: 0; }
.v-b .site-footer .brand, .v-b .site-footer .brand:hover { color: var(--white); }
.v-b .site-footer__sign, .v-b .site-footer__imprint { color: var(--gray-400); }

@media (max-width: 640px) {
  .stack__box { grid-template-columns: auto minmax(0, 1fr); }
  .stack__part { display: none; }
  .stack__tag { width: 26px; height: 26px; font-size: 12px; }
  .swatches { grid-template-columns: minmax(0, 1fr); }
}
