/* Troiana — case study page (redesign prototype). Loaded after site.css. */

.cx { --ink-bg: #0B0B10; --ink-line: rgba(255,255,255,.1); --ink-soft: #8A8A96; --ink-text: #C9C9D2; }
.cx-wide { max-width: calc(var(--container-max) + 240px); margin: 0 auto; padding: 0 var(--edge); }
.cx-label { display: flex; align-items: baseline; gap: 12px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); }
.cx-label span { color: var(--signal); }
.cx-label--ink { color: var(--ink-soft); }
.cx-label--ink span { color: var(--signal-soft); }
.cx-h2 { margin: 18px 0 0; font-size: clamp(30px, 3.6vw, 48px); font-weight: 400; letter-spacing: -.03em; line-height: 1.08; max-width: 22ch; }
.cx-note { margin: 16px 0 0; color: var(--graphite); font-size: 15px; line-height: 1.55; max-width: 60ch; }
.cx-cap { margin-top: 14px; color: var(--graphite); font-family: var(--font-mono); font-size: 12px; line-height: 1.55; letter-spacing: .02em; }
.cx-cap b { color: var(--ink); font-weight: 500; }
.cx-cap--ink { color: var(--ink-soft); }
.cx-cap--ink b { color: #fff; }
.cx-sec { padding: var(--section-y) 0; }
.cx-sec__head { margin-bottom: clamp(36px, 5vw, 64px); }

/* ---------- Hero: ink band, title, film ---------- */
.cx-hero { background: var(--ink-bg); color: #fff; padding: clamp(24px, 3vw, 36px) 0 clamp(36px, 5vw, 64px); }
.cx-crumbs { display: flex; align-items: center; gap: 24px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.cx-crumbs a { color: var(--ink-soft); text-decoration: none; transition: color var(--dur-micro) var(--ease-standard); }
.cx-crumbs a:hover { color: #fff; }
.cx-crumbs__pos { margin-left: auto; }
.cx-crumbs__pos b { color: #fff; font-weight: 500; }
.cx-crumbs__step { display: flex; }
.cx-crumbs__step a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.2); font-size: 15px; letter-spacing: 0; }
.cx-crumbs__step a + a { border-left: 0; }
.cx-crumbs__step a:hover { background: rgba(255,255,255,.08); }
.cx-hero__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: clamp(32px, 5vw, 96px); align-items: end; margin-top: clamp(40px, 6vw, 88px); }
.cx-title { margin: 0; font-size: clamp(56px, 10vw, 168px); font-weight: 300; letter-spacing: -.055em; line-height: .88; overflow-wrap: break-word; }
.cx-title--long { font-size: clamp(42px, 6.6vw, 112px); line-height: .92; }
.cx-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.cx-tags span + span::before { content: '·'; margin-right: 14px; color: rgba(255,255,255,.3); }
.cx-lead { margin: 16px 0 0; color: var(--ink-text); font-size: 17px; line-height: 1.55; }
.cx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 26px; }
.cx-hero .btn--primary { background: #fff; color: var(--ink); gap: 8px; }
.cx-hero .btn--primary:hover { background: #fff; transform: scale(1.02); }
.cx-ghost { color: #fff; font-size: 15px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 2px; }
.cx-ghost:hover { border-color: #fff; }
.cx-hero__film { margin: clamp(36px, 5vw, 64px) 0 0; }
.cx-film { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.cx-film video, .cx-film img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-film--still img { object-position: top center; }
.cx-film__toggle {
  position: absolute; right: 16px; bottom: 16px; height: 34px; padding: 0 14px; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: rgba(11,11,16,.62); border: 1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.cx-film__toggle:focus-visible { outline: 2px solid var(--signal-soft); outline-offset: 2px; }
.cx-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: clamp(32px, 4vw, 52px) 0 0; border-top: 1px solid var(--ink-line); }
.cx-meta > div { padding: 18px 20px 0 0; }
.cx-meta > div + div { padding-left: 20px; border-left: 1px solid var(--ink-line); }
.cx-meta dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.cx-meta dd { margin: 8px 0 0; font-size: 16px; color: #fff; }

/* ---------- Overview + numbers ---------- */
.cx-overview__grid { display: grid; grid-template-columns: minmax(160px, 3fr) 9fr; gap: clamp(24px, 4vw, 64px); }
.cx-big { margin: 0; font-size: clamp(24px, 2.6vw, 36px); font-weight: 400; letter-spacing: -.025em; line-height: 1.3; max-width: 30ch; }
.cx-body { margin: 28px 0 0; color: var(--graphite); font-size: 18px; line-height: 1.6; max-width: 62ch; }
.cx-credit { margin: 32px 0 0; padding-left: 18px; border-left: 3px solid var(--ink); color: var(--graphite); font-size: 15.5px; line-height: 1.6; max-width: 62ch; }
.cx-credit b { color: var(--ink); font-weight: 600; }
.cx-credit--troiana { border-left-color: var(--signal); }
.cx-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(64px, 9vw, 128px); border-top: 1px solid var(--ink); }
.cx-num { padding: 22px 24px 0 0; }
.cx-num + .cx-num { padding-left: 24px; border-left: 1px solid var(--hairline); }
.cx-num__n { font-size: clamp(64px, 9vw, 144px); font-weight: 300; letter-spacing: -.06em; line-height: .9; color: var(--signal); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cx-num__l { margin-top: 14px; font-size: 15px; color: var(--graphite); }

/* ---------- What we built: an editorial list ---------- */
.cx-built { background: var(--paper); }
.cx-built__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.cx-built__row { display: grid; grid-template-columns: minmax(120px, 2fr) 4fr 5fr; gap: clamp(20px, 4vw, 64px); align-items: baseline; padding: clamp(26px, 3vw, 40px) 0; border-bottom: 1px solid var(--hairline); }
.cx-built__n { font-size: clamp(40px, 4.4vw, 64px); font-weight: 300; letter-spacing: -.05em; line-height: .9; color: var(--signal); }
.cx-built__row h3 { margin: 0; font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; letter-spacing: -.025em; line-height: 1.15; }
.cx-built__row p { margin: 0; color: var(--graphite); font-size: 16.5px; line-height: 1.6; max-width: 52ch; }

/* ---------- Live pages: a staggered spread ---------- */
.cx-shot { overflow: hidden; background: var(--paper); border: 1px solid var(--hairline); }
.cx-shot img { display: block; width: 100%; height: auto; }
.cx-pages__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 2.4vw, 36px); row-gap: clamp(32px, 4vw, 56px); align-items: start; }
.cx-pages__grid figure { margin: 0; }
.cx-pages__a { grid-column: 1 / span 7; grid-row: 1; }
.cx-pages__b { grid-column: 8 / span 5; grid-row: 1 / span 2; margin-top: clamp(80px, 12vw, 200px) !important; }
.cx-pages__a .cx-shot img, .cx-pages__b .cx-shot img { aspect-ratio: 16 / 11; object-fit: cover; object-position: top; }
.cx-pages__phone { grid-column: 3 / span 3; grid-row: 2; }
.cx-pages__phone .iphone { max-width: 300px; }

.cx-office { border-top: 1px solid var(--hairline); }
.cx-office__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px) clamp(20px, 2.4vw, 36px); align-items: start; }
.cx-office__grid figure { margin: 0; }
.cx-office__grid .is-phone .iphone { max-width: 300px; }

/* ---------- Measured: dark, gauges ---------- */
@property --g { syntax: '<number>'; inherits: true; initial-value: 0; }
.cx-measured { background: var(--ink-bg); color: #fff; }
.cx-measured .cx-note { color: var(--ink-soft); }
.cx-measured__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: center; }
.cx-gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 28px); }
.cx-gauge { text-align: center; }
.cx-gauge { position: relative; }
.cx-gauge__ring { --g: 0; position: relative; display: grid; place-items: center; aspect-ratio: 1; width: 100%; max-width: 168px; margin: 0 auto; transition: --g 1.4s var(--ease-reveal); }
.cx-gauge__ring::before {
  content: ''; position: absolute; inset: 0;
  background: conic-gradient(var(--c, #fff) calc(var(--g) * 1%), rgba(255,255,255,.1) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px) calc(100% - 1px), transparent 100%);
          mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px) calc(100% - 1px), transparent 100%);
}
.cx-gauge.is-perfect { --c: var(--signal-soft); }
.cx-gauge.is-revealed .cx-gauge__ring { --g: var(--v); }
.cx-gauge__ring span { position: relative; font-size: clamp(30px, 3.4vw, 52px); font-weight: 300; letter-spacing: -.04em; color: #fff; }
.cx-gauge__ring + .cx-gauge__l { margin-top: 14px; }
.cx-gauge__l { margin-top: 14px; }
.cx-gauge__l { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.cx-bars { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); margin-top: clamp(56px, 7vw, 96px); padding-top: 32px; border-top: 1px solid var(--ink-line); }
.cx-bar__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 15px; color: var(--ink-text); }
.cx-bar__top b { font-size: clamp(28px, 3vw, 40px); font-weight: 300; letter-spacing: -.04em; color: #fff; }
.cx-bar__track { position: relative; height: 6px; margin-top: 14px; background: rgba(255,255,255,.1); }
.cx-bar__track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--positive); transition: width 1.2s var(--ease-reveal) .2s; }
.cx-bars.is-revealed .cx-bar__track i { width: max(var(--w), 6px); }
.cx-bar__foot { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Outcome ---------- */
.cx-statement { margin: 28px 0 0; font-size: clamp(30px, 4vw, 60px); font-weight: 300; letter-spacing: -.035em; line-height: 1.12; max-width: 24ch; }
.cx-outcome .link-arrow { display: inline-flex; margin-top: 32px; }
.cx-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: clamp(48px, 6vw, 80px); padding-top: 28px; border-top: 1px solid var(--hairline); }
.cx-chips ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.cx-chips li { padding: 7px 12px; border: 1px solid var(--hairline); font-size: 14px; }

