/* Beyond Imagination 2 — refinement layer (loaded after experience.css; original files unchanged).
   Typography, glass/button treatments, chapter seams, legibility scrims and Signature V2 continuity. */

:root {
  --gold-soft: #f0d7a6;
  --line-gold: rgba(230, 196, 139, .42);
  --sig-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Legibility: no essential text below 11px ---------- */
.eyebrow { font-size: 12px; letter-spacing: .22em; }
.eyebrow > span { font-size: 12px; }
.scene-foot { font-size: 10.5px; letter-spacing: .2em; }
.sample, .signal-chart > span, .micro { font-size: 10.5px; letter-spacing: .14em; }
.metric-grid small, .system small, .product-price span { font-size: 11.5px; }
.metric-grid span { font-size: 12.5px; }
.milestone { font-size: 11px; letter-spacing: .1em; }
.glass p { font-size: 14px; }
.glass p.status { font-size: 12px; line-height: 1.55; }
.demo-note { font-size: 12.5px !important; }
.product-caption { font-size: 11px; letter-spacing: .1em; }
.bag-preview { font-size: 12.5px; }
.system strong { font-size: 13px; }
.system-detail p { font-size: 13px; }
.system-number, .system-number + strong + small { letter-spacing: .08em; }
.scroll-note { font-size: 11px; letter-spacing: .16em; }
.journey-nav a { font-size: 10.5px; }
.chapter-menu a span { font-size: 12px; }
footer .disclosure { font-size: 12px; }

/* ---------- Typographic hierarchy ---------- */
h1, h2 { letter-spacing: -.05em; text-shadow: 0 2px 36px rgba(2, 10, 22, .35); }
.arrival h1, .arrival h2 { text-shadow: none; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--gold-soft); }
.arrival h1 em { color: #195d8e; }
.lead { font-weight: 400; letter-spacing: -.01em; }
.description { color: #d3e1ea; }
.eyebrow::after { content: ""; flex: 0 1 64px; height: 1px; background: linear-gradient(90deg, var(--line-gold), transparent); }

/* ---------- Glass panels: lit edge, consistent radius ---------- */
.glass {
  border-radius: 18px; border-color: rgba(183, 210, 229, .26);
  background:
    linear-gradient(180deg, rgba(240, 215, 166, .09), transparent 34%),
    linear-gradient(135deg, rgba(9, 32, 52, .94), rgba(6, 22, 36, .93));
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .09);
}
.glass::before {
  content: ""; position: absolute; left: 28px; right: 28px; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--line-gold), transparent);
}
.panel-heading b { font-size: 14px; letter-spacing: .01em; }
.system { border-radius: 10px; transition: transform .4s var(--sig-ease), border-color .25s, background .25s; }
.system:hover { transform: translateY(-3px); border-color: rgba(230, 196, 139, .6); }
.chip { transition: background .25s, color .25s, transform .3s var(--sig-ease), border-color .25s; }
.chip:hover { transform: translateY(-2px); border-color: rgba(240, 215, 166, .7); }
.vision-tabs button { transition: color .25s, border-color .25s, padding-left .35s var(--sig-ease); }
.vision-tabs button:hover { padding-left: 8px; color: #fff; }
.bars i { border-radius: 4px 4px 0 0; }

/* ---------- Buttons and links ---------- */
.button {
  border-radius: 4px; border-color: rgba(255, 255, 255, .35);
  background: linear-gradient(180deg, #f3dcae 0%, #e6c48b 100%);
  box-shadow: 0 16px 36px -14px rgba(230, 196, 139, .6), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .35s var(--sig-ease), box-shadow .35s var(--sig-ease), background .25s;
}
.button:hover { background: linear-gradient(180deg, #f8e6c2 0%, #edcf9a 100%); transform: translateY(-3px); box-shadow: 0 24px 44px -16px rgba(230, 196, 139, .75), inset 0 1px 0 rgba(255, 255, 255, .6); }
.button > span { transition: transform .35s var(--sig-ease); }
.button:hover > span { transform: translate(3px, -3px); }
.arrival .button { background: linear-gradient(180deg, #17405f, #102d43); box-shadow: 0 18px 40px -16px rgba(16, 45, 67, .7); }
.arrival .button:hover { background: linear-gradient(180deg, #1c4d72, #12354f); }
.next, .text-link { position: relative; border-bottom: 0; }
.next::after, .text-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--gold), rgba(173, 200, 219, .35));
  transform-origin: left; transition: transform .45s var(--sig-ease);
}
.next:hover::after, .text-link:hover::after { transform: scaleX(.6); }
.next span, .text-link span { transition: transform .35s var(--sig-ease); display: inline-block; }
.next:hover span { transform: translateY(3px); }

/* ---------- Chapter seams: each scene melts out of the one before ---------- */
.chapter + .chapter .scene::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: clamp(110px, 18vh, 220px); z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 21, 34, .96), rgba(6, 21, 34, .55) 45%, transparent);
}
.scene::after { background: linear-gradient(0deg, rgba(6, 21, 34, .62), transparent 22%); }
.chapter.finale .scene::after { background: linear-gradient(0deg, rgba(3, 12, 22, .85), transparent 34%); }

/* ---------- Progress rail ---------- */
.journey-nav { background: rgba(6, 21, 34, .62); border: 1px solid rgba(183, 210, 229, .22); box-shadow: 0 20px 40px -22px rgba(0, 0, 0, .7); }
.journey-nav a { transition: color .25s, transform .3s var(--sig-ease); }
.journey-nav a:hover { color: #fff; transform: scale(1.1); }

/* ---------- Concept switcher inside the chapter menu ---------- */
.chapter-menu .concept-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 0 16px; border-bottom: 1px solid rgba(255, 255, 255, .12); margin-bottom: 4px; }
.chapter-menu .concept-switch p { grid-column: 1 / -1; margin: 0 0 4px; font-size: 11px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
.chapter-menu .concept-switch a {
  display: grid; gap: 2px; border: 1px solid rgba(183, 210, 229, .26); border-radius: 10px; padding: 12px 14px; min-height: 0; font-size: 13px; line-height: 1.35;
  transition: border-color .25s, background .25s, transform .3s var(--sig-ease);
}
.chapter-menu .concept-switch a small { font-size: 11.5px; color: var(--muted); }
.chapter-menu .concept-switch a:hover { border-color: rgba(230, 196, 139, .65); background: rgba(255, 255, 255, .05); transform: translateY(-2px); }
.chapter-menu .concept-switch a[aria-current="page"] { border-color: var(--gold); background: rgba(230, 196, 139, .1); }
.chapter-menu .original-link, .chapter-menu .home-link { font-size: 13px; color: var(--muted); border: 0; margin-top: 6px; }

/* ---------- Reveal choreography (only when the helper script is running) ---------- */
.bi-js .chapter:not(.arrival):not(.bi-in) .copy > *,
.bi-js .chapter:not(.arrival):not(.bi-in) .glass { opacity: 0; transform: translateY(26px); }
.bi-js .chapter .copy > *, .bi-js .chapter .glass { transition: opacity .9s var(--sig-ease), transform .9s var(--sig-ease); }
.bi-js .chapter.bi-in .copy > *:nth-child(2) { transition-delay: .08s; }
.bi-js .chapter.bi-in .copy > *:nth-child(3) { transition-delay: .16s; }
.bi-js .chapter.bi-in .copy > *:nth-child(4) { transition-delay: .24s; }
.bi-js .chapter.bi-in .copy > *:nth-child(5) { transition-delay: .32s; }
.bi-js .chapter.bi-in .copy > *:nth-child(n+6) { transition-delay: .4s; }
.bi-js .chapter.bi-in .glass { transition-delay: .2s; }

/* ---------- Finale ---------- */
.finale h2 { text-shadow: 0 4px 60px rgba(0, 0, 0, .55); }
.finale .final-actions .button { min-height: 60px; padding: 20px 28px; font-size: 14px; }
.finale .replay { font-size: 12.5px; }
.final-signature { font-size: 11px; letter-spacing: .22em; }
footer { background: linear-gradient(180deg, transparent, rgba(3, 12, 22, .6)); }

/* ---------- Tablet / mobile composition ---------- */
@media (max-width: 1050px) {
  .chapter-menu .concept-switch { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .composition { gap: 26px; padding-bottom: 112px; }
  .eyebrow { font-size: 11px; letter-spacing: .16em; gap: 10px; }
  .eyebrow::after { display: none; }
  .scene-foot { font-size: 9.5px; letter-spacing: .12em; bottom: 78px; }
  /* scrim keeps copy readable over busy interface imagery and clear of the progress bar */
  .chapter:not(.arrival) .copy {
    padding: 22px 20px; margin: 0 -4px; border-radius: 16px;
    background: linear-gradient(180deg, rgba(6, 21, 34, .74), rgba(6, 21, 34, .55));
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
  .chapter:not(.arrival) .copy h2 { margin-bottom: 16px; }
  .glass::before { left: 20px; right: 20px; }
  .metric-grid strong { font-size: 38px; }
  .system strong { font-size: 12.5px; }
  .system small { font-size: 11px; }
  .vision-tabs button { font-size: 12px; }
  .journey-nav { background: rgba(6, 21, 34, .82); }
}
@media (prefers-reduced-motion: reduce) {
  .bi-js .chapter .copy > *, .bi-js .chapter .glass { opacity: 1 !important; transform: none !important; }
  .chapter + .chapter .scene::before { display: none; }
  .button:hover, .chip:hover, .system:hover { transform: none; }
}
