/* Socials: the photo fan at the foot of a page (Jed, 17 November 2026).
   templates/partials/socials.php has the markup and the why; assets/js/socials.js writes --p.

   The motion is the website kit's pinned chapter and photo fan, copied from the Ezyfit test page
   (base.css "Pinned chapter", "Arrive" and "Photo fan"; home.css .studio sizes) under a soc- prefix.
   Every card is pure CSS off one number, --p, 0 to 1 through the section's pinned scroll: the stack
   spreads from p 0.04 to 0.66 (smoothstepped), each card turning toward the middle and the outer
   ones coming up from faint. The heading, the line and the buttons sit above the fan from the start
   (Jed, 17 Nov; Ezyfit brought its line and button in under the fan at p 0.45). Only transform and
   opacity change per frame, on seven composited cards, so it is light on a weak machine.

   Without the script (or with reduced motion) the section is not pinned and shows the fan open:
   .is-live, which the script adds, is what makes it tall and gives --p its start at 0. */

/* padding 0: style.css gives every section 92px top and bottom, which put the stage 92px down the
   section (a gap above the heading on the thank-you page) and let it go 92px early */
.soc{position:relative;--p:1;padding:0;background:var(--ink);color:#fff}
.soc.is-live{height:300vh;--p:0}
.soc-stage{position:relative;min-height:100vh;min-height:100svh;overflow:hidden;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(20px,4vh,44px);
  padding:calc(var(--nav-h) + clamp(12px,3vh,32px)) 0 clamp(28px,5vh,56px)}
.soc.is-live .soc-stage{position:sticky;top:0;height:100vh;height:100svh}
/* Cora's glow behind the fan, on the stage so it stays put while the section is pinned */
.soc-stage::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse 58% 46% at 50% 66%,rgba(105,64,221,.42),rgba(214,84,153,.16) 46%,rgba(11,11,15,0) 74%)}
.soc-stage>*{position:relative;z-index:1}

