/* BABUL v5: a scroll story over one living scene (WebGL canvas fixed behind). Minimal: soft sky, clean dark
   type in the empty sky, no boxes over the picture; the contract and links are the last beat. */
@font-face { font-family: 'Outfit'; src: url('/fonts/outfit-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('/fonts/outfit-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
:root {
  --ink: #12203f; --soft: #4b5a7c; --curler: #d8284c; --yellow: #f2dc5d;
  --font-display: 'Outfit', system-ui, sans-serif; --font-body: 'Outfit', system-ui, sans-serif;
  --bg: #b9dbff; --accent: var(--curler);
}
html { background: linear-gradient(#8fc2ff, #e9f4ff 64%, #4fa236 64%); }
body { background: transparent; color: var(--ink); overscroll-behavior-y: none; }
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; touch-action: pan-y; cursor: pointer; }

.story { position: relative; pointer-events: none; }
.beat { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-start; padding: max(9vh, 56px) max(6vw, 24px) 0; }
.beat > * { pointer-events: auto; margin: 0; max-width: 34rem; }
.beat { opacity: 0; transform: translateY(40px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.beat.in { opacity: 1; transform: none; }

.hero { justify-content: flex-start; padding-top: max(24vh, 150px); }
.hero h1 { font: 700 clamp(84px, 11vw, 190px)/.86 var(--font-display); letter-spacing: -0.05em; color: var(--ink); }
.hero .tick { margin-top: 10px; font: 700 clamp(22px, 1.6vw + 10px, 34px)/1 var(--font-display); letter-spacing: .04em; color: var(--curler); }
.hero .one { margin-top: 22px; font: 500 clamp(20px, .8vw + 13px, 28px)/1.3 var(--font-body); color: var(--soft); }
.hero .cue { margin-top: 40px; margin-bottom: 0; font: 700 16px/1 var(--font-display); letter-spacing: .3em; text-transform: uppercase; color: var(--soft); animation: cue 1.8s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(10px); opacity: .45; } }

.big { font: 700 clamp(56px, 6.5vw, 120px)/.92 var(--font-display); letter-spacing: -0.04em; }
.small { margin-top: 18px !important; font: 500 clamp(19px, .6vw + 13px, 26px)/1.35 var(--font-body); color: var(--soft); max-width: 26rem !important; }
.b3, .b4 { align-items: flex-end; text-align: right; }

.scream { margin-top: 18px; min-height: 64px; padding: 0; border: 0; background: none; cursor: pointer; --c: 0; touch-action: none; }
.scream span { display: block; padding: min(calc(0.5em + 7px), 29px) 34px; border-radius: 999px; font: 700 clamp(22px, .8vw + 16px, 30px)/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; color: #fff;
  background: linear-gradient(90deg, var(--curler) 0 calc(var(--c) * 100%), var(--ink) calc(var(--c) * 100%)); transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.scream:hover span { transform: scale(1.04); }
.scream.hold span { transform: scale(1.08); animation: shake .05s linear infinite; }
@keyframes shake { 50% { translate: 1.5px -1px; } }

.end { padding-top: max(26vh, 120px); }
.end .label { font: 700 16px/1 var(--font-display); letter-spacing: .2em; text-transform: uppercase; color: var(--curler); }
.end .ca { margin-top: 12px !important; max-width: 40rem !important; }
.end [data-ca] { font: 500 clamp(17px, .6vw + 13px, 24px)/1.4 'JetBrains Mono', ui-monospace, monospace; color: var(--ink); overflow-wrap: anywhere; word-break: break-all; -webkit-user-select: all; user-select: all; }
.row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px !important; max-width: none !important; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 26px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font: 700 20px/1 var(--font-display); cursor: pointer; box-shadow: 0 10px 30px rgba(18,32,63,.14); transition: transform .25s cubic-bezier(.3,1.6,.5,1), box-shadow .25s; }
.btn img { width: 26px; height: auto; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(18,32,63,.2); }
.btn:active { transform: scale(.96); transition-duration: .035s; }
.btn.copy { background: var(--ink); color: #fff; }
.btn[disabled], .btn[aria-disabled=true] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.home { margin-top: 26px; }

.subs { position: fixed; left: 50%; top: 36%; transform: translate(-50%, -100%) translateY(10px); width: max-content; max-width: min(86vw, 560px); margin: 0; text-align: center; font: 700 clamp(20px, .9vw + 12px, 32px)/1.15 var(--font-display); color: var(--ink); background: #fff; padding: 12px 20px; border-radius: 22px; box-shadow: 0 10px 30px rgba(18,32,63,.15); opacity: 0; transition: opacity .2s ease-out, transform .35s cubic-bezier(.3,1.6,.5,1); pointer-events: none; z-index: 2; }
.subs.on { opacity: 1; transform: translate(-50%, -100%); }
:focus-visible { outline: 4px solid var(--curler); outline-offset: 4px; }

@media (max-width: 720px) {
  .beat { padding: max(7vh, 40px) 20px 0; }
  .b3, .b4 { align-items: flex-start; text-align: left; }
  .hero { padding-top: 8vh; }
  .hero h1 { font-size: 76px; }
  .end { padding-top: 16vh; }
  .btn { padding: 0 20px; font-size: 18px; }

}
@media (prefers-reduced-motion: reduce) { .beat { opacity: 1; transform: none; transition: none; } .hero .cue { animation: none; } .b4 .scream { display: none; } }