/* ---------- Next case ---------- */
.cx-next { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); min-height: clamp(360px, 42vw, 620px); background: var(--ink-bg); color: #fff; text-decoration: none; overflow: hidden; }
.cx-next__media { position: relative; overflow: hidden; }
.cx-next__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: transform 1.2s var(--ease-reveal), opacity .4s var(--ease-standard); }
.cx-next:hover .cx-next__media img { transform: scale(1.04); opacity: 1; }
.cx-next__body { display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; padding: clamp(32px, 5vw, 80px); }
.cx-next__title { font-size: clamp(44px, 6vw, 96px); font-weight: 300; letter-spacing: -.05em; line-height: .92; }
.cx-next__arrow { display: inline-block; color: var(--signal-soft); transition: transform .3s var(--ease-reveal); }
.cx-next:hover .cx-next__arrow { transform: translateX(10px); }
.cx-next__text { color: var(--ink-text); font-size: 16px; line-height: 1.55; max-width: 44ch; }
.cx-next:focus-visible { outline: 3px solid var(--signal); outline-offset: -3px; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1000px) {
  .cx-hero__head { grid-template-columns: 1fr; align-items: start; }
  .cx-measured__grid { grid-template-columns: 1fr; }
  .cx-built__row { grid-template-columns: 72px 1fr; }
  .cx-built__row p { grid-column: 2; }
  .cx-next { grid-template-columns: 1fr; }
  .cx-next__media { aspect-ratio: 16 / 9; }
}
@media (max-width: 720px) {
  .cx-crumbs { gap: 14px; }
  .cx-crumbs__pos { font-size: 11px; }
  .cx-meta { grid-template-columns: 1fr 1fr; }
  .cx-meta > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .cx-meta > div:nth-child(n+3) { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--ink-line); }
  .cx-hero__film { margin-left: calc(var(--edge) * -1); margin-right: calc(var(--edge) * -1); }
  .cx-hero__film .cx-cap { padding: 0 var(--edge); }
  .cx-overview__grid { grid-template-columns: 1fr; }
  .cx-nums { grid-template-columns: 1fr; border-top: 0; }
  .cx-num, .cx-num + .cx-num { padding: 20px 0 22px; border-left: 0; border-top: 1px solid var(--ink); }
  .cx-built__row { grid-template-columns: 1fr; gap: 10px; }
  .cx-built__row p { grid-column: auto; }
  .cx-pages__grid { grid-template-columns: 1fr; row-gap: 40px; }
  .cx-pages__a, .cx-pages__b, .cx-pages__phone { grid-column: 1 / -1; grid-row: auto; margin-top: 0 !important; }
  .cx-pages__phone .iphone { max-width: 260px; margin: 0 auto; }
  .cx-pages__phone .cx-cap { text-align: center; }
  .cx-office__grid { grid-template-columns: 1fr; }
  .cx-gauges { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .cx-gauge__ring { max-width: 132px; }
  .cx-bars { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-gauge__ring, .cx-bar__track i, .cx-next__media img { transition: none; }
}

/* Hand-built cases: the homepage screenshot that used to sit under the film. */
.cx-extra { padding-top: clamp(48px, 7vw, 104px); }
.cx-extra > figure { margin: 0; }
