/* Taazzle q9 services pages (services.html + service-detail.html). Builds on site.css tokens. */
.q9-services-page { --q9-ink: var(--black); --q9-soft: #6b6863; --q9-card: var(--white); --q9-radius: 4px; }
.q9-services-page main { overflow-x: clip; }

/* buttons */
.q9-btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.q9-btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; border: 2px solid var(--black); font-family: var(--display); font-weight: 600; font-size: 15px; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.q9-btn-dark { background: var(--black); color: var(--white); }
.q9-btn-dark:hover { background: var(--yellow); color: var(--black); }
.q9-btn-whatsapp { background: #1f8f4e; border-color: #1f8f4e; color: var(--white); }
.q9-btn-whatsapp:hover { background: #17733e; border-color: #17733e; }
.q9-btn-light { background: var(--white); color: var(--black); }
.q9-btn-light:hover { background: var(--yellow); }
.q9-btn-row-hero .q9-btn-dark { background: var(--yellow); border-color: var(--yellow); color: var(--black); }
.q9-btn-row-hero .q9-btn-light { background: transparent; border-color: var(--white); color: var(--white); }
.q9-btn-row-hero .q9-btn-light:hover { background: var(--white); color: var(--black); }

/* headings shared */
.q9-h2 { margin: 0; font-family: var(--display); font-size: clamp(30px, 4.2vw, 60px); font-weight: 500; letter-spacing: -.01em; line-height: 1; text-wrap: balance; }
.q9-section { padding: clamp(56px, 7vw, 112px) var(--gutter); border-top: 1px solid var(--line); }
.q9-section-head { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(0, 2.3fr) auto; gap: 14px 30px; align-items: end; margin-bottom: clamp(28px, 4vw, 52px); }
.q9-section-head .eyebrow { align-self: start; padding-top: .6em; }
.q9-text-link { font-family: var(--display); font-weight: 600; border-bottom: 2px solid var(--black); padding-bottom: 2px; white-space: nowrap; }
.q9-text-link:hover { border-color: var(--yellow); }
.q9-lede { margin: 14px 0 0; max-width: 560px; font-size: 18px; color: var(--q9-soft); }

/* full-bleed heroes */
.q9-hero, .q9-index-hero { position: relative; min-height: clamp(520px, 78vh, 860px); display: flex; align-items: flex-end; color: var(--white); background: #111; isolation: isolate; }
.q9-index-hero { min-height: clamp(440px, 62vh, 700px); }
.q9-hero-pic, .q9-index-hero-pic { position: absolute; inset: 0; z-index: -2; }
.q9-hero-img, .q9-index-hero-img, .q9-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; z-index: -2; }
/* B8 wave 33 (D6): flagged hero photo never drawn larger than its own size -- centred, the dark hero colour around it. */
.q9-hero.is-natural .q9-hero-img { inset: auto; left: 50%; top: 50%; max-width: var(--q9-hero-w); max-height: var(--q9-hero-h); transform: translate(-50%, -50%); }
.q9-hero-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.08) 35%, rgba(0,0,0,.72) 100%); }
.q9-hero-copy, .q9-index-hero-copy { width: 100%; padding: clamp(110px, 14vw, 180px) var(--gutter) clamp(36px, 5vw, 68px); max-width: 1180px; }
.q9-crumbs { display: flex; gap: 10px; font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.q9-crumbs a:hover { color: var(--yellow); }
.q9-hero-index { margin: 18px 0 8px; font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--yellow); }
.q9-hero-title, .q9-index-title { margin: 0; font-family: var(--display); font-size: clamp(44px, 7.4vw, 120px); font-weight: 500; letter-spacing: -.015em; line-height: 1; text-wrap: balance; }
.q9-hero-sub { margin: 18px 0 26px; max-width: 680px; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.4; color: rgba(255,255,255,.9); }
.q9-index-hero .eyebrow { color: var(--yellow); margin-bottom: 14px; }
.q9-hero-caption { position: absolute; right: var(--gutter); bottom: 14px; margin: 0; max-width: 40%; font-size: 12px; color: rgba(255,255,255,.75); text-align: right; }

