/* =========================================================
   ALXO · shared layout for case study pages (Glowhaus, Artpoint, Wiro).
   Each page sets its own brand colours with --b1, --b2, --b3.
   ========================================================= */

/* ---------- Hero ---------- */
.cs-title { margin: clamp(40px, 5vw, 70px) 0 clamp(30px, 4vw, 50px); }
.specs { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); border-top: 1px solid var(--line-strong); }
.specs div { padding: 16px 20px 18px 0; min-width: 0; }
.specs div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.specs dt { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--grey-2); margin-bottom: 6px; }
.specs dd { font-size: 15px; }
.bill { margin-top: clamp(30px, 4vw, 60px); overflow: hidden; border-radius: 6px; clip-path: inset(var(--ci, 6%) round 6px); background: var(--ink-3); }
.bill img, .bill video { display: block; width: 100%; aspect-ratio: var(--ar, 9 / 4); object-fit: cover; object-position: var(--op, 50% 50%); transform: scale(var(--bs, 1.12)); transform-origin: 50% 60%; }

/* ---------- Brief ---------- */
.brief { padding: clamp(80px, 10vw, 150px) 0; }
.brief-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(30px, 6vw, 110px); margin-top: clamp(40px, 5vw, 70px); }
.brief-grid .h-l { max-width: 11ch; }
.brief-copy p { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; }
.brief-copy p + p { margin-top: 1.1em; }
.brief-copy p.lead { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 36px); line-height: 1.2; }
.made { margin-top: 34px; border-top: 1px solid var(--line-strong); }
.made li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); list-style: none; font-size: 15px; }
.made li span:last-child { color: #6b6660; text-align: right; }

/* ---------- Brand words strip ---------- */
.words { overflow: hidden; padding: clamp(26px, 3vw, 44px) 0; background: var(--wbg, var(--b1)); color: var(--wfg, var(--ink)); }
.words-track { display: flex; width: max-content; animation: words 38s linear infinite; }
.words:hover .words-track { animation-play-state: paused; }
.words-track span { display: inline-flex; align-items: center; gap: .5em; padding-right: .5em; font-family: var(--wfont, var(--serif)); font-weight: var(--wweight, 400); font-style: var(--wstyle, normal); font-size: clamp(48px, 7vw, 120px); line-height: 1; letter-spacing: -.02em; text-transform: var(--wcase, none); white-space: nowrap; }
.words-track span i { display: inline-block; width: .42em; height: .42em; background: var(--wstar, currentColor); -webkit-mask: url("cursor-star.svg") center / contain no-repeat; mask: url("cursor-star.svg") center / contain no-repeat; }
@keyframes words { to { transform: translateX(-50%); } }

/* ---------- Generic section ---------- */
.blk { padding: clamp(80px, 10vw, 150px) 0; }
.blk-intro { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin: clamp(40px, 5vw, 70px) 0 clamp(30px, 4vw, 50px); }
.blk-intro p { max-width: 42ch; color: var(--grey); }
.paper .blk-intro p { color: #4d4944; }

/* ---------- Pillars (numbered list) ---------- */
.pillars { border-top: 1px solid var(--line-strong); }
.pillar { display: grid; grid-template-columns: 60px 1fr 1.1fr; gap: 24px; align-items: baseline; padding: clamp(18px, 2vw, 28px) 0; border-bottom: 1px solid var(--line); }
.pillar .n { font-family: var(--num); font-weight: 600; font-size: 18px; color: var(--grey-2); }
.pillar h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 54px); line-height: 1; transition: transform .7s var(--ease-out), color .4s; }
.pillar p { color: var(--grey); max-width: 46ch; }
.paper .pillar p { color: #4d4944; }
.pillar:hover h3 { font-style: italic; transform: translateX(10px); color: var(--b2, inherit); }

/* ---------- Tiles (logo grids) ---------- */
.tiles { display: grid; grid-template-columns: repeat(var(--tc, 4), 1fr); gap: 10px; }
.tiles + .tiles { margin-top: 10px; }
.tile { position: relative; overflow: hidden; border-radius: 6px; transition: transform .6s var(--ease-out), opacity .4s ease, filter .4s ease; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tiles:hover .tile:not(:hover) { opacity: .45; filter: saturate(.6); }
.tile:hover { transform: scale(1.04) rotate(var(--tr, -1.5deg)); z-index: 1; }
.tile:nth-child(even) { --tr: 1.5deg; }
.tile.wide { grid-column: span 2; }

/* ---------- Colour swatches ---------- */
.sw-row { display: flex; height: clamp(380px, 46vw, 620px); margin-top: clamp(40px, 5vw, 70px); border-radius: 10px; overflow: hidden; }
.swatch { position: relative; overflow: hidden; flex: var(--fl, 1) 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; text-align: left; background: var(--c); color: var(--t, #111); transition: flex-grow .8s var(--ease-out); }
.swatch:hover, .swatch:focus-visible, .sw-row:not(:hover) .swatch.lead { flex-grow: calc(var(--fl, 1) * 3.2); }
.swatch:focus-visible { outline: 2px solid var(--paper); outline-offset: -6px; }
.swatch h3 { font-family: var(--num); font-weight: 700; font-size: clamp(26px, 2.6vw, 42px); line-height: .95; white-space: nowrap; }
.swatch .hex { font-family: var(--num); font-weight: 600; font-size: 18px; }
.swatch dl { display: grid; gap: 4px; font-size: 13px; opacity: 0; transform: translateY(10px); transition: opacity .4s ease, transform .6s var(--ease-out); white-space: nowrap; }
.swatch dl div { display: flex; gap: 10px; }
.swatch dt { width: 70px; opacity: .65; }
.swatch:hover dl, .swatch:focus-visible dl, .sw-row:not(:hover) .swatch.lead dl { opacity: 1; transform: none; }
.swatch .copy { position: absolute; right: 18px; top: 18px; padding: 6px 12px; border-radius: 999px; border: 1px solid currentColor; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: 0; transition: opacity .3s ease; }
.swatch:hover .copy { opacity: .8; }
.swatch.copied .copy { opacity: 1; background: var(--t, #111); color: var(--c); border-color: transparent; }
.sw-note { margin-top: 16px; color: var(--grey-2); font-size: 14px; }

/* ---------- Type ---------- */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: clamp(40px, 5vw, 70px); }
.face { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: clamp(380px, 38vw, 540px); padding: clamp(22px, 2.6vw, 38px); border-radius: 10px; overflow: hidden; }
.face .kicker { display: flex; justify-content: space-between; gap: 16px; }
.face p { max-width: 38ch; font-size: 15px; }
.face .specimen { max-width: 100%; }
.face .live { font-weight: var(--wt, 400); font-size: clamp(38px, 4.4vw, 70px); line-height: 1; letter-spacing: -.01em; outline: none; overflow-wrap: anywhere; }
.face .live:focus { text-decoration: underline 2px currentColor; text-underline-offset: .14em; }
.face .abc { font-weight: var(--wt, 400); font-size: clamp(17px, 1.5vw, 22px); line-height: 1.3; opacity: .7; overflow-wrap: anywhere; }
.wt { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 13px; }
.wt input { flex: 1; accent-color: currentColor; }
.wt output { width: 3ch; font-family: var(--num); font-weight: 700; font-size: 18px; text-align: right; }
.type-note { margin-top: 16px; color: #6b6660; font-size: 14px; max-width: 70ch; }

/* ---------- Gallery ---------- */
.shots { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; margin-top: clamp(40px, 5vw, 70px); }
.shot { position: relative; overflow: hidden; border-radius: 6px; background: var(--ink-3); grid-column: span var(--s, 6); }
.shot img, .shot video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.shot:hover img { transform: scale(1.04); }
.shot figcaption { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.6); color: var(--paper); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 12px; letter-spacing: .06em; opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .5s var(--ease-out); }
.shot:hover figcaption { opacity: 1; transform: none; }
.shot.r2 { grid-row: span 2; }

/* ---------- Next ---------- */
.next { position: relative; display: block; margin-top: clamp(80px, 10vw, 150px); padding: clamp(50px, 7vw, 110px) 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); overflow: hidden; }
.next .kicker { color: var(--grey-2); }
.next h2 { margin-top: 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 12vw, 210px); line-height: .85; letter-spacing: -.03em; transition: transform .9s var(--ease-out); }
.next h2 em { color: var(--grey-2); }
.next:hover h2 { transform: translateX(clamp(10px, 2vw, 30px)); }
.next .nimg { position: absolute; right: 0; top: 50%; width: clamp(200px, 30vw, 460px); aspect-ratio: 7 / 5; border-radius: 10px; overflow: hidden; transform: translateY(-50%) rotate(3deg) scale(.9); opacity: 0; transition: opacity .4s ease, transform .9s var(--ease-out); }
.next:hover .nimg { opacity: 1; transform: translateY(-50%) rotate(-2deg) scale(1); }
.next .nimg img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 1024px) {
  .specs { grid-template-columns: 1fr 1fr; }
  .specs div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .specs div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .brief-grid, .type-grid { grid-template-columns: 1fr; }
  .blk-intro { flex-direction: column; align-items: start; }
  .pillar { grid-template-columns: 44px 1fr; }
  .pillar p { grid-column: 2; }
  .next .nimg { display: none; }
}
@media (max-width: 720px) {
  .bill img, .bill video { aspect-ratio: var(--ar-m, 4 / 3); }
  .tiles { grid-template-columns: repeat(var(--tc-m, 2), 1fr); gap: 8px; }
  .tile.wide { grid-column: 1 / -1; }
  .sw-row { flex-direction: column; height: auto; }
  .swatch { min-height: 120px; flex: none; }
  .swatch dl { opacity: 1; transform: none; margin-top: 16px; }
  .swatch .copy { opacity: .8; }
  .shots { grid-template-columns: 1fr 1fr; gap: 8px; }
  .shot { grid-column: span 2; }
  .shot.half { grid-column: span 1; }
  .shot.r2 { grid-row: auto; }
  .shot figcaption { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
  .specs { grid-template-columns: 1fr; }
  .specs div, .specs div + div { padding-left: 0; border-left: 0; }
  .specs div + div { border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .words-track { animation: none; }
  .bill { clip-path: none; }
  .bill img, .bill video { transform: none; }
}
