/* ============================================================
   oneblock — adaptive, one-at-a-time selector with blink-mask stage
   Static HTML is authored in the page (crawlable / no-JS friendly);
   oneblock.js enhances it. Scope every rule under .ob.
   ============================================================ */

.ob {
  display: grid;
  grid-template-columns: minmax(290px, 0.75fr) 1.25fr;
  gap: clamp(36px, 5vw, 86px);
  align-items: center;
}

/* ---- left rail of cards ---- */
.ob-rail { display: flex; flex-direction: column; gap: clamp(16px, 1.8vw, 26px); }

.ob-card {
  position: relative; text-align: left; cursor: pointer;
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: clamp(19px, 1.9vw, 25px) clamp(22px, 2.2vw, 28px);
  box-shadow: var(--raise-sm);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}
.ob-card::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 3px; height: 0; transform: translateY(-50%);
  background: var(--rose); border-radius: 0 3px 3px 0;
  transition: height 0.45s var(--ease);
}
.ob-card:hover { transform: translateY(-2px); box-shadow: var(--raise); background: var(--surface); }
.ob-card:focus-visible { outline: none; box-shadow: var(--raise), 0 0 0 3px color-mix(in oklab, var(--rose) 32%, transparent); }
.ob-card.is-active {
  background: var(--surface);
  border-color: color-mix(in oklab, var(--rose) 26%, var(--hairline));
  box-shadow: var(--raise-lg);
  cursor: default;
}
.ob-card.is-active::before { height: calc(100% - 34px); }

.ob-card-content { display: flex; flex-direction: column; gap: 7px; transition: opacity 0.26s var(--ease); }
.ob-card-eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-ghost);
  transition: color 0.4s var(--ease);
}
.ob-card.is-active .ob-card-eyebrow { color: var(--rose); }
.ob-card-title {
  font-family: var(--font-display); font-weight: 540;
  font-size: clamp(18px, 1.55vw, 22px); letter-spacing: -0.02em;
  line-height: 1.16; color: var(--ink); text-wrap: balance;
  transition: color 0.4s var(--ease);
}
.ob-card.is-active .ob-card-title { color: var(--rose-deep); }
.ob-card-sub { font-size: 14px; color: var(--ink-soft); line-height: 1.5; text-wrap: pretty; }
.ob-card-sub:empty { display: none; }

/* ---- right stage / animated block ---- */
.ob-stage { align-self: center; min-width: 0; display: flex; align-items: center; justify-content: center; }
.ob-block {
  width: 100%;
  clip-path: inset(0 0 0 0); opacity: 1;
  transition: clip-path 0.42s var(--ease-out), opacity 0.42s var(--ease-out);
  will-change: clip-path, opacity;
}
.ob-block.is-out {
  clip-path: inset(50% 0 50% 0); opacity: 0;
  transition: clip-path 0.26s cubic-bezier(.62,0,.86,.28), opacity 0.24s cubic-bezier(.62,0,.86,.28);
}
@media (prefers-reduced-motion: reduce) {
  .ob-block { transition: opacity 0.2s linear; clip-path: inset(0 0 0 0) !important; }
  .ob-block.is-out { transition: opacity 0.16s linear; }
}

.ob-block-media {
  height: var(--ob-media-h, 240px);
  display: grid; place-items: center;
  margin-bottom: clamp(20px, 2.2vw, 28px);
}
/* video: hard-cropped to the visual box */
.ob-frame {
  width: 100%; max-width: 400px; aspect-ratio: 400 / 240;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--raise); background: #0c0c0d;
}
.ob-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* frameless image, capped to the visual height, with a brief loading shimmer */
.ob-imgwrap { position: relative; display: inline-flex; max-width: 100%; max-height: var(--ob-media-h, 240px); }
.ob-imgph {
  position: absolute; inset: 0; border-radius: 14px;
  background: linear-gradient(110deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%);
  background-size: 220% 100%; animation: obpulse 1.15s ease-in-out infinite;
}
.ob-imgwrap.is-loaded .ob-imgph { display: none; }
.ob-render { width: auto; height: auto; max-width: 100%; max-height: var(--ob-media-h, 240px); object-fit: contain; display: block; }
@keyframes obpulse { 0% { background-position: 140% 0; } 100% { background-position: -40% 0; } }

/* panels: all visible without JS; once enhanced, only the shown one renders */
.ob-panel { display: block; }
.ob-card.ob-hidden, .ob-panel.ob-hidden { display: none !important; }
.ob-ready .ob-panel { display: none; }
.ob-ready .ob-panel.is-shown { display: block; }
/* image fade only applies once enhanced (no-JS shows the image immediately) */
.ob-ready .ob-render { opacity: 0; transition: opacity 0.35s var(--ease); }
.ob-ready .ob-imgwrap.is-loaded .ob-render { opacity: 1; }

