/* bytedar opening: Creation of Adam (scroll) -> blast -> "Welcome to bytedar" -> curtain -> hero (adam.js).
   A tall section pins a full-screen stage; scroll scrubs the camera. At the touch the stage detaches (position:fixed,
   scroll locked) and the rest plays on a clock. Header, scrollbar and the custom cursor stay hidden until the greeting ends. */
#bfAdam{position:relative;height:260vh;height:260svh;background:#202940;color:#efe2d9}
#bfAdam .ba-stage{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;background:#202940}
#bfAdam .ba-stage.is-fixed{position:fixed;inset:0;height:auto;z-index:9999;touch-action:none;overscroll-behavior:none;-webkit-user-select:none;user-select:none}
#bfAdam .ba-cv{position:absolute;inset:0;width:100%;height:100%;display:block}
#bfAdam .ba-stage.is-greet .ba-cv{visibility:hidden}

/* full screen: no header, no scrollbar while the opening runs */
html.bf-adam-on{scrollbar-width:none;-ms-overflow-style:none}
html.bf-adam-on::-webkit-scrollbar{display:none}
html.bf-adam-lock,html.bf-adam-lock body{overflow:hidden;overscroll-behavior:none}
html.bf-adam-on:not(.bf-adam-done) .bar{opacity:0;visibility:hidden;pointer-events:none}
html.bf-adam-on .bar{transition:opacity .7s .35s ease}

/* the static title card (reduced motion only) */
#bfAdam .ba-copy{display:none}
#bfAdam .ba-title{margin:0;font-family:var(--font-display,'Space Grotesk',-apple-system,'Segoe UI',Arial,sans-serif);font-weight:700;font-size:clamp(64px,15vw,240px);line-height:.95;letter-spacing:-.035em;color:#efe2d9}
#bfAdam .ba-lead{margin:0;max-width:26em;font-family:var(--font-sans,'Inter',-apple-system,sans-serif);font-weight:400;font-size:clamp(15px,1.5vw,21px);line-height:1.5;color:#caaa98}

#bfAdam .ba-cue{position:absolute;left:50%;bottom:clamp(22px,5vh,48px);z-index:2;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:12px;pointer-events:none;opacity:var(--cue,1);
  font:500 12px/1 var(--font-sans,'Inter',sans-serif);letter-spacing:.14em;text-transform:uppercase;color:#efe2d9;text-shadow:0 1px 10px rgba(14,19,34,.9),0 0 3px rgba(14,19,34,.8)}
#bfAdam .ba-cue i{display:block;width:1px;height:42px;background:linear-gradient(to bottom,rgba(239,226,217,.7),rgba(239,226,217,0));transform-origin:top;animation:baCue 1.9s cubic-bezier(.6,0,.3,1) infinite}
@keyframes baCue{0%{transform:scaleY(0)}55%{transform:scaleY(1);opacity:1}100%{transform:scaleY(1);opacity:0}}

#bfAdam .ba-skip{position:absolute;right:clamp(16px,3vw,36px);bottom:clamp(16px,3vw,32px);bottom:max(clamp(16px,3vw,32px),env(safe-area-inset-bottom));z-index:4;
  background:rgba(32,41,64,.35);border:1px solid rgba(239,226,217,.28);color:#efe2d9;font:500 12px/1 var(--font-sans,'Inter',sans-serif);letter-spacing:.14em;text-transform:uppercase;
  padding:11px 16px;border-radius:999px;cursor:pointer;opacity:.75;transition:border-color .2s}
#bfAdam .ba-skip:hover,#bfAdam .ba-skip:focus-visible{border-color:rgba(239,226,217,.7);outline:none}
#bfAdam .ba-skip[hidden]{display:none}

/* greeting: dot + word, hard cuts (no fades), over fast photo flashes */
#bfAdam .ba-panel{position:absolute;inset:0;z-index:3;display:none;align-items:center;justify-content:center;background:#202940;pointer-events:none}
#bfAdam .ba-stage.is-greet .ba-panel{display:flex}
#bfAdam .ba-flash{position:absolute;inset:0;overflow:hidden;background:#202940}
#bfAdam .ba-flash[hidden]{display:none}
#bfAdam .ba-flash img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:none;filter:grayscale(1) contrast(1.4) brightness(.7)}
#bfAdam .ba-flash img.on{display:block}
#bfAdam .ba-tint{position:absolute;inset:0;z-index:1;background:#d98f7b;mix-blend-mode:multiply;opacity:0}
#bfAdam .ba-flash.is-red img{filter:grayscale(1) contrast(1.55) brightness(1.05)}
#bfAdam .ba-flash.is-red .ba-tint{opacity:1}
#bfAdam .ba-flash.is-solid-red{background:#d98f7b}
#bfAdam .ba-flash.is-solid-amber{background:#FFB000}
#bfAdam .ba-flash.is-solid-red img,#bfAdam .ba-flash.is-solid-amber img{display:none}
#bfAdam .ba-flash.is-solid-amber+.ba-greet{color:#202940}
#bfAdam .ba-greet{margin:0;padding:0 5vw;display:flex;align-items:center;justify-content:center;gap:.7em;max-width:100%;color:#efe2d9;position:relative;z-index:2;
  font:500 clamp(24px,3.6vw,56px)/1.25 var(--font-display,'Space Grotesk',-apple-system,'Segoe UI','Helvetica Neue',Arial,sans-serif);letter-spacing:-.01em;text-align:center}
#bfAdam .ba-greet[hidden]{display:none}
#bfAdam .ba-dot{flex:none;width:.2em;height:.2em;border-radius:50%;background:currentColor}
#bfAdam .ba-word{display:block;min-width:0;overflow-wrap:anywhere}

/* the hero's own entrance animations wait until the greeting is over */
html.bf-adam-on:not(.bf-adam-go) .hero *{animation-play-state:paused!important}

/* deep link: no opening at all */
html.bf-adam-skip #bfAdam{display:none}

/* reduced motion / no canvas: no pinned scroll story, just the resolved title card */
html.bf-adam-static #bfAdam{height:auto;min-height:60vh;min-height:60svh}
html.bf-adam-static #bfAdam .ba-stage{position:relative;height:60vh;height:60svh}
html.bf-adam-static #bfAdam .ba-cv,html.bf-adam-static #bfAdam .ba-cue,html.bf-adam-static #bfAdam .ba-skip{display:none}
html.bf-adam-static #bfAdam .ba-copy{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(14px,2.4vw,28px);padding:72px 6vw 0;text-align:center}
