/* Unipay case study. Extends the homepage system (reference.css tokens:
 * --bg, --ink, --muted, --line, --pad; light display type; 37/63 grid). */
.cs-page{background:var(--bg);color:var(--ink)}
.cs{padding-top:84px}
.cs-media{position:relative;overflow:hidden;border-radius:7px;background:#141414;isolation:isolate}
.cs-media img{width:100%;height:100%;object-fit:cover;transform:translate3d(0,var(--py,0px),0) scale(var(--ps,1));transition:transform .7s cubic-bezier(.2,.7,.2,1)}
[data-parallax] img{--ps:1.04;transition:none;will-change:transform}

/* Intro */
.cs-intro{padding-top:56px;padding-bottom:64px}
.cs-back{display:inline-flex;align-items:center;gap:10px;min-height:40px;font:var(--font-weight-regular) 12px var(--font-primary);text-transform:uppercase;letter-spacing:.04em;color:#9c9c9c;transition:color .2s}
.cs-back:hover{color:var(--ink)}
.cs-eyebrow{display:block;margin-top:56px;font:var(--font-weight-regular) 10px var(--font-primary);letter-spacing:.08em;color:#858585}
.cs-title{margin-top:14px;font:var(--font-weight-light) clamp(100px,17.5vw,320px)/.86 var(--font-primary);letter-spacing:-.065em;margin-left:-.04em}
.cs-subtitle{margin-top:clamp(36px,4.4vw,84px);font:var(--font-weight-light) clamp(28px,3vw,52px)/1.08 var(--font-primary);letter-spacing:-.045em;color:var(--muted)}
.cs-meta{display:grid;grid-template-columns:37% 63%;margin-top:88px;padding-top:28px;border-top:1px solid var(--line)}
.cs-facts{display:grid;gap:26px;margin:0;padding-right:40px}
.cs-facts dt{font:var(--font-weight-regular) 11px var(--font-primary);letter-spacing:.06em;text-transform:uppercase;color:#666;margin-bottom:9px}
.cs-facts dd{margin:0;font-size:16px;line-height:1.45;letter-spacing:-.02em;color:#ccc}
.cs-lede{font:var(--font-weight-regular) clamp(22px,2.05vw,34px)/1.22 var(--font-primary);letter-spacing:-.035em;max-width:980px}

/* Cover */
.cs-cover{margin:0}
.cs-cover .cs-media{aspect-ratio:1392/700;max-width:1600px;margin-inline:auto}
.cs-cover .cs-caption{max-width:1600px;margin-inline:auto}

/* Captions: small, two-part, like the portfolio meta */
.cs-caption{display:flex;justify-content:space-between;gap:20px;margin-top:14px;font-size:12px;line-height:1.4;color:#818181}
.cs-caption span:first-child{color:#ccc}

/* Section heads: number + label on the left, display heading on the right */
.cs-section{padding-top:160px}
.cs-head{display:grid;grid-template-columns:37% 63%;margin-bottom:64px}
.cs-head-label{display:flex;gap:16px;font-size:16px;letter-spacing:-.02em;color:#ccc;padding-top:14px}
.cs-head-label span{font-size:13px;color:#666;padding-top:2px}
.cs-head h2{font:var(--font-weight-light) clamp(52px,6.3vw,108px)/1.02 var(--font-primary);letter-spacing:-.055em;max-width:12ch}
.cs-head p{margin-top:28px;max-width:560px;font-size:17px;line-height:1.45;letter-spacing:-.025em;color:#a5a5a5}

/* Product */
.cs-split{display:grid;grid-template-columns:37% 63%;align-items:end}
.cs-devices{list-style:none;margin:0;padding:0 40px 40px 0}
.cs-devices li{display:flex;align-items:baseline;gap:16px;padding:10px 12px;margin-left:-12px;border-radius:3px;font:var(--font-weight-light) clamp(34px,3.4vw,58px)/1.05 var(--font-primary);letter-spacing:-.05em;color:#d8d8d8;transition:background .25s,color .25s}
.cs-devices li:hover{background:#1a1a1a;color:#fff}
.cs-devices li span{font:var(--font-weight-regular) 13px var(--font-primary);letter-spacing:0;color:#666}
.cs-figure{margin:0}
.cs-split .cs-media{aspect-ratio:1776/1020}
.cs-split .cs-figure{width:100%;max-width:920px;justify-self:end}
.cs-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;width:63%;margin-left:37%;margin-top:28px}
.cs-pair .cs-media{aspect-ratio:460/400}
.cs-offset{margin-top:120px}

/* Pointer tilt, matching the homepage project cards */
.cs-tilt{--warp-x:0deg;--warp-y:0deg;transform:perspective(1200px) rotateX(var(--warp-y)) rotateY(var(--warp-x));transition:transform .45s ease}
.cs-tilt.pointer-active{transition:transform .12s linear}

/* Light sweep: one pass when revealed, again on hover */
.cs-sweep::after{content:'';position:absolute;inset:-10%;z-index:1;pointer-events:none;background:linear-gradient(105deg,transparent 38%,rgba(255,255,255,.16) 50%,transparent 62%);transform:translateX(-120%);mix-blend-mode:screen}
.cs-js .is-in .cs-sweep::after,.cs-js .is-in.cs-sweep::after,.cs-js [data-reveal].is-in .cs-sweep::after{animation:cs-sweep 1.8s .35s cubic-bezier(.4,0,.2,1) 1}
.cs-sweep:hover::after{animation:cs-sweep 1.4s cubic-bezier(.4,0,.2,1) 1}
@keyframes cs-sweep{to{transform:translateX(120%)}}

/* Device line-up: white product shots sit on a light tile, like the journal covers */
.cs-lineup{display:grid;grid-template-columns:37% 63%;margin-top:120px}
.cs-lineup-label{display:flex;flex-direction:column;gap:6px;padding-top:6px;font-size:16px;letter-spacing:-.02em;color:#ccc}
.cs-lineup-label span{font-size:13px;color:#666}
.cs-device-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 20px}
.cs-device-media{aspect-ratio:352/306;border-radius:7px;background:#f0f0f0;overflow:hidden}
.cs-device-media img{width:100%;height:100%;object-fit:cover;transition:transform .7s cubic-bezier(.2,.7,.2,1)}
.cs-device-grid li:hover .cs-device-media img{transform:scale(1.04)}
.cs-device-grid p{display:flex;flex-direction:column;gap:4px;margin-top:14px;font-size:15px;letter-spacing:-.02em;color:#ccc}
.cs-device-grid p span{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#666}
.cs-tile.cs-tile-logo{border-style:solid;border-color:#0056eb;background:#0056eb}
.cs-tile-logo img{position:absolute;left:50%;top:44%;width:42%;height:auto;transform:translate(-50%,-50%)}
.cs-tile.cs-tile-logo em{color:rgba(255,255,255,.78)}
.cs-tile.cs-tile-logo strong{color:#fff}
.cs-tile.cs-tile-logo span{color:rgba(255,255,255,.62)}

/* Statement */
.cs-statement{padding-top:180px}
.cs-statement p:first-child{font:var(--font-weight-light) clamp(60px,8.6vw,150px)/1.04 var(--font-primary);letter-spacing:-.055em}
.cs-statement p:first-child span{color:#666}
.cs-statement-note{width:63%;margin-left:37%;margin-top:40px;max-width:560px;font-size:17px;line-height:1.45;letter-spacing:-.025em;color:#a5a5a5}

/* Brand placeholders */
.cs-brand-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
@media(max-width:1199px){.cs-brand-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.cs-tile{position:relative;display:flex;flex-direction:column;justify-content:flex-end;aspect-ratio:4/3;padding:22px 24px;border:1px dashed #2c2c2c;border-radius:7px;background:#101010}
.cs-tile span{position:absolute;top:20px;left:24px;font-size:13px;color:#666}
.cs-tile strong{font:var(--font-weight-light) clamp(28px,2.6vw,44px)/1.05 var(--font-primary);letter-spacing:-.045em;color:#d8d8d8}
.cs-tile em{margin-top:10px;font-style:normal;font-size:12px;color:#666}

/* Brand specimens. Fonts are self-hosted (OFL) and used only inside these tiles. */
@font-face{font-family:'Unipay STIX Two Text';src:url('assets/projects/unipay/fonts/stix-two-text-latin-400-normal.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Unipay Reddit Sans';src:url('assets/projects/unipay/fonts/reddit-sans-latin-400-normal.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
.cs-tile.cs-tile-colour,.cs-tile.cs-tile-type{border-style:solid;border-color:#222}
.cs-swatches{position:absolute;top:52px;left:24px;right:24px;bottom:42%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0;padding:0;list-style:none}
.cs-swatches li{min-width:0;overflow-wrap:anywhere;display:flex;flex-direction:column;justify-content:flex-end;gap:3px;padding:12px;border-radius:5px;font-size:12px;line-height:1.2}
.cs-swatches b{font-weight:var(--font-weight-regular);font-size:10px;letter-spacing:.06em;text-transform:uppercase;opacity:.65}
.cs-swatches .is-white{background:#fff;color:#111}
.cs-swatches .is-accent{background:#0056eb;color:#fff}
.cs-swatches .is-black{background:#000;color:#eee;box-shadow:inset 0 0 0 1px #2a2a2a}
.cs-specimens{position:absolute;top:52px;left:24px;right:24px;bottom:42%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.cs-specimens p{display:flex;flex-direction:column;justify-content:space-between;padding:12px;border-radius:5px;background:#181818;color:#f4f4f4}
.cs-specimens b{font-weight:400;font-size:clamp(44px,5vw,88px);line-height:1;letter-spacing:-.02em}
.cs-specimens .is-stix b{font-family:'Unipay STIX Two Text',Georgia,serif}
.cs-specimens .is-reddit b{font-family:'Unipay Reddit Sans',Arial,sans-serif}
.cs-specimens small{font-size:11px;line-height:1.3;color:#8a8a8a}
@media(max-width:600px){.cs-swatches,.cs-specimens{top:40px;left:16px;right:16px;gap:6px}.cs-swatches li,.cs-specimens p{padding:8px}.cs-swatches li{font-size:10px}.cs-swatches b{font-size:9px}.cs-specimens small{font-size:10px}}


/* Marketing */
.cs-wide{margin:0}
.cs-wide .cs-media{aspect-ratio:1440/900;max-width:1440px;margin-left:auto}
.cs-wide .cs-caption{max-width:1440px;margin-left:auto}

/* Industry strip */
.cs-industry .cs-head h2{font-size:clamp(36px,3.4vw,58px);max-width:16ch}
.cs-strip-controls{display:flex;gap:7px;margin-top:28px}
.cs-strip-controls button{width:44px;height:40px;border:1px solid #303030;border-radius:3px;background:transparent;color:#9c9c9c;font:var(--font-weight-regular) 16px var(--font-icon);transition:background .2s,color .2s}
.cs-strip-controls button:hover{background:#252525;color:#fff}
.cs-strip{list-style:none;margin:0 calc(var(--pad)*-1);padding:0 var(--pad) 18px;display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:var(--pad);scrollbar-width:thin;scrollbar-color:#333 transparent;outline:none}
.cs-strip:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.cs-strip li{flex:0 0 clamp(240px,23vw,360px);scroll-snap-align:start}
.cs-strip .cs-media{aspect-ratio:1}
.cs-strip li:hover img{transform:scale(1.035)}
.cs-strip p{display:flex;flex-direction:column;gap:4px;margin-top:14px;font-size:15px;letter-spacing:-.02em;color:#ccc}
.cs-strip p span{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#666}

/* Next */
.cs-next{padding-top:180px;padding-bottom:40px}
.cs-next a{display:block;padding-top:28px;border-top:1px solid var(--line)}
.cs-next-label{display:block;font-size:13px;color:#666}
.cs-next-title{display:block;margin-top:18px;font:var(--font-weight-light) clamp(60px,8.6vw,144px)/1.04 var(--font-primary);letter-spacing:-.052em;color:#666;transition:color .35s}
.cs-next a:hover .cs-next-title{color:var(--ink)}
.cs-page .footer{padding-top:40px}

/* Reveal (only when JS is running) */
.cs-js [data-reveal]{opacity:0;transform:translateY(28px);transition:opacity .9s ease,transform 1.1s cubic-bezier(.2,.7,.2,1)}
.cs-js [data-reveal].is-in{opacity:1;transform:none}

@media(min-width:1700px){.cs-head p,.cs-statement-note{font-size:19px}}
@media(max-width:991px){
  .cs-lineup{grid-template-columns:1fr;gap:24px;margin-top:90px}
  .cs-device-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cs-meta,.cs-head,.cs-split{grid-template-columns:1fr}
  .cs-facts{padding-right:0;grid-template-columns:1fr 1fr;margin-bottom:40px}
  .cs-head-label{padding-top:0;margin-bottom:22px}
  .cs-section{padding-top:120px}
  .cs-devices{padding:0 0 36px;display:grid;grid-template-columns:1fr 1fr}
  .cs-pair,.cs-statement-note{width:auto;margin-left:0}
  .cs-statement{padding-top:130px}
}
@media(max-width:600px){
  .cs-device-grid{gap:22px 12px}.cs-device-grid p{font-size:14px}
  .cs{padding-top:84px}
  .cs-intro{padding-top:24px;padding-bottom:44px}
  .cs-eyebrow{margin-top:36px;font-size:9px}
  .cs-title{font-size:clamp(84px,27vw,120px)}
  .cs-subtitle{font-size:26px}
  .cs-meta{margin-top:52px}
  .cs-facts{grid-template-columns:1fr;gap:22px}
  .cs-facts dd{font-size:15px}
  .cs-lede{font-size:21px;line-height:1.3} /* was 1.22: room for stacked Vietnamese diacritics */
  .cs-section{padding-top:96px}
  .cs-head{margin-bottom:36px}
  .cs-head h2{font-size:clamp(44px,12.5vw,58px)}
  .cs-head p{font-size:16px;margin-top:20px}
  .cs-devices li{font-size:clamp(26px,8.4vw,34px);gap:10px}
  .cs-pair{grid-template-columns:1fr;gap:36px}
  .cs-offset{margin-top:0}
  .cs-tile strong{overflow-wrap:anywhere}
  .cs-tile{padding:16px}.cs-tile span{top:14px;left:16px}.cs-tile strong{font-size:24px}.cs-tile em{font-size:11px}
  .cs-statement{padding-top:100px}
  .cs-statement p:first-child{font-size:clamp(44px,12.5vw,60px)}
  .cs-statement-note{font-size:16px;margin-top:26px}
  .cs-industry .cs-head h2{font-size:36px}
  .cs-strip{gap:14px}.cs-strip li{flex-basis:76vw}
  .cs-caption{font-size:11px}
  .cs-next{padding-top:110px}
  .cs-next-title{font-size:clamp(44px,12.5vw,60px)}
}

@media(prefers-reduced-motion:reduce){
  .cs-js [data-reveal]{opacity:1;transform:none;transition:none}
  .cs-media img,[data-parallax] img{transform:none!important;transition:none}
  .cs-tilt{transform:none!important}
  .cs-sweep::after{display:none}
}

/* Brand tiles stack on phones (kept last so it wins over earlier phone rules). */
@media(max-width:600px){
  .cs-brand-grid{grid-template-columns:1fr;gap:12px}
  .cs-brand-grid .cs-tile{aspect-ratio:auto;min-height:200px;padding:44px 16px 18px}
  .cs-tile.cs-tile-logo img{position:static;transform:none;width:min(52%,220px);margin:18px auto 34px}
  .cs-swatches,.cs-specimens{position:static;margin:4px 0 22px}
  .cs-swatches li,.cs-specimens p{min-height:110px}
}

/* ---- Components added for the A90 case study (shared, opt-in classes) ---- */
.cs-media-cover-a90{aspect-ratio:2526/1785!important}
.cs-split .cs-media.cs-media-square{aspect-ratio:1255/1124}
.cs-layers li{font-size:clamp(30px,2.9vw,50px)}
/* Light "sheet" tiles for logos, icons and technical drawings */
.cs-tile.cs-tile-sheet{background:#fff;border:1px solid #fff;color:#111}
.cs-tile.cs-tile-sheet strong{color:#151515}
.cs-tile.cs-tile-sheet span,.cs-tile.cs-tile-sheet em{color:#7a7a7a}
.cs-tile-art{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);height:auto}
.cs-tile-art-logo{width:min(56%,300px)}
.cs-tile-art-icons{width:min(82%,460px)}
.cs-swatches .is-gradient{background:radial-gradient(circle at 50% 28%,#7a7a7a 0,#2a2a2a 45%,#000 80%);color:#eee;box-shadow:inset 0 0 0 1px #2a2a2a}
.cs-tile.cs-tile-words{border-style:solid;border-color:#222}
.cs-type-roles{position:absolute;top:52px;left:24px;right:24px;margin:0;display:grid;gap:18px}
.cs-type-roles div{padding-bottom:16px;border-bottom:1px solid #262626}
.cs-type-roles dt{font:var(--font-weight-medium) clamp(24px,2.2vw,36px)/1.05 var(--font-primary);letter-spacing:-.035em;color:#eee}
.cs-type-roles div+div dt{font-weight:var(--font-weight-light)}
.cs-type-roles dd{margin:8px 0 0;font-size:12px;color:#8a8a8a}
/* Technical drawings + specs */
.cs-tech{display:grid;grid-template-columns:calc(37% - 20px) minmax(0,1.45fr) minmax(0,1fr);column-gap:20px;align-items:end;margin-top:28px}
.cs-specs{order:-1;margin:0;padding-right:20px}
.cs-specs div{display:flex;justify-content:space-between;gap:16px;padding:14px 0;border-top:1px solid var(--line)}
.cs-specs div:last-child{border-bottom:1px solid var(--line)}
.cs-specs dt{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#666;padding-top:5px}
.cs-specs dd{margin:0;font:var(--font-weight-light) clamp(18px,1.6vw,26px)/1.1 var(--font-primary);letter-spacing:-.03em;color:#ddd;text-align:right}
.cs-sheet{margin:0;padding:22px 22px 18px;border-radius:7px;background:#fff;color:#151515}
.cs-sheet img{display:block;width:100%;height:auto;object-fit:contain}
.cs-sheet figcaption{display:flex;justify-content:space-between;gap:12px;margin-top:16px;font-size:12px;color:#777}
.cs-sheet figcaption span{color:#151515}
/* Three-up photography */
.cs-trio{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:120px;align-items:start}
.cs-media-photo{aspect-ratio:1149/1029}
.cs-offset-sm{margin-top:80px}
/* 360° panel row */
.cs-panels{list-style:none;margin:0;padding:clamp(28px,4vw,64px) 16px;display:flex;justify-content:center;align-items:flex-end;gap:clamp(12px,2.2vw,32px);border-radius:7px;background:radial-gradient(ellipse at 50% 0,#1d1d1d,#0d0d0d 70%)}
.cs-panels li{flex:0 1 auto}
.cs-panels img{display:block;width:auto;height:clamp(300px,34vw,540px);border-radius:3px;box-shadow:0 30px 60px #0009}
.cs-panels p{display:flex;gap:10px;margin-top:16px;font-size:13px;color:#ccc}
.cs-panels p span{color:#666}
/* Pairs and wides that span the full content width */
.cs-pair.cs-pair-full{width:auto;margin-left:0;margin-top:120px}
.cs-media-light{background:#fff}
.cs-media.cs-media-qsg{display:grid;place-items:center;background:#f4f4f2}
.cs-pair>*,.cs-trio>*{min-width:0}
.cs-media.cs-media-qsg img{width:auto;height:88%;max-width:88%;object-fit:contain;box-shadow:0 18px 40px #0002}
.cs-wide.cs-wide-gap{margin-top:120px}
.cs-wide-gap .cs-media,.cs-wide-gap .cs-caption{width:63%;margin-left:auto}
.cs-wide-gap .cs-media.cs-media-grid{aspect-ratio:1149/1029}
.cs-wide-gap .cs-media.cs-media-plinth{aspect-ratio:1381/1054}
@media(max-width:991px){
  .cs-tech{grid-template-columns:1fr 1fr;row-gap:20px}
  .cs-specs{grid-column:1/-1;padding-right:0}
  .cs-trio{grid-template-columns:1fr 1fr;margin-top:90px}
  .cs-trio>:last-child{grid-column:1/-1}
  .cs-offset-sm{margin-top:0}
  .cs-pair.cs-pair-full,.cs-wide.cs-wide-gap{margin-top:90px}
  .cs-wide-gap .cs-media,.cs-wide-gap .cs-caption{width:auto}
  .cs-panels img{height:clamp(240px,40vw,400px)}
}
@media(max-width:600px){
  .cs-tech,.cs-trio{grid-template-columns:1fr}
  .cs-devices.cs-layers{grid-template-columns:1fr}
  .cs-trio{gap:36px;margin-top:70px}
  .cs-panels{display:grid;grid-template-columns:1fr 1fr;justify-items:center;gap:22px 14px;padding:24px 14px}
  .cs-panels img{height:auto;width:100%;max-width:170px}
  .cs-pair.cs-pair-full,.cs-wide.cs-wide-gap{margin-top:70px}
  .cs-sheet{padding:14px 14px 12px}
  .cs-type-roles{position:static;margin:4px 0 22px}
  .cs-brand-grid .cs-tile.cs-tile-sheet{min-height:240px}
  .cs-tile-art{top:46%}
}

/* Brand tiles: specimens sit in normal flow at every width (no absolute
 * positioning), so a narrow tile grows instead of overlapping its title. */
.cs-swatches,.cs-specimens,.cs-type-roles{position:static;margin:30px 0 auto}
.cs-swatches li,.cs-specimens p{min-height:clamp(96px,10vw,150px)}
.cs-tile.cs-tile-colour,.cs-tile.cs-tile-type,.cs-tile.cs-tile-words{justify-content:flex-start}
.cs-tile.cs-tile-colour strong,.cs-tile.cs-tile-type strong,.cs-tile.cs-tile-words strong{margin-top:22px}
@media(max-width:600px){.cs-swatches,.cs-specimens,.cs-type-roles{margin:22px 0 auto}}
.cs-tile-art,.cs-tile.cs-tile-logo img{position:static;transform:none;display:block;margin:34px auto auto}
.cs-tile.cs-tile-sheet strong,.cs-tile.cs-tile-logo strong{margin-top:22px}

/* Brand-system tiles: stretch every tile to the row height. Grid items with an
   aspect-ratio otherwise align to the start, so one tile with more text (the
   VI typography tile) ended up taller than its neighbours. */
.cs-brand-grid>.cs-tile{align-self:stretch;justify-self:stretch}
/* justify-self: with only the height stretched, the aspect-ratio derived the WIDTH from
   the taller row (440 px tiles in 329 px columns on A90 at 1440 px: tiles overlapped and
   the page scrolled sideways). Stretching both axes keeps every tile in its column. */
/* Four tiles (A90) need ~300 px each for the swatch labels; between the tablet
   breakpoint and that width they use the two-column tablet layout. */
@media(min-width:1200px) and (max-width:1319px){.cs-brand-grid-four{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Unipay logo tile: centre the logo vertically in the space above the title. */
.cs-tile.cs-tile-logo img{margin:auto}
