/* Taazzle quality round q9 (9 Oct 2026) -- home, projects and project-detail sections. Owner: B3.
   Uses the site's own tokens from site.css (--display, --body, --yellow, --black, --line, --gutter). */

/* ---------- shared bits ---------- */
.q9-more { margin: clamp(32px, 4vw, 56px) 0 0; }
.q9-tag { display: inline-block; padding: 5px 9px; background: var(--yellow); color: var(--black); font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; }
.q9-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.q9-chip { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border: 1px solid var(--black); background: transparent; font-family: var(--display); font-weight: 600; font-size: 14px; cursor: pointer; transition: background var(--dur-fast) ease, color var(--dur-fast) ease; }
.q9-chip small { font-size: 11px; opacity: .6; }
.q9-chip:hover { background: var(--yellow); }
.q9-chip.is-active { background: var(--black); color: var(--white); }
.q9-chips-small .q9-chip { min-height: 38px; font-size: 13px; padding: 0 12px; border-color: var(--line); }
.q9-chips-small .q9-chip.is-active { border-color: var(--black); }
.q9-btn-outline { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; padding: 0 24px; border: 2px solid var(--black); background: transparent; color: var(--black); font-family: var(--display); font-weight: 600; transition: background .2s ease; }
.q9-btn-outline:hover { background: var(--yellow); }

/* ---------- hero actions ---------- */
.q9-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.q9-hero-cta { min-height: 48px; display: inline-flex; align-items: center; padding: 0 22px; background: var(--yellow); color: var(--black); font-family: var(--display); font-weight: 600; }
.q9-hero-cta:hover { background: var(--white); }

