/* --- split-screen case study ("simple" case study template) ---
   Layout borrowed from a reference portfolio page: a text column pinned
   to the left half of the screen while the right half is a scrolling
   stack of images, so the write-up stays readable the whole time you
   look through the work. Everything visual is this site's own, reusing
   the same pieces as the other pages: the oversized bare back arrow,
   big tight-tracked headline, lime stat line, frosted-glass tag chips,
   glossy lime .cta, corner sparkle, frosted-glass image
   frames with the spring hover lift, and the shared footer + secret
   menu from /assets/site.css.

   Structure (see casestudies/_template/index.html):
     .split
       .split__info   (sticky, 100vh, left half)
         .split__back, .split__text (.split__title/year/lead/metric/
         more/tags)
       .split__media  (right half; .split__fig > img | video | .split__ph)
   The footer follows .split in normal flow. The info column is
   position:sticky, not fixed, inside .split — so it un-pins when the
   image column ends and the footer scrolls in full-width underneath.

   Phones (<=768px) collapse to one column: text first, images below. --- */

.split{display:flex;align-items:flex-start}

/* --- left: text column --- */
.split__info{position:sticky;top:0;flex:0 0 50%;max-width:50%;height:100vh;box-sizing:border-box;
      overflow-y:auto;display:flex;flex-direction:column;
      padding:clamp(20px,2.4vw,32px) clamp(24px,3.2vw,48px) clamp(20px,2.4vw,32px) clamp(20px,2.4vw,32px)}

/* same oversized bare arrow + tilt-on-hover as every other subpage's
   .back-link (that class itself is a centered 900px block, so the look
   is repeated here rather than reused) */
.split__back{--tilt:-3deg;display:inline-flex;align-self:flex-start;color:#fff;text-decoration:none;
      transition:transform .3s var(--spring),color .2s ease}
.split__back:hover,.split__back:focus-visible{transform:translateX(-8px) rotate(var(--tilt));
      color:var(--lime);outline:none}
.split__back svg{width:48px;height:48px}

/* margin-top:auto pushes the text block to the bottom of the column
   (the back arrow stays at the top); the top padding keeps it off the
   arrow when the text is tall enough to scroll the column. */
.split__text{margin:auto 0 0;padding:12px 0 0;max-width:600px}
.split__title{font-size:clamp(32px,3.5vw,54px);font-weight:600;letter-spacing:-.02em;
      line-height:1.05;margin:0 0 12px}
.split__year{font-size:18px;font-weight:700;margin:0 0 22px}
/* a run of short items separated by pipes ("Company  |  Role  |  Year"):
   each item is a <span>, and every item but the last gets a pipe after it,
   so a wrapped line ends with a pipe rather than starting with one.
   Reusable for any "a | b | c" line on these pages. */
.split__pipes{display:flex;flex-wrap:wrap;align-items:baseline}
.split__pipes>span:not(:last-child)::after{content:"|";margin:0 .7em;opacity:.55}
/* the results line wraps like ordinary text (a result can break across
   lines) instead of each result moving to a new line as a block. The
   separator is real text — two non-breaking spaces, the pipe, two more,
   then one breakable space — so the pipe stays glued to the end of the
   line it follows and the next result starts after it. */
.split__metric.split__pipes{display:block}
.split__metric.split__pipes>span:not(:last-child)::after{content:"\00a0\00a0|\00a0\00a0 ";margin:0}
.split__text p{font-size:18px;font-weight:300;line-height:1.45;margin:0 0 18px}
/* every paragraph is the same size (18px, set on .split__text p above);
   the lead and the result line stand out through weight and color only */
.split__text .split__lead{font-weight:600}
.split__text .split__metric{font-weight:600;color:var(--lime);margin:24px 0}
.split__more{--tilt:2deg;margin:0 0 4px}

/* tags: small frosted-glass chips, same recipe as the site's glass
   surfaces (tokens live in site.css) */
.split__tags{list-style:none;display:flex;flex-wrap:wrap;gap:10px;margin:22px 0 0;padding:0}
.split__tag{font-size:16px;line-height:1;padding:10px 16px;border-radius:12px;
      background:linear-gradient(135deg,rgba(255,255,255,.24),rgba(255,255,255,.07));
      -webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);
      box-shadow:var(--glass-rim)}

/* --- right: image column. Top padding clears the secret-menu button and
   corner sparkle that float in the page's top-right corner. --- */
.split__media{flex:1 1 50%;min-width:0;display:flex;flex-direction:column;gap:20px;
      padding:112px 20px 20px 0}

/* frosted-glass frame (tokens in site.css): translucent fill, lit rim,
   soft shadow; images lift with the site's spring on real hover */
.split__fig{margin:0;border-radius:22px;overflow:hidden;
      background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(255,255,255,.08));
      box-shadow:var(--glass-rim),0 14px 36px -10px rgba(0,0,0,.25);
      transition:transform .3s var(--spring)}
/* tall media (phone recordings/screenshots) is capped at roughly one
   screen so it never takes more than a viewport to scroll past; object-fit
   letterboxes it inside the frame instead of stretching it */
.split__fig img,.split__fig video{display:block;width:100%;height:auto;
      max-height:calc(100vh - 40px);object-fit:contain}
.split__fig img{cursor:zoom-in}
/* a phone video cropped tight to the device (the white backdrop around it
   was cut away in the file): the element is sized to the phone itself and
   centered, and --r (set inline per video) rounds its corners to match
   the phone's bezel, so no white shows in the corners */
.split__fig video.split__phone{width:auto;max-width:100%;margin:0 auto;border-radius:var(--r,0);
      max-height:min(70vh,620px)}
/* phone media is capped at ~70% of the screen height (instead of filling
   the whole screen), with a little air above and below inside the frame, so
   the whole phone is visible at once next to the text */
.split__fig--phone{padding:clamp(16px,2.4vw,28px) 0}
/* an image whose content runs right up to its own edges (e.g. phones that
   touch the sides of the artboard) gets even padding inside the frame */
.split__fig--pad{padding:clamp(16px,2.4vw,28px)}
@media (hover:hover){
  .split__fig:hover{transform:translateY(-4px)}
}

/* placeholder block for template pages: swap for a real <figure> */
.split__ph{aspect-ratio:16/10;display:flex;align-items:center;justify-content:center;
      text-align:center;padding:24px;font-size:16px;opacity:.75;
      border:1.5px dashed rgba(255,255,255,.45);border-radius:22px}

/* --- phones: one column, text first, images below --- */
@media (max-width:768px){
  .split{display:block}
  /* the header mirrors the "Case Studies" page's (same numbers as its
     .back-link + .page-head__title in site.css): arrow starts 120px down,
     64px, with the page's responsive side margin; the title uses the same
     clamp(40px,8vw,88px) size and starts where that page's title does
     (arrow bottom + 16px padding + the 5px inline gap = 21px) */
  .split__info{position:static;max-width:none;height:auto;overflow:visible;
        padding:120px clamp(20px,6vw,64px) 8px}
  .split__back svg{width:64px;height:64px}
  .split__text{margin:21px 0 0;padding:0}
  .split__title{font-size:clamp(40px,8vw,88px);margin-bottom:16px}
  .split__media{padding:20px}
}

@media (prefers-reduced-motion: reduce){
  .split__back,.split__fig{transition:none !important}
}