/* category tabs */
.q9-tabs-wrap { position: sticky; top: 0; z-index: 30; background: var(--ground); border-bottom: 1px solid var(--line); }
.q9-tabs { display: flex; gap: 8px; padding: 14px var(--gutter); overflow-x: auto; scrollbar-width: none; }
.q9-tabs::-webkit-scrollbar { display: none; }
.q9-tab { flex: 0 0 auto; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--black); border-radius: 999px; background: transparent; font-family: var(--display); font-weight: 600; font-size: 14px; cursor: pointer; }
.q9-tab span { margin-left: 6px; font-weight: 500; opacity: .6; }
.q9-tab[aria-pressed="true"] { background: var(--black); color: var(--white); }
.q9-tab:hover:not([aria-pressed="true"]) { background: var(--yellow); }

/* category groups + cards */
.q9-index-grid { padding: 0 var(--gutter) clamp(40px, 6vw, 90px); }
.q9-group { padding-top: clamp(44px, 6vw, 84px); }
.q9-group[hidden] { display: none; }
.q9-group-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px 40px; align-items: end; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 2px solid var(--black); }
.q9-group-head p { margin: 0; color: var(--q9-soft); font-size: 17px; }
.q9-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.q9-card { display: flex; flex-direction: column; background: var(--q9-card); border: 1px solid var(--line); border-radius: var(--q9-radius); overflow: hidden; transition: transform .35s var(--ease-expo-out), box-shadow .35s ease; }
.q9-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.10); }
.q9-card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; }
.q9-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-expo-out); }
.q9-card:hover .q9-card-media img { transform: scale(1.04); }
.q9-card-index { position: absolute; top: 12px; left: 12px; padding: 4px 9px; background: var(--yellow); color: var(--black); font-family: var(--display); font-weight: 600; font-size: 13px; }
.q9-card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 22px; flex: 1; }
.q9-card-cat { margin: 0; font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--q9-soft); }
.q9-card-title { margin: 0; font-family: var(--display); font-size: clamp(21px, 1.7vw, 26px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.q9-card-title a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.q9-card-text { margin: 0; color: #36332f; }
.q9-card-list { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: #36332f; }
.q9-card-list li { position: relative; padding-left: 18px; }
.q9-card-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--teal-hex); }
.q9-card-link { margin-top: auto; padding-top: 8px; font-family: var(--display); font-weight: 600; }
.q9-card:hover .q9-card-link { color: #000; text-decoration: underline; }
/* Item 15: whole card clickable through the title link */
.q9-card { position: relative; cursor: pointer; }
.q9-card-hit::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.q9-card:has(.q9-card-hit:focus-visible) { outline: 3px solid var(--black); outline-offset: 3px; }
.q9-card:has(.q9-card-hit:focus-visible) .q9-card-hit:focus-visible { outline: none; }
.q9-card:hover .q9-card-title a { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.q9-cards-compact .q9-card-list { display: none; }

/* capabilities + logos */
.q9-cap-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 30px; }
.q9-cap-list li { padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--display); font-size: clamp(16px, 1.3vw, 19px); font-weight: 500; }
.q9-logos { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.q9-logos li { flex: 0 0 calc((100% - 60px) / 6); display: grid; place-items: center; min-height: 110px; padding: 18px; background: var(--white); border: 1px solid var(--line); }
.q9-logos img { width: auto; max-width: 130px; max-height: 54px; object-fit: contain; filter: grayscale(1); opacity: .85; transition: filter .25s ease, opacity .25s ease; }
.q9-logos li:hover img { filter: none; opacity: 1; }

/* service detail: intro + facts */
.q9-intro { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: clamp(28px, 5vw, 80px); border-top: 0; }
.q9-intro-copy .eyebrow { margin-bottom: 18px; }
.q9-lead { margin: 0 0 20px; font-family: var(--display); font-size: clamp(22px, 2.2vw, 32px); font-weight: 500; letter-spacing: -.01em; line-height: 1.22; }
.q9-body { margin: 0; font-size: 18px; line-height: 1.6; color: #36332f; max-width: 720px; }
.q9-facts { align-self: start; background: var(--white); border: 2px solid var(--black); padding: 24px; }
.q9-facts-title { margin: 0 0 14px; font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.q9-facts dl { margin: 0; display: grid; gap: 16px; }
.q9-facts dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--q9-soft); }
.q9-facts dd { margin: 4px 0 0; font-family: var(--display); font-size: 17px; font-weight: 500; }
.q9-facts ul { margin: 0; padding-left: 18px; }

/* included + process */
.q9-included-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.q9-included-list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.q9-tick { width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); position: relative; margin-top: 1px; }
.q9-tick::after { content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border: solid var(--black); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.q9-process { background: var(--black); color: var(--white); border-top: 0; }
.q9-process .eyebrow { color: var(--yellow); }
.q9-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2px; }
.q9-steps li { padding: 26px 22px 30px; background: #151515; border-top: 3px solid var(--yellow); }
.q9-step-num { font-family: var(--display); font-size: 38px; font-weight: 500; color: var(--yellow); }
.q9-steps h3 { margin: 14px 0 8px; font-family: var(--display); font-size: 22px; font-weight: 600; }
.q9-steps p { margin: 0; color: rgba(255,255,255,.78); }

/* gallery */
.q9-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; gap: clamp(10px, 1.4vw, 18px); }
.q9-shot { margin: 0; }
.q9-shot.is-tall { grid-row: span 2; }
.q9-shot-btn { display: block; width: 100%; padding: 0; border: 0; background: #ddd; cursor: zoom-in; overflow: hidden; aspect-ratio: 4 / 3; }
.q9-shot.is-tall .q9-shot-btn { aspect-ratio: auto; height: calc(100% - 34px); min-height: 320px; }
.q9-shot-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-expo-out); }
.q9-shot-btn:hover img { transform: scale(1.03); }
.q9-shot figcaption { padding-top: 8px; font-size: 13px; color: var(--q9-soft); }
.q9-shot:first-child { grid-column: span 2; grid-row: span 2; }
.q9-shot:first-child .q9-shot-btn { aspect-ratio: auto; height: calc(100% - 34px); }

/* lightbox */
.q9-lightbox { width: min(1400px, 96vw); max-height: 94vh; padding: 0; border: 0; background: transparent; color: var(--white); overflow: visible; }
.q9-lightbox::backdrop { background: rgba(0,0,0,.88); }
.q9-lightbox figure { margin: 0; }
.q9-lightbox img { max-height: 84vh; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; }
.q9-lightbox figcaption { padding-top: 10px; text-align: center; font-size: 14px; }
.q9-lb-close, .q9-lb-prev, .q9-lb-next { position: fixed; width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: var(--white); font-size: 30px; line-height: 1; cursor: pointer; }
.q9-lb-close { top: 18px; right: 18px; }
.q9-lb-prev { left: 18px; top: 50%; }
.q9-lb-next { right: 18px; top: 50%; }

/* related projects */
.q9-project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.q9-project a { display: grid; gap: 8px; }
.q9-project-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #ddd; }
.q9-project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-expo-out); }
.q9-project a:hover img { transform: scale(1.04); }
.q9-project-meta { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--q9-soft); }
.q9-project-title { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
/* B8 wave 31 (D3): no empty columns. 2 cards fill the row as two equal columns; 1 card becomes one wide
   card -- photo on the left two thirds, client line and title centred in the right third. */
.q9-project-grid.is-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.q9-project-grid.is-n1 { grid-template-columns: minmax(0, 1fr); }
.q9-project-grid.is-n1 .q9-project a { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr; column-gap: clamp(20px, 3vw, 48px); row-gap: 10px; }
.q9-project-grid.is-n1 .q9-project-media { grid-column: 1; grid-row: 1 / -1; aspect-ratio: 16 / 9; }
.q9-project-grid.is-n1 .q9-project-meta { grid-column: 2; grid-row: 2; }
.q9-project-grid.is-n1 .q9-project-title { grid-column: 2; grid-row: 3; font-size: clamp(24px, 2.4vw, 34px); }

/* faq */
.q9-faq-list { max-width: 980px; margin-left: auto; }
.q9-faq-list details { border-bottom: 1px solid var(--line); }
.q9-faq-list summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-family: var(--display); font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; }
.q9-faq-list summary::-webkit-details-marker { display: none; }
.q9-faq-list summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-size: 30px; font-weight: 400; }
.q9-faq-list details[open] summary::after { content: "–"; }
.q9-faq-list p { margin: 0 0 22px; max-width: 760px; font-size: 17px; line-height: 1.6; color: #36332f; }

/* CTA band */
.q9-cta { background: var(--yellow); padding: clamp(56px, 7vw, 104px) var(--gutter); }
.q9-cta-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 28px 40px; align-items: end; }
.q9-cta .q9-lede { color: var(--black); } /* r2 item 3: #2d2a25 on the orange band was 3.96:1; black is 5.82:1 */
.q9-cta .q9-btn-light { background: transparent; }

