/* The "We build brilliant" slide on the homepage deck (second slide, after the welcome).
   A white card with a soft glow inside its edge, the animated line (wbb-ender.js), a raised
   play button and the film in a modal. Source and notes: Qualls videos / We build brilliant / web-ender. */
@property --glow-hue { syntax: "<number>"; inherits: true; initial-value: 262; }

/* One hue at a time, drifting slowly all the way round the spectrum. */
.work-panel--brilliant { --glow-hue: 262; animation: wbb-glow-hue 60s linear infinite; }
@keyframes wbb-glow-hue { from { --glow-hue: 262; } to { --glow-hue: 622; } }

/* The colour is a flat fill of the current hue; over it a canvas paints the white middle, feathered a long
   way out toward the edge (wbb-hero.js). A canvas, not a CSS blur, because Safari clips and bands large blurs. */
.wbb-glow { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; overflow: hidden; opacity: .5; background: oklch(0.9 0.05 var(--glow-hue)); }
.wbb-glow canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the card itself is white (the deck leaves panels see-through unless their background says otherwise) */
.work-panel--brilliant .slide-bg { background: #fff; }
/* the card's white edge */
.work-panel--brilliant .slide-bg::after { content: ""; position: absolute; inset: 0; border: clamp(4px, 0.4vw, 7px) solid #fff; border-radius: var(--slider-radius, 0); pointer-events: none; }

.wbb-content { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(20px, 4vh, 56px); padding: 48px 16px; box-sizing: border-box; color: #131217; }
/* the deck switches pointer events off on every card box and back on for its content: same here */
body[data-slide-transition="native"] .wbb-content { pointer-events: auto; }
.wbb-ender { width: min(52vw, 980px); min-width: min(84vw, 340px); }

/* The play button: a white ring and a white triangle, each lifted off the card. The ring is hollow, so its
   shadow falls on the card inside it (an inset shadow) as well as outside, down-left like the icons' light.
   The shadow takes the hue of the card's glow. Plain boxes and box-shadows: Safari does not draw CSS filters
   on the parts of an SVG. */
.wbb-play { --s: clamp(58px, 5vw, 88px); --k: 1; --a: .8; --shade: 0.56 0.11 var(--glow-hue); position: relative; width: var(--s); height: var(--s); margin: calc(clamp(8px, 1.8vh, 26px) * -1) 0 clamp(8px, 1.8vh, 26px); border: 0; padding: 0; border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; -webkit-appearance: none; appearance: none; }
.wbb-play__ring { position: absolute; inset: 0; box-sizing: border-box; border-radius: 50%; border: calc(var(--s) * .088) solid #fff;
  background: oklch(0.6 0.1 var(--glow-hue) / calc(.10 * var(--a)));
  box-shadow:
    calc(var(--s) * -.035 * var(--k)) calc(var(--s) * .05 * var(--k)) calc(var(--s) * .05) oklch(var(--shade) / calc(.2 * var(--a))),
    calc(var(--s) * -.11 * var(--k)) calc(var(--s) * .15 * var(--k)) calc(var(--s) * .14 * var(--k)) oklch(var(--shade) / calc(.16 * var(--a))),
    calc(var(--s) * -.26 * var(--k)) calc(var(--s) * .36 * var(--k)) calc(var(--s) * .32 * var(--k)) oklch(var(--shade) / calc(.13 * var(--a))),
    inset calc(var(--s) * -.035 * var(--k)) calc(var(--s) * .05 * var(--k)) calc(var(--s) * .05) oklch(var(--shade) / calc(.3 * var(--a))),
    inset calc(var(--s) * -.09 * var(--k)) calc(var(--s) * .12 * var(--k)) calc(var(--s) * .13) oklch(var(--shade) / calc(.16 * var(--a)));
  transition: box-shadow .5s cubic-bezier(.2, .8, .2, 1), background-color .4s; }
/* the triangle sits so its weight, not its box, is centred in the ring */
.wbb-play__tri { position: relative; width: 34%; height: auto; overflow: visible; fill: #fff; transform: translateX(9%);
  filter: drop-shadow(calc(var(--s) * -.02 * var(--k)) calc(var(--s) * .028 * var(--k)) calc(var(--s) * .022) oklch(var(--shade) / calc(.3 * var(--a)))) drop-shadow(calc(var(--s) * -.055 * var(--k)) calc(var(--s) * .075 * var(--k)) calc(var(--s) * .06) oklch(var(--shade) / calc(.22 * var(--a))));
  transition: filter .5s cubic-bezier(.2, .8, .2, 1); }
/* hover: nothing changes colour; the shadow deepens a little and reaches further down */
.wbb-play:hover, .wbb-play:focus-visible { --k: 1.45; --a: 1.05; }
.wbb-play:active { --k: .7; --a: .92; }
.wbb-play:active .wbb-play__ring, .wbb-play:active .wbb-play__tri { transition-duration: .1s; }
.wbb-play:focus-visible { outline: 2px solid #131217; outline-offset: 8px; }

.wbb-line { margin: 0; font-family: "Stack Sans Headline", "Helvetica Neue", Arial, sans-serif; font-weight: 600; font-size: clamp(22px, 2.3vw, 44px); line-height: 1.2; letter-spacing: -0.035em; text-align: center; text-wrap: balance; background: linear-gradient(90deg, #6b6a70, #131217 62%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wbb-line__break { display: none; }                    /* phones only: break after the first "work" */
@media (max-width: 640px) { .wbb-line__break { display: inline; } .wbb-line { text-wrap: wrap; } }

/* the film, in a modal */
.wbb-film { border: 0; padding: 0; background: transparent; width: min(92vw, calc(86vh * 16 / 9)); max-width: none; max-height: none; overflow: visible; }
.wbb-film::backdrop { background: rgba(14, 14, 18, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.wbb-film video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: clamp(10px, 1.4vw, 22px); background: #000; box-shadow: 0 40px 90px rgba(0, 0, 0, .5); }
.wbb-film[open] { animation: wbb-film-in .5s cubic-bezier(.2, .9, .25, 1.1); }
.wbb-film[open]::backdrop { animation: wbb-fade-in .35s ease-out; }
@keyframes wbb-film-in { from { opacity: 0; transform: scale(.94) translateY(14px); } }
@keyframes wbb-fade-in { from { opacity: 0; } }
.wbb-film__close { position: absolute; right: 0; bottom: calc(100% + 12px); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .7); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; transition: background .2s, color .2s; }
.wbb-film__close:hover, .wbb-film__close:focus-visible { background: #fff; color: #131217; outline: none; }
.wbb-film__close svg { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) { .work-panel--brilliant, .wbb-film[open], .wbb-film[open]::backdrop { animation: none; } .wbb-play__ring, .wbb-play__tri { transition: none; } }

/* The welcome slide's line (lives here because this sheet is the homepage's own): each sentence stays whole,
   so when the line wraps it always reads "Nice to see you." / "Let's make something great!" and "Let's" is
   never left on the first line. */
.hero-title__line { display: inline-block; white-space: nowrap; }
/* on the narrowest phones the second sentence is wider than the card at full size: scale the line to fit */
@media (max-width: 380px) { body[data-hero="slider"] .hero .hero-title { font-size: min(5.9vw, 22px) !important; } }
