/* Onyx Studio - case-study template styles (all /work/ pages). Loaded after site.css. */

.hero .lede{ position:absolute; left:var(--gutter); bottom:clamp(32px,7vh,72px); max-width:calc(100% - 2 * var(--gutter) - min(300px,32vw)); font-size:clamp(40px,5.4vw,92px); line-height:1; letter-spacing:-.03em; color:#fff; }
.hero .lede span{ display:inline-block; }
@media (max-width:760px){ .hero .lede{ max-width:none; right:var(--gutter); font-size:min(8.2vw,40px); } .hero .now{ display:none; } }
/* Grow */
.grow{ height:200vh; position:relative; }
.grow .art .soft{ position:absolute; inset:0; width:100%; height:100%; opacity:0; filter:brightness(1.2); }
.case .media video.over{ position:absolute; top:0; left:0; }
/* Services */
.services{ position:relative; height:calc(100dvh + 200vh); }
/* transparent sweep layers must never block clicks on what sits beneath them */
.values .stick,.voices .stick{ pointer-events:none; }
.values .slide,.voices .slide{ pointer-events:auto; }
.gridfx .gn{ position:absolute; width:7px; height:7px; background:var(--pink); opacity:0; }
.logos{ position:relative; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); border-top:1px solid var(--line-strong); border-left:1px solid var(--line-strong); }
.logos div{ position:relative; display:flex; align-items:center; justify-content:center; aspect-ratio:2/1; padding:22px; border-right:1px solid var(--line-strong); border-bottom:1px solid var(--line-strong); min-width:0; }
.logos img{ max-height:46px; max-width:76%; width:auto; object-fit:contain; filter:grayscale(1) brightness(1.6); opacity:.72; transition:filter .3s, opacity .3s; }
.logos img.tall{ max-height:62px; }
.logos img.badge{ max-height:74px; }
.logos .word{ }
@media (min-width:901px){ .logos > div:nth-last-of-type(-n+3){ grid-column:span 2; aspect-ratio:4/1; } }
@media (max-width:520px){ .logos > div:last-of-type{ grid-column:span 2; aspect-ratio:4/1; } }
@media (max-width:900px){ .logos{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:520px){ .logos{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
.layer.front{ pointer-events:none; }
.layer.front h2,.layer.front .row{ pointer-events:auto; }
.buildlink{ pointer-events:auto; display:block; cursor:pointer; }
.buildlink .solid{ transition:color .25s ease, transform .35s cubic-bezier(.2,.7,.2,1); }
.buildlink .solid .arr{ display:inline-block; font-size:.42em; vertical-align:top; margin-left:.12em; opacity:0; transform:translateX(-12px); transition:opacity .25s, transform .35s cubic-bezier(.2,.7,.2,1); }
.buildlink:hover .solid .arr,.buildlink:focus-visible .solid .arr{ opacity:1; transform:none; color:var(--pink); }
.chero video,.chero .poster{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-2; }
.chero::after{ content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(180deg,rgba(0,0,0,.4) 0%,rgba(0,0,0,0) 35%,rgba(0,0,0,.35) 60%,rgba(0,0,0,.92) 100%),linear-gradient(90deg,rgba(0,0,0,.55),rgba(0,0,0,0) 55%); }
.chero .in{ position:absolute; left:var(--gutter); right:var(--gutter); bottom:clamp(32px,6vh,64px); display:grid; grid-template-columns:repeat(var(--cols),1fr); align-items:end; }
.chero .kick{ grid-column:1 / -1; color:var(--pink); font-size:14px; margin-bottom:12px; }
.chero h1{ grid-column:1 / -1; font-size:clamp(64px,10vw,170px); line-height:.9; letter-spacing:-.035em; }
.back:hover{ color:#fff; }
/* Back link sits just below the fixed corner bracket (16px at 88px; 12px at 80px on phones) instead of on it.
   .chero .back outranks the .back{ top:96px } each page file still carries. */
.chero .back{ top:112px; }
@media (max-width:760px){ .chero .back{ top:100px; } }
/* Pinned horizontal gallery: each still as large as the screen allows */
.gallery{ --figH:min(calc(100dvh - 150px), calc((100vw - 2 * var(--gutter)) * 9 / 16)); --figW:calc(var(--figH) * 16 / 9); }
.gallery .pin{ height:100dvh; display:flex; align-items:center; overflow:hidden; padding-top:64px; }
.gallery .rail2{ display:flex; gap:clamp(14px,1.4vw,24px); padding:0 calc(50vw - var(--figW) / 2); width:max-content; align-items:center; }
.gallery figure{ margin:0; flex:none; width:var(--figW); }
.gallery figure .m{ height:var(--figH); overflow:hidden; background:var(--surface); }
.gallery figcaption{ margin-top:10px; font-size:12px; color:var(--dim); font-variant-numeric:tabular-nums; }
.band .stick{ position:sticky; top:0; height:100dvh; overflow:hidden; isolation:isolate; display:grid; align-content:end; padding:0 var(--gutter) clamp(48px,11vh,120px); }
.band .bgm{ position:absolute; inset:-6% 0; z-index:-2; }
.band .bgm img,.band .bgm video{ width:100%; height:100%; object-fit:cover; display:block; }
.band .stick::after{ content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,rgba(0,0,0,.8) 0%,rgba(0,0,0,.42) 38%,rgba(0,0,0,0) 68%),linear-gradient(0deg,rgba(0,0,0,.72),rgba(0,0,0,0) 46%),linear-gradient(180deg,rgba(0,0,0,.35),rgba(0,0,0,0) 18%); }
.band .copy{ width:min(680px,100%); }
.band .copy .num{ font:600 16px var(--display); letter-spacing:.08em; color:var(--pink); margin-bottom:14px; display:block; }
.band .copy h2{ font-size:clamp(40px,5.4vw,88px); line-height:1; letter-spacing:-.025em; margin-bottom:24px; }
.band .copy .body{ display:grid; gap:16px; font-size:clamp(16px,1.2vw,19px); line-height:1.55; color:rgba(255,255,255,.92); }
.band .tag{ position:absolute; right:var(--gutter); top:96px; font-size:12px; padding:5px 8px; background:rgba(0,0,0,.6); border:1px solid rgba(255,255,255,.25); color:#fff; }
.scope .stick{ position:sticky; top:0; height:100dvh; overflow:hidden; }
.scope img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transform:scale(1.15); }
.scope .reticle{ position:absolute; width:clamp(120px,14vw,220px); aspect-ratio:1; border:2px solid #fff; border-radius:50%; transform:translate(-50%,-50%); box-shadow:0 0 0 1px rgba(0,0,0,.5), 0 0 24px rgba(248,66,145,.55); }
.scope .reticle::before,.scope .reticle::after{ content:""; position:absolute; background:var(--pink); }
.scope .reticle::before{ left:50%; top:-18%; bottom:-18%; width:2px; margin-left:-1px; }
.scope .reticle::after{ top:50%; left:-18%; right:-18%; height:2px; margin-top:-1px; }
.scope .line{ position:absolute; height:2px; background:linear-gradient(90deg,rgba(248,66,145,.15),var(--pink)); transform-origin:left center; box-shadow:0 0 10px rgba(248,66,145,.6); }
.scope .stick::after{ content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(90deg,rgba(0,0,0,.8) 0%,rgba(0,0,0,.42) 38%,rgba(0,0,0,0) 68%),linear-gradient(0deg,rgba(0,0,0,.72),rgba(0,0,0,0) 46%); }
.scope .copy{ position:absolute; z-index:1; left:var(--gutter); bottom:clamp(48px,11vh,120px); width:min(680px,calc(100% - 2 * var(--gutter))); }
.scope .hud,.scope .line,.scope .reticle{ z-index:1; }
.scope .copy .num{ font:600 16px var(--display); letter-spacing:.08em; color:var(--pink); display:block; margin-bottom:14px; }
.scope .copy h2{ font-size:clamp(40px,5.4vw,88px); line-height:1; letter-spacing:-.025em; margin-bottom:24px; }
.scope .copy .body{ display:grid; gap:16px; font-size:clamp(16px,1.2vw,19px); line-height:1.55; color:rgba(255,255,255,.92); }
.scope .hud{ color:#fff; }
.press .slide .inner{ align-items:start; }
.outro .bgm{ position:absolute; inset:-10% 0; z-index:-2; }
.outro .bgm img{ width:100%; height:100%; object-fit:cover; filter:brightness(.38); }
.outro .num{ font:600 16px var(--display); letter-spacing:.08em; color:var(--pink); margin-bottom:10px; }
.outro .gtext{ margin-bottom:28px; }
.outro .body{ max-width:60ch; display:grid; gap:16px; font-size:clamp(17px,1.3vw,21px); }
.outro .row{ display:flex; gap:12px; flex-wrap:wrap; margin-top:34px; }
.outro .row .totop{ margin-left:auto; }   /* "Back to top" sits apart, at the right end of the row */
.totop .s{ display:none; }
.btn.totop:hover .arr{ transform:translateY(-3px); }
/* Closing line under the buttons: says what Onyx is and links to Home and the work section (wording signed by Bosko) */
.outro .about{ margin-top:24px; max-width:60ch; font-size:15px; line-height:1.5; color:rgba(255,255,255,.74); }
.outro .about a{ color:#fff; text-decoration:underline; text-decoration-color:rgba(255,255,255,.45); text-underline-offset:3px; }
.outro .about a:hover{ text-decoration-color:var(--pink); }
/* Phones: the outro is bottom-aligned and the footer shares the last screen, so at the end of the page the section number
   sits at (viewport - footer - everything from the number down). Tighter spacing and the 15px phone copy size used by the
   bands keep number and heading below the 72px header and the 12px bracket at 80px. main > .outro outranks the page files' .outro. */
@media (max-width:760px){
  main > .outro{ padding:100px var(--gutter) 20px; }
  .outro .num{ margin-bottom:6px; }
  .outro .gtext{ margin-bottom:16px; }
  .outro .body{ font-size:15px; line-height:1.45; gap:10px; }
  .outro .row{ margin-top:16px; gap:8px; }
  .outro .about{ margin-top:12px; font-size:13px; line-height:1.4; }
  /* The closing line already links to the work section, so the "Back to selected work" button gives its row back:
     without this the line pushes the section number under the header at the end of the page. */
  .outro .row a[href="/#work"]{ display:none; }
  /* "Back to top" shares the first line with "Start a conversation", shortened to "Top", so it adds no line of its own */
  .outro .row > *{ order:2; } .outro .row > :first-child{ order:0; } .outro .row .totop{ order:1; }
  .totop .l{ display:none; } .totop .s{ display:inline; }
}
/* Figures: Home's big numbers, three to a row so each spans two column lines */
.figs ol{ grid-template-columns:repeat(3,1fr); }
.figs li h3{ max-width:22ch; }
@media (max-width:760px){ .figs ol{ grid-template-columns:1fr; } }

/* ---------- Stepped layout (class "cm" on <html>, set by caseMotion in site.js when motion is on) ----------
   Every chapter is one screen; a gallery holds the screen for one step per still, the press section for one step per quote
   (--n is set by the script; --stepL is the scroll distance of one step). These outrank the fixed heights the page files still carry. */
:root{ --stepL:80vh; }
.cm .band,.cm .scope{ height:100dvh; }
.cm .press{ height:calc(100dvh + (var(--n,3) - 1) * var(--stepL)); }
@media (min-width:761px){
  .cm .gallery{ height:calc(100dvh + (var(--n,1) - 1) * var(--stepL)); }
  .cm .gallery .pin{ position:sticky; top:0; }
  .cm .reel{ height:100dvh; }
  .cm .steps.landing{ height:auto; }
  .cm .steps.landing .stick{ position:relative; height:auto; min-height:100dvh; }
}