/* responsive */
@media (max-width: 1100px) {
  .q9-cards, .q9-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q9-logos li { flex-basis: calc((100% - 36px) / 4); }
  .q9-cap-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* B8 wave 33 (item 3): between phone and desktop the case-study grid has 2 columns, so 3 cards left the third alone
   beside an empty column. The lone last card now takes the whole row as one wide card -- the same layout round 31 gave a
   single card (photo on the left two thirds, client line and title in the right third). Phone and desktop untouched. */
@media (min-width: 761px) and (max-width: 1100px) {
  .q9-project-grid:not(.is-n1):not(.is-n2) > .q9-project:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .q9-project-grid:not(.is-n1):not(.is-n2) > .q9-project:last-child:nth-child(odd) a { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr; column-gap: clamp(20px, 3vw, 48px); row-gap: 10px; }
  .q9-project-grid:not(.is-n1):not(.is-n2) > .q9-project:last-child:nth-child(odd) .q9-project-media { grid-column: 1; grid-row: 1 / -1; aspect-ratio: 16 / 9; }
  .q9-project-grid:not(.is-n1):not(.is-n2) > .q9-project:last-child:nth-child(odd) .q9-project-meta { grid-column: 2; grid-row: 2; }
  .q9-project-grid:not(.is-n1):not(.is-n2) > .q9-project:last-child:nth-child(odd) .q9-project-title { grid-column: 2; grid-row: 3; font-size: clamp(24px, 2.4vw, 34px); }
}
@media (max-width: 760px) {
  .q9-section-head { grid-template-columns: 1fr; }
  .q9-section-head .eyebrow { padding-top: 0; }
  .q9-group-head, .q9-intro, .q9-cta-inner { grid-template-columns: 1fr; }
  .q9-cards, .q9-project-grid, .q9-included-list, .q9-cap-list { grid-template-columns: 1fr; }
  .q9-project-grid.is-n1, .q9-project-grid.is-n2 { grid-template-columns: 1fr; }
  .q9-project-grid.is-n1 .q9-project a { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 8px; }
  .q9-project-grid.is-n1 .q9-project-media, .q9-project-grid.is-n1 .q9-project-meta, .q9-project-grid.is-n1 .q9-project-title { grid-column: auto; grid-row: auto; }
  .q9-project-grid.is-n1 .q9-project-media { aspect-ratio: 3 / 2; }
  .q9-project-grid.is-n1 .q9-project-title { font-size: 21px; }
  .q9-logos li { flex-basis: calc((100% - 12px) / 2); }
  .q9-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q9-shot:first-child { grid-column: 1 / -1; grid-row: auto; }
  .q9-shot:first-child .q9-shot-btn { aspect-ratio: 4 / 3; height: auto; }
  .q9-shot.is-tall { grid-row: span 1; }
  .q9-shot.is-tall .q9-shot-btn { aspect-ratio: 3 / 4; height: auto; min-height: 0; }
  .q9-hero, .q9-index-hero { min-height: 560px; }
  .q9-hero-caption { display: none; }
  .q9-btn { flex: 1 1 auto; }
  .q9-lb-prev, .q9-lb-next { top: auto; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .q9-card, .q9-card-media img, .q9-shot-btn img, .q9-project-media img { transition: none; }
}
