/* ═══════════════════════════════════════════════════════════
   HOME · BLOG — "Expanding Rail" (v3)
   Desktop: a rail of tall dark panels; one is open, the rest are
   slim spines with a vertical title. Hover / focus / auto-play
   opens a panel (flex grow), its content slides up, the accent
   orb drifts and a progress line runs while it auto-plays.
   Phones: stacked accordion — tap a spine to open, tap again to read.
   Built with home-blog-v3.js. Veox brand colours.
   ═══════════════════════════════════════════════════════════ */
#home-blog { background: var(--cream); }
.bx-rail {
  display: flex; gap: 12px; height: clamp(500px, 66vh, 600px); margin: 0 0 2.6rem;
  list-style: none; padding: 0;
}
.bx-item { flex: 1 1 0; min-width: 0; display: flex; transition: flex-grow .8s cubic-bezier(.65,0,.2,1); }
.bx-item.is-open { flex-grow: 5.2; }

.bx-panel {
  --c1: #ff5555; --c2: #ff9a6b;
  position: relative; flex: 1; display: block; overflow: hidden; isolation: isolate;
  border-radius: 26px; background: #0e0c0b; color: #faf3e1; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 18px 40px -22px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(46px); clip-path: inset(100% 0 0 0 round 26px);
  transition: opacity .7s ease, transform 1s cubic-bezier(.22,1,.36,1), clip-path 1s cubic-bezier(.22,1,.36,1), box-shadow .5s;
  transition-delay: calc(var(--i, 0) * 90ms);
}
.bx-rail.in .bx-panel { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 26px); }
.bx-item.is-open .bx-panel { box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 34px 60px -26px color-mix(in srgb, var(--c1) 60%, transparent); }

/* backdrop: accent orb, grain dots, sheen, giant number */
.bx-orb {
  position: absolute; z-index: -1; width: 130%; aspect-ratio: 1; left: -40%; top: 35%;
  border-radius: 50%; filter: blur(50px); opacity: .5;
  background: radial-gradient(circle at 40% 40%, var(--c2), var(--c1) 45%, transparent 70%);
  transform: translate3d(0,0,0) scale(.7); transition: transform 1.4s cubic-bezier(.22,1,.36,1), opacity .8s;
}
.bx-item.is-open .bx-orb { opacity: .55; transform: translate3d(48%, -8%, 0) scale(1); animation: bx-orb 9s ease-in-out 1.2s infinite alternate; }
@keyframes bx-orb { to { transform: translate3d(36%, 6%, 0) scale(1.12); } }
.bx-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .16; pointer-events: none;
  background-image: radial-gradient(rgba(250,243,225,.7) 1px, transparent 1.3px); background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%); mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.bx-panel::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.09), transparent 60%);
  opacity: 0; transition: opacity .4s;
}
.bx-panel:hover::after { opacity: 1; }
.bx-big {
  position: absolute; z-index: -1; right: -.06em; bottom: -.2em; pointer-events: none;
  font-family: var(--font-display); font-weight: 900; font-size: clamp(9rem, 17vw, 15rem); line-height: 1; letter-spacing: -.08em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(250,243,225,.12);
  transform: translateY(30%); opacity: 0; transition: transform 1.1s cubic-bezier(.22,1,.36,1), opacity .8s;
}
.bx-item.is-open .bx-big { transform: none; opacity: 1; transition-delay: .2s; }

/* spine (collapsed) */
.bx-spine {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 22px 0 26px; transition: opacity .35s ease; pointer-events: none;
}
.bx-item.is-open .bx-spine { opacity: 0; transition-delay: 0s; }
.bx-item:not(.is-open) .bx-spine { transition-delay: .35s; }
.bx-snum { font-family: var(--font-display); font-weight: 800; font-size: .8rem; letter-spacing: .06em; color: rgba(250,243,225,.55); }
.bx-sdot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 22%, transparent); }
.bx-stitle {
  writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(.95rem, 1.25vw, 1.15rem); letter-spacing: -.01em;
}
.bx-stitle i { font-style: normal; color: var(--c2); }

