/* BIG BEN Cellar Intro 1.1.0 — matte gold, cellar depth, original crest. */
.bb-intro {
  --bi-gold: #d8bc80;
  --bi-size: clamp(144px, 30vw, 196px);
  --bi-ease: cubic-bezier(.16, .8, .22, 1);
  --bi-exit-at: 1280ms;
  --bi-exit-for: 260ms;
  position: fixed; inset: 0; z-index: 10000;
  display: none; overflow: hidden; isolation: isolate; pointer-events: none;
  color: #f4f0e7; background: #090a0b;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
}
.bb-intro[hidden] { display: none !important; }
.bb-intro.bb-intro-active { display: grid; place-items: center; animation: bb-intro-exit var(--bi-exit-for) var(--bi-exit-at) ease-in-out forwards; }
.bb-intro *, .bb-intro *::before, .bb-intro *::after { box-sizing: border-box; }
.bb-intro-light { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 20%, #b88e4929, transparent 64%), radial-gradient(ellipse at 50% 110%, #a27b3610, transparent 65%); animation: bb-intro-light 1100ms ease-out both; }
.bb-intro-room { display: none; position: absolute; inset: 0; transform-style: preserve-3d; }
.bb-intro-arch { position: absolute; top: 50%; left: 50%; width: min(76vw, 780px); height: min(84vh, 780px); border: 1px solid #cbb27d21; border-bottom: 0; border-radius: 42% 42% 0 0; transform: translate(-50%, -50%) translateZ(-140px); }
.bb-intro-arch::before { content: ''; position: absolute; inset: 18px; border: 1px solid #cbb27d0d; border-bottom: 0; border-radius: inherit; }
.bb-intro-rack { position: absolute; top: 50%; width: min(25vw, 230px); height: min(55vh, 430px); display: grid; grid-template-rows: 1fr 1fr; gap: 26px; padding: 28px 16px 0; background: linear-gradient(90deg, #0b0d0c, #171610 48%, #0c0e0d); border-inline: 1px solid #d1b67626; border-top: 1px solid #d1b6761a; border-radius: 3px 3px 0 0; transform-style: preserve-3d; box-shadow: inset 5px 0 18px #0006; }
.bb-intro-rack-left { left: 0; transform: translate(-12%, -50%) translateZ(-80px) rotateY(34deg); }
.bb-intro-rack-right { right: 0; transform: translate(12%, -50%) translateZ(-80px) rotateY(-34deg); }
.bb-intro-tier { position: relative; display: flex; align-items: flex-end; justify-content: space-evenly; gap: 8px; padding-bottom: 15px; border-bottom: 5px solid #211d15; transform-style: preserve-3d; }
.bb-intro-tier::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, #a88c491a, #d0b47845, #a88c491a); }
.bb-intro-bottle { position: relative; display: block; flex: 0 1 27px; height: clamp(46px, 10vh, 104px); border-radius: 10px 10px 4px 4px; border: 1px solid #8a927328; background: linear-gradient(90deg, #0c1310, #293329 20%, #172018 46%, #0b110d 85%); transform: translateZ(8px); box-shadow: 5px 3px 8px #0005; }
.bb-intro-bottle::before { content: ''; position: absolute; bottom: calc(100% - 1px); left: 32%; width: 36%; height: 28%; border: 1px solid #65573542; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #10170f, #414331, #161b13); }
.bb-intro-bottle::after { content: ''; position: absolute; inset: 43% 6% 20%; border-block: 1px solid #c2a16c38; background: #a78b4d20; }
.bb-intro-bottle:nth-child(2) { height: clamp(58px, 12vh, 120px); background: linear-gradient(90deg, #151109, #48361e 25%, #241b0f 48%, #110e09); }
.bb-intro-floor { position: absolute; top: 70%; left: -25%; right: -25%; height: 60%; transform-origin: top; transform: translateZ(-80px) rotateX(66deg); border-top: 1px solid #d3b97c0d; background: radial-gradient(ellipse at 50% 0, #ad864123, transparent 60%); }
/* Preserve-3D ancestors only animate transforms: fades live on their leaf planes. */
.bb-intro-stage { position: relative; display: grid; justify-items: center; gap: 28px; width: min(100%, 540px); text-align: center; transform-style: preserve-3d; }
.bb-intro-halo { position: absolute; top: -38px; left: 50%; width: calc(var(--bi-size) * 1.8); height: calc(var(--bi-size) * 1.8); border-radius: 50%; background: radial-gradient(ellipse, #b9934921, transparent 67%); transform: translateX(-50%) translateZ(-30px); animation: bb-intro-leaf-reveal 900ms ease-out both; }
.bb-intro-emblem { position: relative; width: var(--bi-size); height: var(--bi-size); }
.bb-intro-emblem-front { position: absolute; inset: 0; overflow: hidden; border-radius: 50%; border: 1px solid #dec58d9c; background: #11120e; box-shadow: 0 17px 35px #0009, inset 0 0 0 3px #d8bc8014; animation: bb-intro-face-reveal 450ms ease-out both; }
.bb-intro-emblem-front img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 3%; border-radius: 50%; }
.bb-intro-emblem-front::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 38%, #f5e7bf00 44%, #f5e7bf38 49%, #f5e7bf00 54%, transparent 60%); transform: translateX(-95%); animation: bb-intro-shine 850ms 190ms var(--bi-ease) both; }
.bb-intro-emblem-back, .bb-intro-emblem-edge, .bb-intro-reflection { display: none; }
.bb-intro-brand { display: grid; gap: 9px; animation: bb-intro-type-reveal 650ms 140ms var(--bi-ease) both; }
.bb-intro-brand > strong { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #f5f0e5; font-size: clamp(29px, 7.5vw, 42px); font-weight: 600; line-height: 1.05; letter-spacing: .22em; padding-left: .22em; }
.bb-intro-brand > span { color: var(--bi-gold); font-size: 10px; font-weight: 500; line-height: 1.4; letter-spacing: .57em; padding-left: .57em; }
.bb-intro-context { display: grid; gap: 7px; max-width: 100%; padding-inline: 6px; animation: bb-intro-type-reveal 600ms 240ms var(--bi-ease) both; }
.bb-intro-context > strong { color: #d2c29b; font-size: clamp(11px, 2.8vw, 13px); line-height: 1.4; font-weight: 450; letter-spacing: .025em; }
.bb-intro-context > span { color: #aaa69c; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.bb-intro-context > span:empty { display: none; }
.bb-intro-rule { position: absolute; bottom: max(7%, calc(18px + env(safe-area-inset-bottom, 0px))); left: 50%; width: 32px; height: 1px; background: #d8bc8059; transform: translateX(-50%); animation: bb-intro-leaf-reveal 800ms 250ms both; }
@supports (perspective: 800px) and (transform-style: preserve-3d) {
  .bb-intro.bb-intro-3d { perspective: 1100px; perspective-origin: 50% 45%; }
  .bb-intro.bb-intro-3d .bb-intro-room { display: block; animation: bb-intro-room-enter 1250ms var(--bi-ease) both; }
  .bb-intro.bb-intro-3d .bb-intro-stage { animation: bb-intro-stage-enter 1150ms var(--bi-ease) both; }
  .bb-intro.bb-intro-3d .bb-intro-emblem { transform-style: preserve-3d; animation: bb-intro-medallion 1100ms var(--bi-ease) both; }
  .bb-intro.bb-intro-3d .bb-intro-emblem-back { display: block; position: absolute; inset: 0; border-radius: 50%; border: 1px solid #a78c52; background: #242016; transform: translateZ(-13px); animation: bb-intro-face-reveal 450ms ease-out both; }
  .bb-intro.bb-intro-3d .bb-intro-emblem-edge { display: block; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(110deg, #e0c582, #867044 38%, #c6ab70 66%, #4c3b20); transform: translateZ(-6px); animation: bb-intro-face-reveal 450ms ease-out both; }
  .bb-intro.bb-intro-3d .bb-intro-emblem-front { transform: translateZ(2px); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
  .bb-intro.bb-intro-3d .bb-intro-reflection { display: block; position: absolute; left: -25%; right: -25%; bottom: -28px; height: 22px; border-radius: 50%; background: radial-gradient(ellipse, #bb985133, transparent 65%); transform: translateZ(-18px) rotateX(56deg); animation: bb-intro-leaf-reveal 800ms both; }
}
.bb-intro-flat { --bi-exit-at: 720ms; --bi-exit-for: 180ms; }
.bb-intro-flat .bb-intro-emblem-front::after { display: none; animation: none; }
.bb-intro-flat .bb-intro-brand, .bb-intro-flat .bb-intro-context { animation-duration: 350ms; animation-delay: 0ms; }
/* Returning to work gets a brief signature, not a second full scene. */
.bb-intro.bb-intro-compact { --bi-size: 76px; --bi-exit-at: 440ms; --bi-exit-for: 180ms; }
.bb-intro-compact .bb-intro-room, .bb-intro-compact .bb-intro-halo, .bb-intro-compact .bb-intro-rule, .bb-intro-compact .bb-intro-context, .bb-intro-compact .bb-intro-reflection { display: none !important; }
.bb-intro-compact .bb-intro-stage { width: min(100%, 354px); grid-template-columns: 76px minmax(0, 1fr); gap: 24px; align-items: center; justify-items: start; text-align: left; animation: none !important; }
.bb-intro-compact .bb-intro-brand { gap: 8px; animation-duration: 300ms; animation-delay: 0ms; }
.bb-intro-compact .bb-intro-brand > strong { font-size: clamp(23px, 6vw, 29px); letter-spacing: .13em; padding-left: 0; }
.bb-intro-compact .bb-intro-brand > span { letter-spacing: .43em; padding-left: 0; font-size: 9px; }
.bb-intro-compact .bb-intro-emblem { animation: bb-intro-medallion-brief 450ms var(--bi-ease) both !important; }
.bb-intro-compact .bb-intro-emblem-front { animation-duration: 200ms; }
.bb-intro-compact .bb-intro-emblem-front::after { display: none; animation: none; }
.bb-intro-no-logo .bb-intro-emblem, .bb-intro-no-logo .bb-intro-halo { display: none; }
.bb-intro-no-logo .bb-intro-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; }
@keyframes bb-intro-room-enter { from { transform: translateZ(-65px); } to { transform: translateZ(0); } }
@keyframes bb-intro-stage-enter { from { transform: translateZ(-38px) translateY(10px); } to { transform: translateZ(0) translateY(0); } }
@keyframes bb-intro-medallion { from { transform: rotateY(-24deg) rotateX(7deg) translateZ(-18px); } to { transform: rotateY(0) rotateX(0) translateZ(0); } }
@keyframes bb-intro-medallion-brief { from { transform: rotateY(-10deg) translateZ(-6px); } to { transform: rotateY(0) translateZ(0); } }
@keyframes bb-intro-face-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes bb-intro-leaf-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes bb-intro-type-reveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bb-intro-light { from { opacity: .35; } to { opacity: 1; } }
@keyframes bb-intro-shine { from { transform: translateX(-95%); } to { transform: translateX(95%); } }
@keyframes bb-intro-exit { to { opacity: 0; } }
@media (max-width: 374px) { .bb-intro { padding-inline: 20px; } .bb-intro-compact .bb-intro-stage { gap: 18px; } }
@media (max-height: 560px) and (orientation: landscape) {
  .bb-intro { --bi-size: clamp(72px, 22vh, 110px); padding-block: calc(12px + env(safe-area-inset-top, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)); }
  .bb-intro-stage { gap: 13px; }
  .bb-intro-brand > strong { font-size: 27px; }
  .bb-intro-context { gap: 3px; }
  .bb-intro-context > span { font-size: 10px; }
  .bb-intro-rule, .bb-intro-rack { display: none; }
  .bb-intro-compact { --bi-size: 70px; }
}
@media (prefers-reduced-motion: reduce) { .bb-intro, .bb-intro.bb-intro-active { display: none !important; animation: none !important; } .bb-intro *, .bb-intro *::after { animation: none !important; } }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) { .bb-intro-room, .bb-intro-halo, .bb-intro-light { display: none !important; } }
@media print { .bb-intro { display: none !important; } }
