/* ==========================================================================
   Project pages (techtank.html)
   ========================================================================== */

/* Cover */
.cover { margin: 0; position: relative; overflow: hidden; aspect-ratio: 21 / 9; background: #E8ECEF; clip-path: inset(0 0 100% 0); transition: clip-path 1.3s var(--ease-io); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.1); transition: transform 1.8s var(--ease); }
.is-ready .cover { clip-path: inset(0 0 0 0); }
.is-ready .cover img { transform: scale(1); }

/* Intro: title + facts */
.intro { padding-top: clamp(28px, 3vw, 48px); padding-bottom: clamp(96px, 11vw, 180px); row-gap: 40px; }
.title-block { grid-column: 1 / span 7; margin: 0; font-size: clamp(40px, 5.2vw, 92px); font-weight: 400; letter-spacing: -.045em; line-height: 1.02; }
.t-line { display: block; overflow: hidden; padding-top: .04em; padding-bottom: .06em; }
.t-line > span { display: block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.t-line:nth-child(2) > span { transition-delay: .08s; }
.is-ready .t-line > span { transform: none; }
.t-name { font-weight: 500; }
.t-sub { color: var(--mute); }
.facts { grid-column: 9 / -1; margin: 0; display: flex; flex-direction: column; gap: 28px; padding-top: .8em; }
.fact { display: flex; flex-direction: column; gap: 4px; }
.fact dt { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.fact dd { margin: 0; font-size: 17px; color: var(--mute); line-height: 1.45; }

/* Text sections: label left, copy right */
.brief { padding-top: 16px; border-top: 1px solid var(--rule); row-gap: 32px; }
.brief-label { grid-column: 1 / span 4; margin: 0; font-size: clamp(20px, 1.6vw, 26px); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.brief-items { grid-column: 7 / -1; display: flex; flex-direction: column; }
.item { padding: 0 0 clamp(28px, 2.6vw, 40px); margin-bottom: clamp(28px, 2.6vw, 40px); border-bottom: 1px solid var(--rule); }
.item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.item h3 { margin: 0 0 8px; font-size: clamp(17px, 1.3vw, 20px); font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }
.item p { margin: 0; font-size: clamp(16px, 1.3vw, 20px); line-height: 1.45; color: var(--mute); letter-spacing: -.006em; max-width: 38em; text-wrap: pretty; }
.item p.lead { color: var(--ink); font-size: clamp(18px, 1.7vw, 24px); }
.section-gap { padding-top: clamp(96px, 11vw, 180px); }

/* Image gallery */
.gallery { padding-top: clamp(96px, 11vw, 180px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gut); }
.shot { margin: 0; position: relative; overflow: hidden; background: #EFEFED; aspect-ratio: 4 / 5; }
.shot.full { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.shot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Before / after slider */
.shot.compare { aspect-ratio: 2 / 1; background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--rule); user-select: none; -webkit-user-select: none; }
.cmp-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cmp-old img { width: 79%; height: auto; display: block; }
.cmp-new { background: #15254D; clip-path: inset(0 100% 0 0); }
.cmp-new img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; margin-left: -2px; background: #D9D9D9; pointer-events: none; }
.cmp-knob { position: absolute; top: 50%; left: 2px; width: 44px; height: 44px; margin-top: -22px; display: flex; align-items: center; justify-content: center; background: #FFFFFF; color: var(--ink); box-shadow: 0 0 0 1px #D9D9D9; transition: transform .2s var(--ease); }
.cmp-tag { position: absolute; left: clamp(12px, 1.6vw, 24px); top: clamp(12px, 1.6vw, 24px); background: #D9D9D9; color: var(--ink); padding: 10px 18px; border-radius: 999px; font-size: clamp(11px, 1vw, 14px); font-weight: 400; letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; pointer-events: none; }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: transparent; touch-action: pan-y; }
.cmp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 100vh; }
.cmp-range::-moz-range-thumb { width: 44px; height: 100vh; border: 0; }
.compare:has(.cmp-range:focus-visible) { outline: 1px solid var(--ink); outline-offset: 6px; }
.cmp-hint { position: absolute; right: clamp(12px, 1.6vw, 24px); bottom: clamp(12px, 1.6vw, 24px); font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); pointer-events: none; transition: opacity .4s var(--ease); }
.cmp-hint.is-hidden { opacity: 0; }

/* Logo grid on a full-bleed light grey band */
.grid-band { margin: clamp(48px, 6vw, 96px) 0 0; padding: clamp(56px, 7vw, 120px) 0; background: #EDEDEB; box-shadow: 0 0 0 100vmax #EDEDEB; clip-path: inset(0 -100vmax); }
.grid-band img { width: 100%; height: auto; display: block; }

/* Applications gallery — two rows */
.apps { margin-top: clamp(96px, 11vw, 180px); display: flex; flex-direction: column; gap: var(--gut); }
.apps-row { display: grid; gap: var(--gut); }
.apps-row.r1 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.apps-row.r2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr) minmax(0, 1fr); }
.app { margin: 0; position: relative; overflow: hidden; background: #242E54; }
.app img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s var(--ease); }
.app:hover img { transform: scale(1.03); }
.app.banner { aspect-ratio: 2620 / 1000; }
.app.process { aspect-ratio: 848 / 494; background: #1A56BD; }

/* Stacked full-width images (business card + typography), no gap */
.stack-figure { margin: clamp(48px, 6vw, 96px) 0 0; background: #14244C; }
.stack-figure img { width: 100%; height: auto; display: block; }

/* Colour palette: swatches left, looping card stack right */
.palette { align-items: stretch; row-gap: 24px; }
.swatches { grid-column: 1 / span 4; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.swatch { flex: 1 1 0; min-height: 96px; border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; transition: transform .7s var(--ease); }
.swatch.is-active { transform: translateX(10px); }
.sw-hex { font-size: 14px; letter-spacing: .01em; line-height: 1.3; }
.sw-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.sw-white { background: #FFFFFF; color: #000000; box-shadow: inset 0 0 0 1px #DADADA; }
.sw-navy { background: #242E52; color: #FFFFFF; }
.sw-sapphire { background: #1756BC; color: #FFFFFF; }
.sw-mango { background: #F8BE41; color: #000000; }
.sw-black { background: #000000; color: #FFFFFF; }
.cstack { grid-column: 6 / -1; position: relative; height: clamp(560px, 64vw, 1000px); overflow: hidden; }
/* Top-aligned deck: two cards peek above as bands, the previous card peeks below.
   Card height = 63% of the stage; translateY % is of the card's own height. */
.ccard { position: absolute; left: 50%; top: 0; height: 63%; aspect-ratio: 1313 / 2000; margin: 0; overflow: hidden; background: #E6E6E6; transform-origin: 50% 0; transition: transform .65s var(--ease-io), opacity .35s var(--ease-io); }
.ccard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccard.d0 { transform: translateX(-50%) translateY(36.5%) scale(1); z-index: 5; opacity: 1; }
.ccard.d1 { transform: translateX(-50%) translateY(15.9%) scale(.93); z-index: 4; opacity: 1; }
.ccard.d2 { transform: translateX(-50%) translateY(1.6%) scale(.87); z-index: 3; opacity: 1; transition: transform .65s var(--ease-io), opacity .35s .35s var(--ease-io); }
.ccard.d4 { transform: translateX(-50%) translateY(58.7%) scale(.92); z-index: 4; opacity: 1; }
.ccard.d3 { transform: translateX(-50%) translateY(71%) scale(.84); z-index: 1; opacity: 0; }

/* Closing quote */
.quote-wrap { padding-top: clamp(120px, 14vw, 240px); padding-bottom: clamp(24px, 3vw, 48px); display: flex; justify-content: center; }
.quote { margin: 0; position: relative; max-width: 15em; padding: 0 1.6em; font-size: clamp(32px, 4.4vw, 76px); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; text-align: center; text-wrap: balance; color: var(--ink); }
.qm { position: absolute; font-size: 2.4em; line-height: 1; font-weight: 700; font-style: italic; color: #C9C9C9; letter-spacing: 0; pointer-events: none; user-select: none; }
.qm-open { left: -.05em; top: -.28em; }
.qm-close { right: -.05em; bottom: -.62em; }

/* Footer */
.next { margin-top: clamp(96px, 11vw, 180px); border-top: 1px solid var(--ink); padding-top: 16px; row-gap: 24px; }
.next-label { grid-column: 1 / span 3; margin: 0; }
.next-link { grid-column: 4 / -1; justify-self: start; font-size: clamp(36px, 5.2vw, 96px); font-weight: 500; letter-spacing: -.045em; line-height: 1.02; display: inline-flex; align-items: baseline; gap: .25em; position: relative; padding-bottom: .06em; }
.next-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .7s var(--ease); }
.next-link:hover::after, .next-link:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.next-link .arrow { font-size: .5em; }
.next-link:hover .arrow { transform: translateX(6px); }
.foot { margin-top: clamp(64px, 8vw, 140px); padding-top: 16px; padding-bottom: 20px; border-top: 1px solid var(--rule); align-items: center; row-gap: 8px; }
.foot .copy { grid-column: 1 / span 3; }
.foot .mail { grid-column: 4 / span 6; justify-self: start; }
.foot .top { grid-column: 10 / -1; justify-self: end; }

@media (max-width: 900px) {
  .title-block { grid-column: 1 / -1; }
  .facts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 24px 48px; padding-top: 0; }
  .brief-items { grid-column: 4 / -1; }
  .swatches, .cstack { grid-column: 1 / -1; }
  .swatches { flex-direction: row; }
  .swatch { min-height: 140px; padding: 16px; }
  .swatch.is-active { transform: translateY(-6px); }
  .cstack { height: min(110vw, 860px); }
}
@media (max-width: 640px) {
  .cover { aspect-ratio: 4 / 3; }
  .brief-label, .brief-items, .next-label, .next-link, .foot .copy, .foot .mail, .foot .top { grid-column: 1 / -1; }
  .foot .top { justify-self: start; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .shot.full { aspect-ratio: 4 / 3; }
  .shot.compare { aspect-ratio: 2 / 1; }
  .apps-row.r1, .apps-row.r2 { grid-template-columns: minmax(0, 1fr); }
  .app.cap { aspect-ratio: 4 / 3; }
  .app.icon, .app.tote { aspect-ratio: 4 / 5; }
  .swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .swatch { min-height: 120px; }
  .cstack { height: 130vw; }
  .cmp-tag { padding: 7px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .t-line > span, .cover img { transform: none; }
  .cover { clip-path: none; }
}
