/* About: dark intro panel, services detail, client marquee, evals chapter, testimonial deck.
   Static end-states only; entrances live in motion.css (Task 8), marquee and deck motion in Task 10. */

/* ---- Intro panel: full-bleed; the gutter moves into the side padding so the copy keeps its old x ---- */
.about-hero { margin: 0; background: radial-gradient(120% 90% at 85% 110%, #3a3a3a 0%, #121212 48%, #050505 100%); color: #fff; overflow: clip; padding: clamp(116px, 14vh, 168px) calc(var(--gutter) + clamp(24px, 4vw, 64px)) clamp(28px, 4vw, 64px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); align-items: end; gap: 40px clamp(32px, 6vw, 112px); }
.about-hero > * { position: relative; }
.about-hero h1 { font-size: clamp(56px, 8.4vw, 132px); line-height: .9; letter-spacing: -0.035em; color: #f2f2f1; text-wrap: balance; }
.about-bio { margin: 32px 0 0; max-width: 30ch; font: 400 clamp(22px, 2.1vw, 30px)/1.25 var(--serif); letter-spacing: -0.005em; color: rgb(255 255 255 / .86); text-wrap: pretty; }
.about-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 0; margin: 36px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line-inv); color: var(--muted-inv); }
.about-meta li + li::before { content: "·"; margin: 0 14px; }
@media (max-width: 520px) {
  .about-meta { flex-direction: column; gap: 8px; }
  .about-meta li + li::before { content: none; }
}
.about-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.about-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-inv); border-radius: 999px; color: #fff; text-decoration: none; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease; -webkit-tap-highlight-color: transparent; }
.about-link .icon { width: 13px; height: 13px; }
.about-link--solid { background: #fff; border-color: #fff; color: var(--ink); }
.about-link:focus-visible { border-radius: 999px; }
.about-link:active { transform: scale(.97); }
.about-portrait { margin: 0; aspect-ratio: 4 / 5; border-radius: var(--r-tile); overflow: clip; background: #1a1a1a; box-shadow: 0 40px 80px -40px rgb(0 0 0 / .9); }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; filter: grayscale(1) contrast(1.05); }
@media (hover: hover) and (pointer: fine) {
  .about-link:hover { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .28); }
  .about-link--solid:hover { background: var(--tile-grey); border-color: var(--tile-grey); }
}
@media (prefers-reduced-motion: reduce) {
  .about-link:active, .deck-card figcaption a:active { transform: none; }
}
@media (max-width: 860px) {
  .about-hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .about-portrait { grid-row: 1; width: min(100%, 360px); }
}

/* ---- Light sections ---- */
.about-section { margin: clamp(96px, 12vw, 176px) var(--gutter) 0; padding: 0 clamp(0px, 2vw, 28px); }
.about-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 24px 48px; margin-bottom: clamp(40px, 5vw, 64px); }
.about-head h2, .testimonials-intro h2 { font-size: clamp(48px, 6.4vw, 96px); line-height: .92; letter-spacing: -0.03em; text-wrap: balance; }
.about-head h2 em { font-style: italic; }
.about-head p, .testimonials-intro p { margin: 0; max-width: 42ch; color: var(--muted); font-size: 17px; line-height: 1.55; text-wrap: pretty; }
@media (max-width: 760px) {
  .about-head { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Services detail: five ruled rows ---- */
.svc-detail { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc-detail-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.3fr); align-items: baseline; gap: 10px 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.svc-detail-mark { display: inline-flex; gap: 10px; color: var(--muted); }
.svc-detail-mark i { font-style: normal; }
.svc-detail-row h3 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.05; letter-spacing: -0.015em; }
.svc-detail-row p { margin: 0; max-width: 60ch; color: var(--muted); line-height: 1.6; }
.svc-detail-row p a { color: var(--ink); }
@media (max-width: 760px) {
  .svc-detail-row { grid-template-columns: minmax(0, 1fr); padding: 24px 0; }
}

/* ---- Client marquee ---- */
.clients > h2.label { color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--line); margin: 0 0 clamp(28px, 3vw, 40px); }
.marquee { overflow: clip; margin-inline: calc(-1 * clamp(0px, 2vw, 28px)); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 0; width: max-content; animation: marquee 40s linear infinite; animation-play-state: paused; }
/* The gap after the last logo lives inside each list, so translateX(-50%) is exactly one list: the loop has no seam. */
.client-list { list-style: none; display: flex; align-items: center; gap: 56px; margin: 0; padding: 0 56px 0 0; }
.marquee.is-running .marquee-track { animation-play-state: running; }
.marquee.is-paused .marquee-track { animation-play-state: paused; }
/* Pause for every pointer (WCAG 2.2.2). A toggle button: its name stays "Pause", pressed (paused) reads inverted. */
.marquee-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 12px 0 0 auto; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: transform 140ms var(--ease-out); -webkit-tap-highlight-color: transparent; }
.marquee-toggle[hidden] { display: none; }
.marquee-toggle::before { content: ""; width: 8px; height: 9px; border-inline: 2.5px solid currentColor; box-sizing: border-box; }
.marquee-toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.marquee-toggle:active { transform: scale(.97); }
.marquee-toggle:focus-visible { border-radius: 999px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.client-logo { display: flex; align-items: center; justify-content: center; height: 72px; color: var(--ink); text-decoration: none; opacity: .72; transition: opacity 160ms ease; }
.client-logo:focus-visible { outline-offset: 6px; }
.client-logo i { display: block; width: 132px; height: 32px; background: currentColor; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.client-logo.stacked i { height: 60px; }
.client-logo.compact-mark i { width: 96px; height: 38px; }
.client-logo.ministry { flex-direction: column; align-items: flex-start; gap: 4px; line-height: 1; }
.ministry b { font: 600 20px/1 var(--sans); letter-spacing: .06em; }
.ministry small { font: 500 9px/1 var(--sans); letter-spacing: .04em; }
@media (hover: hover) and (pointer: fine) {
  .marquee:hover .marquee-track { animation-play-state: paused; }
  .client-logo:hover { opacity: 1; }
}
/* A still strip without JS, or while a keyboard user tabs through it: every logo shows once, in wrapping rows,
   so no focused logo is ever clipped. Reduced motion gets the same strip (end of file). */
html:not(.js) .marquee, .marquee:has(:focus-visible) { overflow: visible; -webkit-mask-image: none; mask-image: none; }
html:not(.js) .marquee-track, .marquee:has(:focus-visible) .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
html:not(.js) .client-list, .marquee:has(:focus-visible) .client-list { flex: 1 1 100%; flex-wrap: wrap; justify-content: center; gap: 8px 48px; padding: 0; }
html:not(.js) .client-list[aria-hidden], .marquee:has(:focus-visible) .client-list[aria-hidden] { display: none; }

/* ---- Evals chapter ---- */
/* The loop: a dark panel holding a six-step track; hairlines connect the steps, the release gate is inverted. */
.eval-loop { margin: 0; border-radius: var(--r-panel); background: var(--ink-2); color: #fff; padding: clamp(20px, 3vw, 40px); overflow: clip; }
.eval-loop > * { position: relative; }
.eval-loop ol { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; counter-reset: step; }
.eval-loop li { position: relative; display: grid; align-content: start; gap: 10px; padding: 18px 18px 22px; border: 1px solid var(--line-inv); border-radius: 14px; counter-increment: step; }
.eval-loop li::before { content: counter(step, decimal-leading-zero); font: 500 11px/1.3 var(--mono); letter-spacing: .06em; color: var(--muted-inv); margin-bottom: 18px; }
.eval-loop li:not(:last-child)::after { content: ""; position: absolute; top: 25px; left: 100%; width: 21px; height: 1px; background: rgb(255 255 255 / .32); }
.eval-loop b { font: 400 clamp(22px, 1.9vw, 28px)/1 var(--serif); letter-spacing: -0.01em; }
.eval-loop li span { color: var(--muted-inv); font-size: 14px; line-height: 1.45; }
.eval-loop li.gate { background: #fff; border-color: #fff; color: var(--ink); }
.eval-loop li.gate::before, .eval-loop li.gate span { color: var(--muted); }
.eval-loop figcaption { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-inv); color: var(--muted-inv); font-size: 14px; }
.eval-loop figcaption .icon { flex: none; width: 16px; height: 16px; color: #fff; }
@media (max-width: 1080px) {
  .eval-loop ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .eval-loop li:nth-child(3)::after { display: none; }
}
@media (max-width: 640px) {
  .eval-loop ol { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .eval-loop li { grid-template-columns: 34px minmax(0, 1fr); gap: 4px 12px; padding: 16px; }
  .eval-loop li::before { grid-row: 1 / span 2; margin: 0; padding-top: 6px; }
  .eval-loop li:nth-child(3)::after, .eval-loop li:not(:last-child)::after { display: block; top: 100%; left: 32px; width: 1px; height: 13px; }
}

.competence-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px var(--gutter); margin-top: clamp(56px, 6vw, 88px); }
.competence-list article { padding-top: 22px; border-top: 1px solid var(--ink); }
.competence-list h3 { font-size: clamp(26px, 2.3vw, 32px); line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
.competence-list p { margin: 14px 0 0; max-width: 44ch; color: var(--muted); line-height: 1.6; }
.eval-record { margin: clamp(48px, 5vw, 72px) 0 0; padding-top: 22px; border-top: 1px solid var(--line); max-width: 72ch; color: var(--muted); font-size: 15px; line-height: 1.65; }
.eval-record a { color: var(--ink); text-decoration-thickness: 1px; }
@media (max-width: 900px) {
  .competence-list { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Testimonials: a stacked deck (js/deck.js deals it) ---- */
.testimonials { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px clamp(32px, 5vw, 96px); align-items: start; }
.testimonials-intro { display: grid; gap: 24px; justify-items: start; }
.deck { display: grid; padding-bottom: 28px; }
.deck-card { grid-area: 1 / 1; margin: 0; display: grid; align-content: space-between; gap: 40px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-tile); padding: clamp(24px, 4vw, 48px); box-shadow: 0 24px 48px -32px rgb(0 0 0 / .28); transform-origin: 50% 100%; }
/* With JS the cards stack; the two behind peek out below the front one. Same pose as deckPose() in js/lib/motion.js,
   so when the deck goes live nothing moves. */
.deck-card:nth-child(1) { z-index: 3; }
.deck-card:nth-child(2) { z-index: 2; transform: translateY(14px) scale(0.96) rotate(1.2deg); }
.deck-card:nth-child(3) { z-index: 1; transform: translateY(28px) scale(0.92) rotate(-2.4deg); }
.deck.is-live .deck-card { transition: transform 500ms var(--ease-expo), opacity 300ms ease; touch-action: pan-y; }
.deck.is-dragging .deck-card, .deck.is-instant .deck-card { transition: none !important; }
.deck.is-dragging { cursor: grabbing; -webkit-user-select: none; user-select: none; }
.deck:focus-visible { outline-offset: 6px; border-radius: var(--r-tile); }
.deck-card blockquote { margin: 0; font: 400 clamp(26px, 3vw, 40px)/1.12 var(--serif); letter-spacing: -0.01em; text-wrap: pretty; }
.deck-card figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.deck-card figcaption strong { font-weight: 500; }
.deck-card figcaption span { grid-column: 1; font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.deck-card figcaption a { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.deck-card figcaption a:active { transform: scale(.97); }
.deck-card figcaption a:focus-visible { border-radius: 999px; }
.deck-card figcaption a .icon { width: 12px; height: 12px; }
@media (hover: hover) and (pointer: fine) {
  .deck-card figcaption a:hover { background: var(--paper); }
  .deck.is-live .deck-card:not([inert]) { cursor: grab; }
}
.deck-controls { display: flex; align-items: center; gap: 14px; }
.deck-controls[hidden] { display: none; }
.deck-controls button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: 400 18px/1 var(--sans); cursor: pointer; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.deck-controls button:active { transform: scale(.97); }
.deck-controls button:focus-visible { border-radius: 999px; }
.deck-controls .label { color: var(--muted); font-variant-numeric: tabular-nums; }
/* Without JS there is no deck to deal: the cards read as a plain list. */
html:not(.js) .deck { gap: 16px; padding-bottom: 0; }
html:not(.js) .deck-card { grid-area: auto; transform: none; }
@media (max-width: 900px) {
  .testimonials { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .deck-card figcaption { grid-template-columns: minmax(0, 1fr); }
  .deck-card figcaption a { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 12px; }
}

/* ---- Closing CTA ---- */
.about-cta { display: flex; justify-content: center; margin: clamp(96px, 11vw, 160px) var(--gutter) clamp(72px, 8vw, 112px); }
.about-cta .button { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.about-cta .button:focus-visible { border-radius: 999px; }
@media (hover: hover) and (pointer: fine) {
  .about-cta .button:hover { background: var(--ink-2); }
}

/* Reduced motion: the logos stand still in wrapping rows; the deck only cross-fades (js/deck.js swaps). */
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .client-list { flex: 1 1 100%; flex-wrap: wrap; justify-content: center; gap: 8px 48px; padding: 0; }
  .client-list[aria-hidden] { display: none; }
  .marquee-toggle { display: none; }
  .deck.is-live .deck-card { transition: opacity 120ms ease; }
}

/* ---- Privacy page (pages/privacy.mjs): the about section shell with a single reading column ---- */
.privacy { padding-top: clamp(96px, 10vw, 140px); }
.privacy h1 { font-size: clamp(48px, 6.4vw, 96px); line-height: .92; letter-spacing: -0.03em; }
.privacy-body { max-width: 64ch; }
.privacy-body h2 { margin: 36px 0 10px; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.1; }
.privacy-body p { margin: 0; color: var(--muted); line-height: 1.6; }
.privacy-body a { color: var(--ink); }