/* ---------- intro + stats strip ---------- */
.q9-intro-grid { display: grid; grid-template-columns: minmax(160px, 1fr) 3fr; gap: 24px clamp(24px, 4vw, 64px); align-items: start; }
.q9-intro-text { margin: 0; max-width: 980px; font-family: var(--display); font-size: clamp(24px, 3vw, 42px); font-weight: 500; line-height: 1.12; letter-spacing: -.01em; text-wrap: pretty; }
.q9-stats { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: clamp(48px, 6vw, 88px); border-top: 2px solid var(--black); }
.q9-stat { padding: 22px 18px 6px; border-right: 1px solid var(--line); text-align: center; } /* r4: centred like the About strip */
.q9-stat + .q9-stat { padding-left: 18px; }
.q9-stat:last-child { border-right: 0; }
.q9-stat strong { display: block; font-family: var(--display); font-size: clamp(44px, 5.4vw, 84px); font-weight: 500; letter-spacing: -.015em; line-height: 1; }
.q9-stat span { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- services by line of work ---------- */
.q9-services .q9-chips { display: none; }
.q9-svc-row { display: grid; grid-template-columns: minmax(200px, 1fr) 3.4fr; gap: 24px clamp(24px, 3vw, 48px); padding: clamp(28px, 3vw, 44px) 0; border-top: 1px solid var(--black); }
.q9-svc-row[hidden] { display: none; }
.q9-svc-row-head h3 { margin: 6px 0 10px; font-family: var(--display); font-size: clamp(22px, 2.2vw, 32px); font-weight: 600; letter-spacing: -.01em; line-height: 1.05; }
.q9-svc-row-head p { margin: 0; color: var(--muted); max-width: 34ch; }
.q9-svc-row-count { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.q9-svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.q9-svc-card { position: relative; display: grid; grid-template-rows: auto auto auto 1fr auto; background: var(--white); border: 1px solid var(--line); transition: border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-expo-out); }
.q9-svc-card:hover { border-color: var(--black); transform: translateY(-4px); }
.q9-svc-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.q9-svc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-expo-out); }
.q9-svc-card:hover .q9-svc-media img { transform: scale(1.04); }
.q9-svc-num { position: absolute; top: 10px; left: 10px; padding: 4px 7px; background: var(--black); color: var(--white); font-family: var(--display); font-size: 11px; font-weight: 600; }
.q9-svc-title { display: block; padding: 16px 16px 6px; font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.q9-svc-line { display: block; padding: 0 16px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.q9-svc-more { display: block; padding: 14px 16px 16px; font-family: var(--display); font-size: 13px; font-weight: 600; }
.q9-svc-card:hover .q9-svc-more { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- project tiles (home featured, projects grid, related) ---------- */
.q9-featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.q9-featured-grid .q9-tile.is-large { grid-column: span 2; grid-row: span 2; }
.q9-featured-grid .q9-tile.is-large .q9-tile-media { aspect-ratio: auto; height: 100%; min-height: 420px; }
/* Item 25 (10 Oct review): projects top section on one left edge -- both deck columns fill their
   half up to the rule line, and the "Featured first" head stacks on the same edge as "Our work". */
.q9-proj-hero .page-deck { gap: 48px; }
.q9-proj-hero .page-deck p { max-width: none; }
.q9-projects .section-head { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.q9-projects .section-head .eyebrow { order: -1; }
.q9-project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.q9-project-grid .q9-tile.is-featured { grid-column: span 2; }
.q9-project-grid .q9-tile.is-featured .q9-tile-media { aspect-ratio: 16 / 9; }
.q9-tile { position: relative; display: flex; flex-direction: column; background: var(--black); color: var(--white); overflow: hidden; }
.q9-tile-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #222; flex: 1 1 auto; }
.q9-tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-expo-out), opacity .3s ease; }
.q9-tile:hover .q9-tile-media img { transform: scale(1.045); opacity: .86; }
.q9-tile-body { display: grid; gap: 6px; padding: 16px 18px 20px; }
.q9-tile-body .q9-tag { justify-self: start; }
.q9-tile-client { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.q9-tile-title { font-family: var(--display); font-size: clamp(18px, 1.6vw, 24px); font-weight: 600; letter-spacing: -.01em; line-height: 1.12; }
.q9-tile.is-large .q9-tile-title { font-size: clamp(24px, 2.6vw, 38px); }
.q9-tile-meta { font-size: 13px; opacity: .72; }
.q9-empty { padding: 40px 0; font-family: var(--display); font-size: 20px; }

/* ---------- Keka proof band ---------- */
.q9-keka { background: var(--black); color: var(--white); }
.q9-keka .section-title { color: var(--white); }
.q9-keka-text { margin: 0 0 32px; max-width: 900px; font-family: var(--display); font-size: clamp(22px, 2.6vw, 36px); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; }
.q9-keka-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.q9-keka-list a { min-height: 48px; display: inline-flex; align-items: center; gap: 10px; padding: 0 18px; border: 1px solid rgba(255,255,255,.4); font-family: var(--display); font-weight: 600; transition: background .2s ease, color .2s ease; }
.q9-keka-list a:hover { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.q9-keka-list small { opacity: .6; }

/* ---------- how we work ---------- */
.q9-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--black); }
.q9-step { position: relative; padding: 26px 24px 30px 0; border-bottom: 1px solid var(--line); }
.q9-step:nth-child(3n+2), .q9-step:nth-child(3n) { padding-left: 24px; border-left: 1px solid var(--line); }
.q9-step-num { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.q9-step-letter { position: absolute; top: 14px; right: 18px; font-family: var(--display); font-size: 64px; font-weight: 600; line-height: 1; color: var(--yellow); }
.q9-step h3 { margin: 18px 0 10px; font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.q9-step p { margin: 0; max-width: 38ch; color: var(--muted); }

/* ---------- industries ---------- */
.q9-industries { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.q9-industry { padding: 22px; background: var(--white); border: 1px solid var(--line); }
.q9-industry h3 { margin: 0 0 10px; font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.q9-industry p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ---------- CTA band ---------- */
.q9-cta { background: var(--yellow); }
.section + .q9-cta { border-top: 0; }
.q9-cta-inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: end; }
.q9-cta .section-title { font-size: clamp(40px, 5.4vw, 84px); }
.q9-cta .section-intro { margin-top: 18px; font-size: 18px; color: var(--black); } /* r2 item 3: grey #666 on the orange band was 1.59:1; black is 5.82:1 */
.q9-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* ---------- projects page ---------- */
.q9-filters { margin-bottom: 12px; }

/* ---------- project detail ---------- */
.q9-pd-head { padding: clamp(48px, 7vw, 110px) var(--gutter) clamp(28px, 4vw, 48px); }
.q9-pd-title { margin: 14px 0 0; max-width: 1200px; font-family: var(--display); font-size: clamp(40px, 7vw, 112px); font-weight: 500; letter-spacing: -.015em; line-height: 1; text-wrap: balance; }
.q9-pd-lede { margin: 24px 0 0; max-width: 760px; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; }
.q9-pd-hero { margin: 0; background: var(--black); }
.q9-pd-hero-media { width: 100%; max-height: 86vh; object-fit: cover; }
.q9-pd-hero.is-contained { display: grid; place-items: center; padding: clamp(16px, 3vw, 40px); }
.q9-pd-hero.is-contained .q9-pd-hero-media { width: auto; max-width: 100%; max-height: 80vh; object-fit: contain; }
.q9-pd-body { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: clamp(28px, 5vw, 80px); padding: clamp(48px, 6vw, 96px) var(--gutter); }
.q9-pd-facts-wrap { align-self: start; padding: 24px; background: var(--white); border: 1px solid var(--black); }
.q9-pd-facts { margin: 16px 0 0; display: grid; gap: 0; }
.q9-pd-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.q9-pd-facts dt { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.q9-pd-facts dd { margin: 0; font-family: var(--display); font-weight: 600; }
.q9-pd-facts dd a { text-decoration: underline; text-underline-offset: 3px; }
/* B8 wave 32 (D5): no 'What we delivered' list -> Project facts take the whole row, facts side by side (no empty column). */
.q9-pd-body.is-facts-only { grid-template-columns: 1fr; }
.q9-pd-body.is-facts-only .q9-pd-facts { display: flex; flex-wrap: wrap; }
.q9-pd-body.is-facts-only .q9-pd-facts div { flex: 1 1 200px; grid-template-columns: 1fr; align-content: start; gap: 6px; padding: 12px 16px 12px 0; }
.q9-pd-delivered h2 { margin: 0 0 20px; font-family: var(--display); font-size: clamp(28px, 3vw, 44px); font-weight: 500; letter-spacing: -.01em; }
.q9-pd-list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--black); }
.q9-pd-list li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.q9-pd-list li span:first-child { font-family: var(--display); font-weight: 600; font-size: 13px; padding-top: 3px; }
.q9-pd-gallery { columns: 3 320px; column-gap: 14px; }
.q9-pd-gallery figure { margin: 0 0 14px; break-inside: avoid; }
.q9-g-open { display: block; width: 100%; padding: 0; border: 0; background: var(--line); cursor: zoom-in; }
.q9-g-open img { width: 100%; height: auto; transition: opacity .2s ease; }
.q9-g-open:hover img { opacity: .88; }
.q9-svc-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.q9-svc-chip { display: grid; gap: 6px; padding: 20px; background: var(--white); border: 1px solid var(--black); transition: background .2s ease; }
.q9-svc-chip:hover { background: var(--yellow); }
.q9-svc-chip strong { font-family: var(--display); font-size: 18px; letter-spacing: -.01em; }
.q9-svc-chip span { font-size: 14px; color: var(--muted); }
.q9-svc-chip:hover span { color: var(--black); }
.q9-pd-nav { display: grid; grid-template-columns: 1fr auto 1fr; border-top: 1px solid var(--black); border-bottom: 1px solid var(--black); }
.q9-pn { display: grid; gap: 6px; padding: 26px var(--gutter); transition: background .2s ease; }
.q9-pn:hover { background: var(--yellow); }
.q9-pn span { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.q9-pn strong { font-family: var(--display); font-size: clamp(16px, 1.6vw, 22px); letter-spacing: -.01em; line-height: 1.15; }
.q9-pn-all { border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; }
.q9-pn-next { text-align: right; }

/* lightbox */
.q9-lightbox { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: 0; border: 0; background: rgba(0,0,0,.94); color: var(--white); }
.q9-lightbox::backdrop { background: rgba(0,0,0,.6); }
.q9-lightbox figure { margin: 0; height: 100%; display: grid; place-items: center; padding: 56px 64px; }
.q9-lightbox img { width: auto; max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.q9-lightbox figcaption { margin-top: 12px; font-family: var(--display); font-size: 13px; letter-spacing: .1em; }
.q9-lb-btn { position: absolute; width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.4); color: var(--white); font-size: 30px; line-height: 1; cursor: pointer; }
.q9-lb-btn:hover { background: var(--yellow); color: var(--black); }
.q9-lb-close { top: 14px; right: 14px; }
.q9-lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.q9-lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  /* r4: 3 + 2, the second row centred (six tracks, each number spans two) */
  .q9-stats { grid-template-columns: repeat(6, 1fr); }
  .q9-stat { grid-column: span 2; }
  .q9-stat:nth-child(3) { border-right: 0; }
  .q9-stat:nth-child(4) { grid-column: 2 / span 2; }
  .q9-svc-row { grid-template-columns: 1fr; }
  .q9-industries { grid-template-columns: repeat(2, 1fr); }
  .q9-featured-grid, .q9-project-grid { grid-template-columns: repeat(2, 1fr); }
  .q9-featured-grid .q9-tile.is-large { grid-row: auto; }
  .q9-featured-grid .q9-tile.is-large .q9-tile-media { min-height: 0; aspect-ratio: 16 / 9; }
  .q9-steps { grid-template-columns: repeat(2, 1fr); }
  .q9-step:nth-child(n) { padding-left: 0; border-left: 0; }
  .q9-step:nth-child(2n) { padding-left: 24px; border-left: 1px solid var(--line); }
  .q9-cta-inner { grid-template-columns: 1fr; }
  .q9-cta-actions { justify-content: flex-start; }
  .q9-pd-body { grid-template-columns: 1fr; }
}

/* ---------- phone ---------- */
@media (max-width: 680px) {
  .q9-intro-grid { grid-template-columns: 1fr; }
  .q9-stats { grid-template-columns: repeat(2, 1fr); }
  .q9-stat, .q9-stat + .q9-stat { grid-column: auto; padding: 18px 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .q9-stat:nth-child(4) { grid-column: auto; }
  .q9-stat:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
  .q9-stat:last-child { grid-column: 1 / -1; }
  .q9-services .q9-chips { display: flex; flex-wrap: nowrap; overflow-x: auto; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); scrollbar-width: none; }
  .q9-services .q9-chips::-webkit-scrollbar { display: none; }
  .q9-chip { flex: 0 0 auto; }
  .q9-svc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .q9-svc-title { padding: 12px 10px 4px; font-size: 15px; }
  .q9-svc-line { padding: 0 10px; font-size: 12.5px; }
  .q9-svc-more { padding: 10px 10px 12px; font-size: 12px; }
  .q9-featured-grid, .q9-project-grid { grid-template-columns: 1fr; }
  .q9-featured-grid .q9-tile.is-large, .q9-project-grid .q9-tile.is-featured { grid-column: auto; }
  .q9-project-grid .q9-tile.is-featured .q9-tile-media { aspect-ratio: 4 / 3; }
  .q9-steps { grid-template-columns: 1fr; }
  .q9-step:nth-child(n) { padding-left: 0; border-left: 0; }
  .q9-industries { grid-template-columns: 1fr; }
  .q9-cta-actions > a { flex: 1 1 100%; }
  .q9-pd-facts div { grid-template-columns: 96px 1fr; }
  .q9-pd-body.is-facts-only .q9-pd-facts { display: grid; }
  .q9-pd-body.is-facts-only .q9-pd-facts div { grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 0; }
  .q9-pd-gallery { columns: 2 140px; column-gap: 8px; }
  .q9-pd-gallery figure { margin-bottom: 8px; }
  .q9-pd-nav { grid-template-columns: 1fr 1fr; }
  .q9-pn-all { display: none; }
  .q9-lightbox figure { padding: 56px 8px; }
  .q9-lb-prev, .q9-lb-next { top: auto; bottom: 14px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .q9-svc-card, .q9-svc-media img, .q9-tile-media img { transition: none; }
  .q9-svc-card:hover { transform: none; }
  .q9-svc-card:hover .q9-svc-media img, .q9-tile:hover .q9-tile-media img { transform: none; }
}