.ob-block-body { display: flex; flex-direction: column; gap: 13px; max-width: none; }
.ob-block-body .eyebrow { margin-bottom: 2px; }
.ob-block-body p { font-size: clamp(15px, 1.15vw, 16.5px); color: var(--ink-soft); line-height: 1.62; text-wrap: pretty; margin: 0; }
.ob-block-body p b { color: var(--ink); font-weight: 600; }
.ob-block-body p em { font-style: italic; color: var(--ink); }
.ob-block-body .tlink { margin-top: 4px; align-self: flex-start; }

/* ---- case-only sentences: hidden when path B or C is active ---- */
.case-bc .case-bc-hide { display: none; }

/* ---- chosen starter card ---- */
.starter-card.is-chosen {
  border-color: color-mix(in oklab, var(--rose) 40%, var(--hairline));
  box-shadow: var(--raise-lg), inset 0 0 0 1px color-mix(in oklab, var(--rose) 22%, transparent);
}

/* ---- persistent path bar: fixed at the bottom, slides up when a path is active ---- */
.case-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(235, 235, 235, 0.72); /* iOS 15 fallback — color-mix() unsupported before Safari 16.2 */
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  backdrop-filter: saturate(1.3) blur(14px);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.6), 0 -10px 26px -18px var(--shadow-dark, rgba(0,0,0,0.5));
  transform: translateY(110%);
  transition: transform 0.42s var(--ease, cubic-bezier(.4,0,.2,1));
  will-change: transform;
}
.case-bar.is-on { transform: translateY(0); }
.case-bar__inner {
  max-width: var(--maxw); margin: 0 auto;
  height: 26px; padding: 0 clamp(16px, 5vw, 64px);
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.case-bar__txt {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.case-bar__txt b { color: var(--rose-deep); font-weight: 600; }
.case-bar__reset {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em;
  border: 1px solid color-mix(in oklab, var(--rose) 34%, var(--hairline));
  background: var(--surface); color: var(--rose-deep);
  border-radius: 7px; padding: 3px 10px; cursor: pointer; flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  transition: box-shadow 0.25s var(--ease);
}
.case-bar__reset:hover { box-shadow: var(--raise-sm); }
.case-bar__reset span { font-size: 13px; line-height: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .case-bar { transition: none; }
}
.ob-commerce {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 16px; box-shadow: var(--raise); padding: 18px 20px; width: 300px; max-width: 100%;
}
.ob-commerce .grid { display: grid; grid-template-columns: 26px 1fr 1fr 1fr; gap: 10px 14px; align-items: center; }
.ob-commerce .th { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-faint); text-transform: uppercase; }
.ob-commerce .swatch { width: 18px; height: 18px; border-radius: 6px; box-shadow: var(--raise-sm); }
.ob-commerce .price { font-family: var(--font-display); font-weight: 560; font-size: 15px; color: var(--ink); }
.ob-commerce .stock { display: inline-flex; align-items: center; gap: 6px; }
.ob-commerce .dot { width: 7px; height: 7px; border-radius: 50%; background: #2faf6a; }
.ob-commerce .dot.low { background: #e0a32d; }
.ob-commerce .n { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }
.ob-commerce .n.low { color: #c4861f; }
.ob-commerce .region { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); background: var(--surface-2); box-shadow: var(--inset); border-radius: 6px; padding: 3px 7px; text-align: center; }
.ob-commerce .checkout { margin-top: 16px; }
.ob-commerce .checkout button {
  width: 100%; border: 0; border-radius: 10px; cursor: default;
  background: var(--rose); color: #fff; box-shadow: var(--raise-sm);
  font-family: var(--font-display); font-weight: 540; font-size: 13.5px;
  padding: 10px 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}

/* ---- stacked (narrow) layout: block moves directly below the active card ---- */
@media (max-width: 900px) {
  .ob { display: flex; flex-direction: column; gap: 0; }
  .ob-rail { display: flex; flex-direction: column; gap: 10px; width: 100%; }
  .ob-stage { width: 100%; height: auto !important; align-self: stretch; }
  .ob-rail > .ob-stage { margin-top: 22px; }
  .ob-card-eyebrow { display: none; }
  .ob-block-media { height: min(var(--ob-media-h, 240px), 48vw); }
  .ob-frame { max-width: min(400px, 80vw); }
  .ob-commerce { max-width: 80vw; }
  /* no-JS stacked fallback: keep a little space between panels */
  .ob-panel { margin-top: 14px; }
  .ob-ready .ob-panel { margin-top: 0; }
}