/* open content */
.bx-body {
  position: absolute; inset: 0; display: flex; flex-direction: column; padding: clamp(24px, 2.6vw, 40px);
  width: var(--bx-open-w, 100%);
}
.bx-body > * { opacity: 0; transform: translateY(22px); transition: opacity .35s ease, transform .5s cubic-bezier(.22,1,.36,1); }
.bx-item.is-open .bx-body > * { opacity: 1; transform: none; }
.bx-item.is-open .bx-body > :nth-child(1) { transition-delay: .38s; }
.bx-item.is-open .bx-body > :nth-child(2) { transition-delay: .46s; }
.bx-item.is-open .bx-body > :nth-child(3) { transition-delay: .54s; }
.bx-item.is-open .bx-body > :nth-child(4) { transition-delay: .62s; }
.bx-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bx-chip, .bx-stamp {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 50px;
  font-family: var(--font-display); font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.bx-chip { background: linear-gradient(135deg, var(--c1), var(--c2)); color: #0e0c0b; }
.bx-stamp { border: 1px solid rgba(250,243,225,.22); color: rgba(250,243,225,.8); }
.bx-new { background: #faf3e1; color: #0e0c0b; }
.bx-title {
  margin: auto 0 0; max-width: 17ch; color: #faf3e1;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 2.7vw, 2.55rem); line-height: 1.06; letter-spacing: -.035em;
}
.bx-title em { font-style: normal; background: linear-gradient(120deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bx-lead { margin: 1rem 0 0; max-width: 46ch; font-size: 1rem; line-height: 1.6; color: rgba(250,243,225,.72); }
.bx-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; padding-top: 1.1rem;
  border-top: 1px solid rgba(250,243,225,.12);
}
.bx-by { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(250,243,225,.55); }
.bx-by b { color: var(--c2); }
.bx-go {
  flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c1), var(--c2)); color: #0e0c0b;
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.bx-go svg { width: 20px; height: 20px; transition: transform .45s cubic-bezier(.22,1,.36,1); }
.bx-panel:hover .bx-go { transform: scale(1.08); }
.bx-panel:hover .bx-go svg { transform: rotate(45deg); }

/* auto-play progress */
.bx-prog { position: absolute; left: 0; top: 0; height: 3px; width: 100%; z-index: 3; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--c1), var(--c2)); }
.bx-item.is-open .bx-prog.run { animation: bx-prog var(--bx-dur, 6s) linear forwards; }
.bx-rail.paused .bx-prog.run { animation-play-state: paused; }
@keyframes bx-prog { to { transform: scaleX(1); } }

.bx-panel:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }

/* bottom row: counter + view all */
.bx-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.bx-count { font-family: var(--font-display); font-weight: 800; font-size: .85rem; letter-spacing: .04em; color: rgba(0,0,0,.45); }
.bx-count b { color: var(--dark); font-size: 1.6rem; letter-spacing: -.04em; margin-right: 4px; }
.bx-nav { display: flex; gap: 8px; }
.bx-nav button {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.18); background: transparent; color: var(--dark);
  display: grid; place-items: center; cursor: pointer; transition: background .25s, color .25s, border-color .25s;
}
.bx-nav button:hover { background: var(--dark); color: var(--cream); border-color: var(--dark); }
.bx-nav svg { width: 18px; height: 18px; }

/* ── phones / tablets: stacked accordion ── */
@media (max-width: 899px) {
  .bx-rail { flex-direction: column; height: auto; gap: 10px; }
  .bx-item, .bx-item.is-open { flex: none; }
  .bx-panel { display: grid; grid-template-rows: 78px 0fr; border-radius: 22px; transition: grid-template-rows .6s cubic-bezier(.65,0,.2,1), opacity .7s ease, transform 1s cubic-bezier(.22,1,.36,1), clip-path 1s cubic-bezier(.22,1,.36,1); }
  .bx-rail.in .bx-panel { clip-path: inset(0 0 0 0 round 22px); }
  .bx-item.is-open .bx-panel { grid-template-rows: 78px 1fr; }
  .bx-spine { position: relative; inset: auto; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 0 20px; opacity: 1 !important; }
  .bx-stitle { writing-mode: horizontal-tb; transform: none; font-size: 1rem; flex: 1; }
  .bx-sdot { order: 3; }
  .bx-item.is-open .bx-sdot { transform: scale(1.4); }
  .bx-body { position: relative; inset: auto; width: auto; overflow: hidden; padding: 0 20px; }
  .bx-item.is-open .bx-body { padding-bottom: 22px; }
  .bx-title { margin-top: 1rem; font-size: clamp(1.35rem, 6vw, 1.8rem); max-width: none; }
  .bx-lead { font-size: .92rem; }
  .bx-big { font-size: 9rem; }
  .bx-orb { width: 160%; left: -30%; top: 10%; }
  .bx-item.is-open .bx-orb { transform: translate3d(30%, 0, 0) scale(1); }
  .bx-prog { display: none; }
  .bx-nav { display: none; }
  .bx-meta { justify-content: center; }
  .bx-count { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bx-item, .bx-panel, .bx-body > *, .bx-orb, .bx-big { transition: none !important; animation: none !important; }
  .bx-panel { opacity: 1; transform: none; clip-path: none; }
}