/* ---- The head: the heading, the line under it, the five buttons */
.soc-head{display:flex;flex-direction:column;align-items:center;gap:clamp(12px,1.8vh,18px);padding:0 var(--pad,24px);text-align:center}
.soc-title{margin:0;color:#fff;font-size:clamp(30px,4.4vw,56px);font-weight:800;letter-spacing:-.03em;line-height:1.08}
.soc-head p{margin:0;max-width:34ch;text-wrap:balance;color:rgba(255,255,255,.88);font-size:clamp(16px,1.6vw,20px);font-weight:600;letter-spacing:-.01em;line-height:1.4}
.soc-head .soc-links{margin-top:clamp(2px,.8vh,8px)}

/* ---- The fan: --w a card's width, --gap how far apart the cards end. A card is 4 by 5, so the
   width is capped by the window's height too (a short wide window would otherwise crop it). The
   gap is a touch wider than Ezyfit's (.8 of a card, was .684) so a neighbour no longer hides the
   start of a cover's headline; the outer pair still run off the edges. */
.soc-fan{--w:min(19vw,40vh);--gap:calc(var(--w) * .8);position:relative;width:100%;
  height:calc(var(--w) * 1.25 + 2vh);perspective:1300px}
.soc-card{
  --s0:clamp(0,calc((var(--p) - .04) / .62),1);
  --s:calc(var(--s0) * var(--s0) * (3 - 2 * var(--s0)));
  --dist:max(var(--slot),calc(-1 * var(--slot)));
  --side:clamp(-1,calc(var(--slot) * 100),1);
  position:absolute;left:50%;top:50%;width:var(--w);aspect-ratio:4 / 5;margin:0;
  border-radius:var(--r-md);overflow:hidden;background:#1d1b24;
  box-shadow:0 24px 60px rgba(0,0,0,.55);
  z-index:calc(10 - var(--dist));
  opacity:calc(1 - var(--dist) * .28 * (1 - var(--s)));
  transform:translate(-50%,-50%) translateX(calc(var(--slot) * (1.4vw + var(--s) * var(--gap))))
    rotateY(calc(var(--side) * -1 * (5deg + var(--s) * 15deg))) scale(calc(1 - var(--dist) * (.15 - .07 * var(--s))));
}
.soc.is-live .soc-card{will-change:transform,opacity}
.soc-card img{display:block;width:100%;height:100%;object-fit:cover}

/* ---- The five buttons, one style for all five marks */
.soc-links{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;list-style:none;margin:0;padding:0}
.soc-links a{position:relative;isolation:isolate;display:grid;place-items:center;width:54px;height:54px;border-radius:50%;
  color:#fff;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.18);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
/* the brand gradient fades in under the mark on hover (a gradient cannot be transitioned itself) */
.soc-links a::before{content:"";position:absolute;inset:-1px;z-index:-1;border-radius:inherit;background:var(--grad);opacity:0;transition:opacity .18s ease}
.soc-links a:hover,.soc-links a:focus-visible{transform:translateY(-2px);border-color:transparent;box-shadow:0 10px 24px rgba(105,64,221,.38)}
.soc-links a:hover::before,.soc-links a:focus-visible::before{opacity:1}
.soc-links a:focus-visible{outline:2px solid #fff;outline-offset:3px}
.soc-links svg{width:22px;height:22px;fill:currentColor}

/* ---- Phones: a bigger card, the centre with its neighbours cut off at the edges (the kit's way) */
@media (max-width:760px){
  .soc-fan{--w:min(58vw,36vh);--gap:calc(var(--w) * .862)}
  .soc-links{gap:10px}
  .soc-links a{width:50px;height:50px}
  .soc-links svg{width:20px;height:20px}
}

/* ---- White (front matter socials: light): the thank-you page after joining the launch list, "on a
   white background, just to really emphasise the social following part" (Jed, 18 November 2026) */
.soc--light{background:#fff;color:var(--ink)}
.soc--light .soc-stage::before{background:radial-gradient(ellipse 58% 46% at 50% 66%,rgba(105,64,221,.13),rgba(214,84,153,.07) 46%,rgba(255,255,255,0) 74%)}
.soc--light .soc-title{color:var(--ink)}
.soc--light .soc-head p{color:var(--ink-2)}
.soc--light .soc-links a{color:var(--ink);background:#fff;border-color:#d8d4e2;box-shadow:0 6px 16px rgba(11,11,15,.06)}
.soc--light .soc-links a:hover,.soc--light .soc-links a:focus-visible{color:#fff}
.soc--light .soc-links a:focus-visible{outline-color:var(--violet)}
.soc--light .soc-card{background:#eceaf2;box-shadow:0 22px 50px rgba(30,20,60,.2)}

/* ---- The hero (front matter socials_kicker): a line above the heading with a tick in the brand
   gradient, the line under the heading on one line on a wide window, and a card a little smaller
   so the kicker fits on a short laptop window (1280 by 680) */
.soc-kicker{display:inline-flex;align-items:center;gap:10px;margin:0 0 clamp(2px,.6vh,6px);padding:7px 16px 7px 8px;border-radius:999px;
  font-size:clamp(14px,1.3vw,16px);font-weight:700;letter-spacing:-.01em;line-height:1.3;color:#fff;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16)}
.soc-kicker::before{content:"";flex:none;width:24px;height:24px;border-radius:50%;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px 14px no-repeat,var(--grad)}
.soc--light .soc-kicker{color:var(--ink);background:var(--violet-tint);border-color:#e3dbf7}
.soc--hero .soc-head p{max-width:62ch}
.soc--hero .soc-fan{--w:min(19vw,34vh)}
@media (max-width:760px){
  .soc--hero .soc-fan{--w:min(58vw,34vh)}
  .soc--hero .soc-head p{max-width:34ch}
}

/* ---- Auto (front matter socials_motion: auto): the thank-you page fans out by itself once loaded
   (assets/js/socials.js), so the section is one screen with no pin (Jed, 18 November 2026) */
.soc--auto.is-live{height:auto}
.soc--auto.is-live .soc-stage{position:relative;height:auto}
