/* ============================================================
   brand-design.css: Brand & design (services/brand-design.html)
   Sits on top of marketing.css (tokens, glass, proof deck, timeline, FAQ).
   Everything here is prefixed bd-.

   The signature visual is a brand that assembles itself: mark, name,
   palette, type, then a site header, a business card and a van. The pieces
   are plain HTML/SVG. brand-design.js decides which are "in" (time in the
   hero, scroll position in the stage). Colours come from four custom
   properties, so changing the palette recolours every piece at once.
   ============================================================ */

/* Registered so a palette change fades instead of snapping (fallback: snaps). */
@property --b1 { syntax: '<color>'; inherits: true; initial-value: #0f5fa6; }
@property --b2 { syntax: '<color>'; inherits: true; initial-value: #2a9fd6; }
@property --b3 { syntax: '<color>'; inherits: true; initial-value: #0a3d6b; }
@property --b4 { syntax: '<color>'; inherits: true; initial-value: #cfe9f8; }

.bd-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.bd-scene {
  --b1: #0f5fa6; --b2: #2a9fd6; --b3: #0a3d6b; --b4: #cfe9f8;
  transition: --b1 0.9s ease, --b2 0.9s ease, --b3 0.9s ease, --b4 0.9s ease;
}
.bd-scene[data-pal="forest"] { --b1: #17694a; --b2: #5dbb8a; --b3: #0d3b2a; --b4: #d3efe0; }
.bd-scene[data-pal="plum"] { --b1: #5d2f8f; --b2: #b07be0; --b3: #35195a; --b4: #e6d6f5; }

/* ---- Assembly: every piece has --at (0..1). JS adds .is-in. ---- */
.bd-pc { display: block; }
.bd-js .bd-pc {
  transition: opacity 0.55s ease, transform 0.75s cubic-bezier(0.34, 1.45, 0.5, 1);
}
.bd-js .bd-pc:not(.is-in) {
  opacity: 0;
  transform: translate(var(--fx, 0), var(--fy, 14px)) rotate(var(--fr, 0deg)) scale(var(--fs, 0.86));
}

/* ---- Brand kit pieces (mark, name, palette, type) ---- */
.bd-kit { display: grid; gap: 1.1em; font-size: 16px; }
.bd-kit-row { display: flex; align-items: center; gap: 0.8em; min-width: 0; }
.bd-mk { width: 3.4em; height: 3.4em; flex: 0 0 auto; display: block; }
.bd-mkw { display: block; line-height: 0; }
.bd-wm {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-weight: 800; font-size: 1.7em; letter-spacing: -0.02em; line-height: 1;
  color: var(--b3);
}
.bd-ex {
  margin-left: auto; align-self: flex-start;
  font-family: var(--font-mono); font-size: 0.62em; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mkt-text-2); opacity: 0.8;
}
.bd-sws { gap: 0.55em; }
.bd-sws i {
  display: block; width: 2.6em; height: 2.6em; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 8px 16px -8px rgba(10, 30, 60, 0.45);
}
.bd-sws i:nth-child(1) { background: var(--b1); }
.bd-sws i:nth-child(2) { background: var(--b2); }
.bd-sws i:nth-child(3) { background: var(--b3); }
.bd-sws i:nth-child(4) { background: var(--b4); }
.bd-ty { gap: 1em; }
.bd-aa {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 3.4em; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, var(--b1), var(--b2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bd-ty-t { display: grid; gap: 0.2em; min-width: 0; }
.bd-ty-t strong { font-family: var(--font-display, 'Outfit', sans-serif); font-size: 1.05em; color: var(--mkt-text); }
.bd-ty-t small { font-size: 0.8em; color: var(--mkt-text-2); }

/* ---- Glass surface used by the hero sheet and the stage ---- */
.bd-glass {
  position: relative;
  background: var(--mkt-glass-strong);
  border: 1px solid var(--mkt-edge);
  box-shadow: var(--mkt-shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  overflow: hidden;
}
.bd-glass::before {
  content: ""; position: absolute; inset: 0; background: var(--mkt-sheen); pointer-events: none; border-radius: inherit;
}

/* ---- Applied pieces: site header, business card, van ---- */
.bd-paper { color: #0b1f33; }
.bd-site {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(15, 95, 166, 0.14), 0 16px 30px -18px rgba(10, 61, 107, 0.5);
}
.bd-site-bar { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: #eef3f8; }
.bd-site-bar i { width: 7px; height: 7px; border-radius: 50%; background: #c5d2df; }
.bd-site-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #e5edf5; }
.bd-site-head .bd-mk { width: 24px; height: 24px; }
.bd-site-head b { font-family: var(--font-display, 'Outfit', sans-serif); font-size: 0.95rem; color: var(--b3); }
.bd-site-head span { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.bd-site-head span i { display: block; width: 28px; height: 5px; border-radius: 3px; background: #d5e0eb; }
.bd-site-head span em { display: block; width: 44px; height: 16px; border-radius: 8px; background: var(--b1); }
.bd-site-hero { padding: 18px 14px 20px; background: linear-gradient(135deg, var(--b4), #fff 75%); }
.bd-site-hero h4 { margin: 0 0 8px; font-family: var(--font-display, 'Outfit', sans-serif); font-size: 1.15rem; line-height: 1.15; color: var(--b3); }
.bd-site-hero i { display: block; height: 5px; width: 62%; border-radius: 3px; background: rgba(11, 31, 51, 0.14); margin-bottom: 5px; }
.bd-site-hero i + i { width: 44%; }
.bd-site-hero em { display: inline-block; margin-top: 8px; width: 70px; height: 20px; border-radius: 10px; background: linear-gradient(135deg, var(--b1), var(--b2)); }

.bd-use-row { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 16px; align-items: center; margin-top: 18px; }
.bd-biz {
  aspect-ratio: 1.75; background: #fff; border-radius: 10px; padding: 12px 14px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 0 0 1px rgba(15, 95, 166, 0.14), 0 16px 28px -16px rgba(10, 61, 107, 0.55);
  rotate: -4deg;
}
.bd-biz::after {
  content: ""; position: absolute; right: -22px; bottom: -22px; width: 70px; height: 70px; border-radius: 50%;
  background: linear-gradient(135deg, var(--b2), var(--b1)); opacity: 0.9;
}
.bd-biz .bd-mk { width: 26px; height: 26px; }
.bd-biz b { font-family: var(--font-display, 'Outfit', sans-serif); font-size: 0.9rem; color: var(--b3); display: block; margin-top: 4px; }
.bd-biz i { display: block; height: 4px; width: 55%; border-radius: 2px; background: rgba(11, 31, 51, 0.16); margin-top: 4px; position: relative; z-index: 1; }
.bd-biz i + i { width: 40%; }
.bd-van svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ---- Hero visual ---- */
.bd-hv { position: relative; min-height: 400px; display: grid; place-items: center; pointer-events: none; }
.bd-hv-in { position: relative; width: min(100%, 400px); }
.bd-px { transition: transform 0.35s ease-out; transform: translate3d(calc(var(--px, 0) * var(--d, 0) * 1px), calc(var(--py, 0) * var(--d, 0) * 1px), 0); }
.bd-hv .bd-sheet { padding: 26px 28px 24px; }
.bd-hv .bd-biz-px { position: absolute; right: -26px; bottom: -34px; width: 190px; z-index: 2; }
.bd-hv .bd-biz-px .bd-biz { position: relative; right: auto; bottom: auto; width: 100%; }
.bd-hv-orb {
  position: absolute; z-index: 0; top: -26px; left: -30px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(124, 198, 238, 0.7), rgba(42, 159, 214, 0.08) 70%);
}

/* ---- The stage (what you get) ---- */
.bd-stage { padding: 36px; max-width: 980px; margin: 0 auto; }
.bd-stage-grid { position: relative; display: grid; grid-template-columns: 1fr 1.25fr; gap: 36px; align-items: center; }
.bd-stage .bd-kit { font-size: 17px; }
.bd-kitwrap, .bd-use { transition: transform 0.35s ease-out; }
.bd-kitwrap { transform: translate3d(calc(var(--px, 0) * -7px), calc(var(--py, 0) * -4px), 0); }
.bd-use { transform: translate3d(calc(var(--px, 0) * 9px), calc(var(--py, 0) * 5px), 0); }
.bd-spot {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s ease;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 40%), rgba(42, 159, 214, 0.18), transparent 62%);
}
.bd-stage:hover .bd-spot { opacity: 1; }
.bd-bar { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.bd-bar-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mkt-text-2); }
.bd-pal {
  width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 0 4px var(--mkt-hairline);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bd-pal[data-p="sea"] { background: linear-gradient(135deg, #0f5fa6 50%, #2a9fd6 50%); }
.bd-pal[data-p="forest"] { background: linear-gradient(135deg, #17694a 50%, #5dbb8a 50%); }
.bd-pal[data-p="plum"] { background: linear-gradient(135deg, #5d2f8f 50%, #b07be0 50%); }
.bd-pal:hover { transform: scale(1.12); }
.bd-pal[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--med-sea); }
.bd-pal:focus-visible, .bd-pause:focus-visible { outline: 2px solid var(--med-sea); outline-offset: 3px; }
.bd-pause {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--mkt-edge); background: var(--mkt-glass-strong); color: var(--mkt-text); box-shadow: 0 0 0 1px var(--mkt-hairline);
}
.bd-pause svg { width: 14px; height: 14px; }

/* ---- Scope cards ---- */
.bd-scope { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
.bd-scope-item {
  position: relative; padding: 20px 22px; border-radius: 16px; overflow: hidden;
  background: var(--mkt-glass); border: 1px solid var(--mkt-edge); box-shadow: var(--mkt-shadow);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.bd-scope-item::before { content: ""; position: absolute; inset: 0; background: var(--mkt-sheen); pointer-events: none; }
.bd-scope-item:hover { transform: translateY(-3px); }
.bd-scope-item svg { position: relative; width: 22px; height: 22px; color: var(--mkt-accent); margin-bottom: 10px; display: block; }
.bd-scope-item h3 { position: relative; margin: 0 0 4px; font-size: 1.02rem; }
.bd-scope-item p { position: relative; margin: 0; color: var(--text-secondary); font-size: 0.92rem; line-height: 1.5; }

/* ---- Joined up: hand-off to the orange systems ---- */
.bd-join { max-width: 880px; margin: 0 auto; padding: 38px 36px; text-align: center; }
.bd-join h2 { margin: 0 0 8px; }
.bd-join > p { margin: 0 auto; max-width: 560px; color: var(--text-secondary); }
.bd-systems { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 26px 0 8px; position: relative; }
.bd-sys {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; text-decoration: none;
  font-family: var(--font-display, 'Outfit', sans-serif); font-weight: 600; font-size: 0.92rem; color: var(--mkt-text);
  background: linear-gradient(160deg, rgba(255, 138, 61, 0.2), rgba(255, 107, 0, 0.07) 60%, rgba(255, 255, 255, 0.35));
  border: 1px solid rgba(255, 107, 0, 0.35); box-shadow: 0 8px 18px -12px rgba(255, 107, 0, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bd-sys svg { width: 16px; height: 16px; color: #ff6b00; }
.bd-sys:hover { transform: translateY(-2px); box-shadow: 0 12px 22px -12px rgba(255, 107, 0, 0.75); }
.bd-sys:focus-visible { outline: 2px solid #ff6b00; outline-offset: 3px; }
.bd-join-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin-top: 22px; }
.bd-join-link { font-weight: 600; text-decoration: none; color: var(--mkt-accent); }
.bd-join-link:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .bd-stage { padding: 24px 20px; }
  .bd-stage-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .bd-scope { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .bd-stage .bd-kit { font-size: 15px; }
  .bd-scope { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
  .bd-join { padding: 28px 20px; }
  .bd-use-row { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 12px; }
  .bd-use, .bd-kitwrap, .bd-px { transform: none !important; }
}

/* Reduced motion: the finished brand, no movement. */
@media (prefers-reduced-motion: reduce) {
  .bd-js .bd-pc, .bd-px, .bd-kitwrap, .bd-use, .bd-scene { transition: none !important; }
  .bd-js .bd-pc:not(.is-in) { opacity: 1; transform: none; }
  .bd-px, .bd-kitwrap, .bd-use { transform: none !important; }
  .bd-spot { display: none; }
}


/* ===== The problem: a heading, dotted rows and the final statement, on the page background ===== */
.bd-doc { max-width: 760px; margin: 0 auto; text-align: left; }
.bd-doc h2 { margin: 0 0 18px; }
.bd-doc-list { list-style: none; margin: 0 0 20px; padding: 0; }
.bd-doc-list li { position: relative; margin: 0; padding: 6px 0 6px 22px; color: var(--text-secondary); line-height: 1.55; }
.bd-doc-list li::before {
  content: ""; position: absolute; left: 3px; top: calc(6px + 0.775em - 3px);
  width: 6px; height: 6px; border-radius: 50%; background: var(--mkt-accent, #0f5fa6);
}
.bd-doc-final { margin: 0; }

/* ===== Yarrabrook Developments: the real brand in the hero and the stage =====
   Colours, type and mark come from Yarrabrook's own brand pack and business
   cards: navy #0f172a, blue #0066ff, slate #64748b, paper #f1f5f9; Outfit for
   headings, Manrope for body, Space Mono for labels; a faint blueprint grid. */
.bd-scene.bd-yb { --b1: #0066ff; --b2: #4f8fe0; --b3: #0f172a; --b4: #e8eef8; transition: none; }
.bd-yb .bd-mk { width: 3em; height: 2.55em; }
.bd-yb .bd-wm { font-weight: 800; font-size: 1.55em; letter-spacing: -0.01em; color: #0f172a; display: flex; flex-direction: column; gap: 0.32em; }
.bd-yb .bd-wm small { font-family: 'Manrope', var(--font-body), sans-serif; font-weight: 600; font-size: 0.3em; letter-spacing: 0.52em; color: #64748b; }
.bd-yb .bd-ex { font-family: 'Space Mono', var(--font-mono), monospace; letter-spacing: 0.18em; color: #64748b; opacity: 1; }
.bd-yb .bd-sws i:nth-child(1) { background: #0f172a; }
.bd-yb .bd-sws i:nth-child(2) { background: #0066ff; }
.bd-yb .bd-sws i:nth-child(3) { background: #64748b; }
.bd-yb .bd-sws i:nth-child(4) { background: #f1f5f9; }
.bd-yb .bd-sws i { border-radius: 6px; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12), 0 6px 12px -8px rgba(15, 23, 42, 0.45); }
.bd-yb .bd-aa { font-weight: 800; background: linear-gradient(135deg, #0f172a 35%, #0066ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bd-yb .bd-ty-t strong { font-weight: 700; }
.bd-yb .bd-ty-body { font-family: 'Manrope', var(--font-body), sans-serif; font-weight: 600; }
.bd-yb .bd-ty-mono { font-family: 'Space Mono', var(--font-mono), monospace; font-size: 0.72em; letter-spacing: 0.04em; }

/* the blueprint sheet: faint grid and corner crosshairs, as on the cards */
.bd-yb .bd-sheet, .bd-yb .bd-kitwrap {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
}
.bd-yb .bd-kitwrap { position: relative; padding: 22px; border-radius: 14px; border: 1px solid rgba(15, 23, 42, 0.08); background-color: rgba(255, 255, 255, 0.55); }
.bd-yb .bd-sheet::after, .bd-yb .bd-kitwrap::after {
  content: "+"; position: absolute; top: 6px; right: 12px; font: 400 1.1rem/1 'Space Mono', monospace; color: #94a3b8;
}

/* the real business cards */
.bd-card {
  display: block; width: 100%; height: auto; border-radius: 9px; rotate: -4deg;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1), 0 18px 32px -16px rgba(15, 23, 42, 0.55);
}
.bd-hv .bd-biz-px { width: 230px; right: -34px; bottom: -40px; }

/* the website header and hero */
.bd-yb .bd-site-head .bd-mk { width: 26px; height: 22px; }
.bd-yb .bd-site-head b { font-weight: 800; letter-spacing: -0.01em; color: #0f172a; }
.bd-yb .bd-site-head span em { background: #0066ff; border-radius: 4px; }
.bd-yb .bd-site-hero { background: linear-gradient(135deg, #0f172a, #16223d); }
.bd-yb .bd-site-hero small { display: block; margin-bottom: 6px; font: 400 0.6rem/1.3 'Space Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; color: #94a3b8; }
.bd-yb .bd-site-hero h4 { color: #fff; }
.bd-yb .bd-site-hero i { background: rgba(255, 255, 255, 0.16); }
.bd-yb .bd-site-hero em { background: #0066ff; border-radius: 4px; }
/* keep the brand pieces above the glass sheen so the colours stay true */
.bd-yb .bd-kit, .bd-yb .bd-use { position: relative; z-index: 1; }
/* the card tucks under the sheet's bottom-right corner, clear of the type notes */
.bd-hv .bd-biz-px { width: 220px; right: -56px; bottom: -88px; }
.bd-yb .bd-ex { white-space: nowrap; }
.bd-hv .bd-biz-px { bottom: -118px; }
.bd-yb .bd-sheet::after, .bd-yb .bd-kitwrap::after { top: auto; right: auto; bottom: 6px; left: 10px; }
@media (max-width: 640px) { .bd-yb .bd-ex { display: none; } }

/* ===== Yarrabrook, take two: palettes, a code-built business card, the site as the hero card ===== */
/* Palettes: Yarrabrook's own first, then two others to show the same brand recoloured.
   --b1 accent, --b2 light accent, --b3 ink, --b4 tint. */
.bd-scene.bd-yb { transition: --b1 0.4s ease, --b2 0.4s ease, --b3 0.4s ease, --b4 0.4s ease; }
.bd-scene.bd-yb[data-pal="yarrabrook"] { --b1: #0066ff; --b2: #4f8fe0; --b3: #0f172a; --b4: #e8eef8; }
.bd-scene.bd-yb[data-pal="eucalypt"]   { --b1: #1f8a5b; --b2: #5dbb8a; --b3: #0d2a1f; --b4: #e3f1ea; }
.bd-scene.bd-yb[data-pal="clay"]       { --b1: #c2611f; --b2: #e39a5b; --b3: #2a1a12; --b4: #f6ebe2; }
.bd-pal[data-p="yarrabrook"] { background: linear-gradient(135deg, #0f172a 50%, #0066ff 50%); }
.bd-pal[data-p="eucalypt"]   { background: linear-gradient(135deg, #0d2a1f 50%, #1f8a5b 50%); }
.bd-pal[data-p="clay"]       { background: linear-gradient(135deg, #2a1a12 50%, #c2611f 50%); }
.bd-bar-note { font-family: 'Space Mono', var(--font-mono), monospace; font-size: 0.7rem; letter-spacing: 0.06em; color: var(--mkt-text-2); margin-left: 4px; }

/* everything takes the palette */
.bd-yb .bd-wm { color: var(--b3); }
.bd-yb .bd-sws i:nth-child(1) { background: var(--b3); }
.bd-yb .bd-sws i:nth-child(2) { background: var(--b1); }
.bd-yb .bd-sws i:nth-child(3) { background: #64748b; }
.bd-yb .bd-sws i:nth-child(4) { background: var(--b4); }
.bd-yb .bd-aa { background: linear-gradient(135deg, var(--b3) 35%, var(--b1)); -webkit-background-clip: text; background-clip: text; }
.bd-yb .bd-site-head b { color: var(--b3); }
.bd-yb .bd-site-head span em, .bd-yb .bd-site-hero em { background: var(--b1); }
.bd-yb .bd-site-hero { background: var(--b3); }

/* the hero: website as the main card, business card over its bottom-right corner (as before) */
.bd-hv .bd-site--hero { position: relative; z-index: 1; }
.bd-site-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px 14px; background: #fff; }
.bd-site-tiles span { display: flex; flex-direction: column; gap: 3px; padding: 8px 9px; border: 1px solid #e2e8f0; border-radius: 6px; font: 700 0.68rem/1.2 'Manrope', var(--font-body), sans-serif; color: var(--b3); }
.bd-site-tiles i { font: 700 0.6rem/1 'Space Mono', monospace; font-style: normal; color: var(--b1); }
.bd-hv .bd-biz-px { width: 200px; right: -30px; bottom: -40px; }

/* the business card, drawn in code from Yarrabrook's card design (no personal details) */
.bd-cardw { rotate: -4deg; filter: drop-shadow(0 16px 22px rgba(15, 23, 42, 0.32)); }
.yb-card {
  container-type: inline-size; position: relative; overflow: hidden;
  aspect-ratio: 1080 / 660; border-radius: 9px; padding: 7cqw 7cqw 6cqw;
  display: flex; flex-direction: column; justify-content: space-between;
}
.yb-card--front {
  background-color: var(--b3);
  background-image:
    linear-gradient(color-mix(in srgb, var(--b2) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--b2) 22%, transparent) 1px, transparent 1px);
  background-size: 9cqw 9cqw; background-position: -1px -1px;
  --ymark: #fff;
}
.yb-card--back {
  background-color: #fff;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 9cqw 9cqw; background-position: -1px -1px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.yb-card-top { position: relative; display: flex; align-items: center; gap: 2.4cqw; }
.yb-card .bd-mk { width: 11cqw; height: 9.4cqw; }
.yb-card-wm { display: flex; flex-direction: column; gap: 1cqw; font: 800 8cqw/1 'Outfit', var(--font-display), sans-serif; letter-spacing: -0.01em; }
.yb-card-wm small { font: 600 2.6cqw/1 'Manrope', var(--font-body), sans-serif; letter-spacing: 1.6cqw; }
.yb-card-ref { margin-left: auto; align-self: flex-start; text-align: right; font: 400 2.5cqw/1.4 'Space Mono', monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.yb-card-foot { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 3cqw; }
.yb-card-foot b { font: 700 4.4cqw/1.1 'Outfit', var(--font-display), sans-serif; color: var(--b1); }
.yb-card-foot span { font: 600 3.2cqw/1 'Manrope', var(--font-body), sans-serif; }
.yb-card--front .yb-card-wm { color: #fff; }
.yb-card--front .yb-card-wm small { color: color-mix(in srgb, var(--b2) 80%, #fff); }
.yb-card--front .yb-card-ref { color: color-mix(in srgb, var(--b2) 55%, transparent); }
.yb-card--front .yb-card-foot b { color: var(--b2); }
.yb-card--front .yb-card-foot span { color: #fff; }
.yb-card--back .yb-card-wm { color: var(--b3); font-size: 6.4cqw; }
.yb-card--back .yb-card-ref { color: #94a3b8; align-self: center; }
.yb-card--back .yb-card-foot span { color: var(--b3); }
.yb-draw { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; stroke: color-mix(in srgb, var(--b2) 40%, transparent); color: color-mix(in srgb, var(--b2) 45%, transparent); }
.yb-draw text { font: 400 9px 'Space Mono', monospace; fill: currentColor; stroke: none; }
.yb-x { position: absolute; width: 4cqw; height: 4cqw; }
.yb-x::before, .yb-x::after { content: ""; position: absolute; background: var(--b2); opacity: 0.7; }
.yb-x::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.yb-x::after { top: 50%; left: 0; right: 0; height: 1px; }
.yb-x--tr { top: 3cqw; right: 3cqw; }
.yb-x--br { bottom: 3cqw; right: 3cqw; }
.yb-scope { list-style: none; margin: 2.5cqw 0; padding: 0; display: flex; flex-direction: column; }
.yb-scope li { display: flex; gap: 6cqw; align-items: baseline; padding: 1.15cqw 0; border-bottom: 1px solid #e2e8f0; font: 700 3.6cqw/1.1 'Outfit', var(--font-display), sans-serif; color: var(--b3); }
.yb-scope i { font: 700 2.8cqw/1 'Space Mono', monospace; font-style: normal; color: var(--b1); }
/* the card's own padding is measured against its wrapper, so the wrapper is the container */
.bd-cardw { container-type: inline-size; display: block; }
.yb-card { container-type: normal; }

/* ===== The six topics open into a square panel ===== */
.bd-scope { position: relative; transition: padding-bottom 0.35s ease; }
.bd-scope-item { cursor: pointer; transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.3s ease, filter 0.3s ease; }
.bd-scope-btn { position: static; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.bd-scope-btn::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 16px; }
.bd-scope-btn:focus-visible { outline: none; }
.bd-scope-btn:focus-visible::after { outline: 2px solid var(--mkt-accent); outline-offset: 2px; }
.bd-scope-hint {
  position: absolute; top: 16px; right: 18px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font: 500 1.05rem/1 var(--font-display, 'Outfit', sans-serif);
  color: var(--mkt-accent); border: 1px solid var(--mkt-accent-line, rgba(15, 95, 166, 0.25));
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.bd-scope-item:hover .bd-scope-hint, .bd-scope-btn:focus-visible ~ .bd-scope-hint { background: var(--mkt-accent); color: #fff; transform: rotate(90deg); }
.bd-scope.is-open .bd-scope-item { opacity: 0.32; filter: blur(1.5px); }
.bd-scope.is-open .bd-scope-item:hover { transform: none; }

.bd-scope-pop {
  position: absolute; z-index: 6; box-sizing: border-box; padding: 26px 28px 24px; border-radius: 18px;
  background: #fff; border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 30px 70px -28px rgba(15, 40, 80, 0.45), 0 2px 6px rgba(15, 40, 80, 0.06);
  transform-origin: 0 0; transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bd-pop-body { opacity: 0; transition: opacity 0.22s ease; }
.bd-scope-pop.is-in .bd-pop-body { opacity: 1; transition-delay: 0.2s; }
.bd-pop-x {
  position: absolute; top: 14px; right: 14px; z-index: 1; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid rgba(15, 23, 42, 0.1); background: transparent;
  color: var(--text-secondary); cursor: pointer; transition: background 0.2s, color 0.2s;
}
.bd-pop-x:hover { background: var(--mkt-accent); color: #fff; border-color: var(--mkt-accent); }
.bd-pop-x:focus-visible { outline: 2px solid var(--mkt-accent); outline-offset: 2px; }
.bd-pop-x svg { width: 16px; height: 16px; }
.bd-pop-head { display: flex; align-items: center; gap: 12px; margin: 0 40px 14px 0; }
.bd-pop-head svg { width: 26px; height: 26px; color: var(--mkt-accent); flex: 0 0 auto; }
.bd-pop-head h3 { margin: 0; font-size: 1.3rem; outline: none; }
.bd-more-lead { margin: 0 0 14px; font-size: 1.02rem; line-height: 1.5; color: var(--text-primary); }
.bd-pop-body ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.bd-pop-body li { position: relative; padding-left: 20px; font-size: 0.94rem; line-height: 1.5; color: var(--text-secondary); }
.bd-pop-body li::before { content: ""; position: absolute; left: 3px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--mkt-accent); }
.bd-more-eg { margin: 0; padding: 10px 14px; border-left: 3px solid var(--mkt-accent); background: var(--mkt-accent-soft, rgba(15, 95, 166, 0.07)); border-radius: 0 8px 8px 0; font-size: 0.9rem; color: var(--text-secondary); }
.bd-more-eg b { color: var(--text-primary); }
.bd-more-links { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.bd-more-links a { font-weight: 600; font-size: 0.92rem; color: var(--mkt-accent); text-decoration: none; }
.bd-more-links a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .bd-scope-pop { padding: 22px 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .bd-scope, .bd-scope-item, .bd-scope-pop, .bd-pop-body { transition: none; }
}


/* ===== The four systems as chevrons feeding into each other ===== */
.bd-systems { flex-wrap: nowrap; gap: 0; margin: 28px 0 10px; filter: drop-shadow(0 10px 16px rgba(255, 107, 0, 0.22)); }
.bd-sys {
  --n: 15px; position: relative; overflow: hidden;
  margin-left: -6px; padding: 13px 26px 13px calc(var(--n) + 16px);
  border: 0; border-radius: 0; box-shadow: none;
  clip-path: polygon(0 0, calc(100% - var(--n)) 0, 100% 50%, calc(100% - var(--n)) 100%, 0 100%, var(--n) 50%);
  color: #3b1c06; background: rgba(255, 107, 0, var(--a, 0.18));
}
.bd-sys:first-child { margin-left: 0; padding-left: 20px; border-radius: 10px 0 0 10px; clip-path: polygon(0 0, calc(100% - var(--n)) 0, 100% 50%, calc(100% - var(--n)) 100%, 0 100%); }
.bd-sys:nth-child(1) { --a: 0.16; --i: 0; }
.bd-sys:nth-child(2) { --a: 0.26; --i: 1; }
.bd-sys:nth-child(3) { --a: 0.38; --i: 2; }
.bd-sys:nth-child(4) { --i: 3; color: #fff; background: linear-gradient(90deg, #ff7a18, #ff6b00); }
.bd-sys:nth-child(4) svg { color: #fff; }
.bd-sys svg { position: relative; z-index: 1; }
.bd-sys:hover { transform: translateY(-2px); box-shadow: none; filter: brightness(1.04); }
/* a soft light runs along the chain, one chevron after the next */
.bd-sys::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, 0.6) 50%, transparent 75%);
  transform: translateX(-110%);
}
@media (prefers-reduced-motion: no-preference) {
  .bd-sys::after { animation: bdFeed 3.4s ease-in-out infinite; animation-delay: calc(var(--i) * 0.32s); }
}
@keyframes bdFeed { 0% { transform: translateX(-110%); } 32%, 100% { transform: translateX(110%); } }

/* phones: the chain turns downwards, each chevron pointing into the next */
@media (max-width: 720px) {
  .bd-systems { flex-direction: column; align-items: stretch; max-width: 320px; margin-left: auto; margin-right: auto; }
  .bd-sys, .bd-sys:first-child {
    justify-content: center; margin: -7px 0 0; padding: 20px 18px 22px; border-radius: 0;
    clip-path: polygon(0 0, 50% var(--n), 100% 0, 100% calc(100% - var(--n)), 50% 100%, 0 calc(100% - var(--n)));
  }
  .bd-sys:first-child { margin-top: 0; padding-top: 14px; border-radius: 10px 10px 0 0; clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--n)), 50% 100%, 0 calc(100% - var(--n))); }
  .bd-sys::after { background: linear-gradient(190deg, transparent 25%, rgba(255, 255, 255, 0.6) 50%, transparent 75%); }
  @keyframes bdFeed { 0% { transform: translateY(-110%); } 32%, 100% { transform: translateY(110%); } }
}
.bd-more-eg .rufen-word { font-size: 1em; }
.bd-more-links { margin-top: 12px; }

/* ===== Dark mode ===== */

/* ===== Dark mode (html[data-theme="dark"]) ===== Design: docs/plans/dark-mode-design-system.md (sections d, e, h). Rufen chrome goes dark; the client's own artwork stays brand-true, dimmed and framed. */
:root[data-theme="dark"] .bd-hv-orb{ opacity:.35; }
:root[data-theme="dark"] .bd-spot{ background:radial-gradient(300px circle at var(--mx,50%) var(--my,40%),rgba(113,193,224,.08),transparent 62%); }
:root[data-theme="dark"] .bd-glass{ -webkit-backdrop-filter:none; backdrop-filter:none; }
:root[data-theme="dark"] body.pillar-marketing .bd-stage.bd-glass{ background:var(--dk-s2); border-color:var(--dk-line-3); }
/* the mock website: Rufen-drawn bar goes dark; the client's header, hero and tiles are artwork (kept light, dimmed) */
:root[data-theme="dark"] .bd-site{ box-shadow:0 0 0 3px var(--dk-s2),0 0 0 4px var(--dk-edge); }
:root[data-theme="dark"] .bd-site-bar{ background:var(--dk-s3); }
:root[data-theme="dark"] .bd-site-bar i{ background:var(--dk-edge); }
:root[data-theme="dark"] :is(.bd-site-head,.bd-site-hero,.bd-site-tiles,.bd-biz,.bd-van svg){ filter:brightness(.92) contrast(1.02); }
:root[data-theme="dark"] .bd-cardw{ filter:drop-shadow(0 10px 14px rgba(0,3,11,.5)); }
:root[data-theme="dark"] .bd-cardw .yb-card--back{ filter:brightness(.92) contrast(1.02); }
/* kit sheet: a plate in the stage */
:root[data-theme="dark"] .bd-yb .bd-sheet,:root[data-theme="dark"] .bd-yb .bd-kitwrap{
  background-image:linear-gradient(rgba(150,190,220,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(150,190,220,.07) 1px,transparent 1px);
}
:root[data-theme="dark"] .bd-yb .bd-kitwrap{ background-color:var(--dk-s3); border-color:var(--dk-line-3); }
:root[data-theme="dark"] .bd-yb .bd-sheet::after,:root[data-theme="dark"] .bd-yb .bd-kitwrap::after{ color:var(--text-muted); }
:root[data-theme="dark"] .bd-kit .bd-wm{ color:var(--text-primary); }
:root[data-theme="dark"] .bd-yb .bd-kit .bd-wm small{ color:var(--text-secondary); }
:root[data-theme="dark"] .bd-yb .bd-ex{ color:var(--text-muted); opacity:1; }
:root[data-theme="dark"] .bd-yb .bd-aa{ background:linear-gradient(135deg,var(--text-primary) 35%,var(--b2)); -webkit-background-clip:text; background-clip:text; }
:root[data-theme="dark"] .bd-yb .bd-sws i{ box-shadow:0 0 0 1px var(--dk-edge); }
:root[data-theme="dark"] .bd-sws i{ box-shadow:0 0 0 3px var(--dk-s3),0 0 0 4px var(--dk-edge); }
:root[data-theme="dark"] .bd-pal{ box-shadow:0 0 0 3px var(--dk-s2),0 0 0 4px var(--dk-edge); }
:root[data-theme="dark"] .bd-pal[aria-pressed="true"]{ box-shadow:0 0 0 3px var(--dk-s2),0 0 0 5px var(--blue-text); }
:root[data-theme="dark"] .bd-pause{ background:var(--dk-s3); border-color:var(--dk-line-3); box-shadow:none; }
/* scope cards and the pop-over */
:root[data-theme="dark"] .bd-scope-item{ box-shadow:var(--mkt-shadow); }
:root[data-theme="dark"] .bd-scope-item:hover .bd-scope-hint,:root[data-theme="dark"] .bd-scope-btn:focus-visible ~ .bd-scope-hint{ background:var(--btn-mkt); border-color:var(--btn-mkt); color:#fff; }
:root[data-theme="dark"] .bd-scope-pop{ background:var(--dk-s3); border-color:var(--dk-line-3); box-shadow:inset 0 1px 0 var(--dk-edge-hi),0 30px 70px -28px rgba(0,3,11,.7); }
:root[data-theme="dark"] .bd-pop-x{ border-color:var(--dk-line-3); }
:root[data-theme="dark"] .bd-pop-x:hover{ background:var(--btn-mkt); border-color:var(--btn-mkt); color:#fff; }
:root[data-theme="dark"] .bd-more-lead,:root[data-theme="dark"] .bd-more-eg b{ color:var(--text-primary); }
/* joined up: the chevron strip into Rufen's orange systems */
:root[data-theme="dark"] .bd-systems{ filter:none; }
/* the four systems as chevrons: navy plates that step lighter, an orange stripe on the top edge that gets thicker, the last chevron solid pure orange. The stripe is a background layer, so the chevron clip-path (desktop pointing right, phone pointing down) clips it correctly and no layout changes. The top edge is flat in both layouts, so the stripe always shows. */
:root[data-theme="dark"] .bd-sys{ color:var(--text-primary); }
:root[data-theme="dark"] .bd-sys svg{ color:var(--orange-text); }
:root[data-theme="dark"] .bd-sys:nth-child(1){ background:linear-gradient(180deg,#f39d5e 0,#f39d5e 2px,transparent 2px),#122a3b; }   /* s3; text 12.5:1, icon 6.9:1 */
:root[data-theme="dark"] .bd-sys:nth-child(2){ background:linear-gradient(180deg,#f39d5e 0,#f39d5e 4px,transparent 4px),#1b3446; }   /* s4; text 10.9:1, icon 6.0:1 */
:root[data-theme="dark"] .bd-sys:nth-child(3){ background:linear-gradient(180deg,#f39d5e 0,#f39d5e 6px,transparent 6px),#233c4e; }   /* plate; text 9.7:1, icon 5.4:1 */
:root[data-theme="dark"] .bd-sys:nth-child(4){ background:#fa7c20; color:#1a0d00; }   /* ink 7.23:1 */
:root[data-theme="dark"] .bd-sys:nth-child(4) svg{ color:#1a0d00; }
:root[data-theme="dark"] .bd-sys:hover{ filter:none; }
:root[data-theme="dark"] .bd-sys::after{ background:linear-gradient(100deg,transparent 25%,rgba(255,255,255,.16) 50%,transparent 75%); }
@media (max-width:720px){ :root[data-theme="dark"] .bd-sys::after{ background:linear-gradient(190deg,transparent 25%,rgba(255,255,255,.16) 50%,transparent 75%); } }
:root[data-theme="dark"] .bd-join-link,:root[data-theme="dark"] .bd-more-links a{ color:var(--blue-text); }

/* Phones, dark (Mars, 26 Nov): the chevrons stack downwards here, so the orange "heat" stripe along each
   one's top edge showed as orange wedges at its sides. Plain fills, the same steps of blue, no stripe. */
@media (max-width: 720px) {
  :root[data-theme="dark"] .bd-sys:nth-child(1) { background: #122a3b; }
  :root[data-theme="dark"] .bd-sys:nth-child(2) { background: #1b3446; }
  :root[data-theme="dark"] .bd-sys:nth-child(3) { background: #233c4e; }
}
