/* ==========================================================================
   Extensa V2 — shared components
   Loaded after tokens.css and styles.css. Everything here is page-agnostic
   and is used by more than one page.

   Interaction language, applied consistently:
     orange diagonal up-right   → goes to another page
     orange diagonal down-right → scrolls to a section on this page
     orange plus / minus        → expands and collapses content
     orange left / right        → browses through content
   ========================================================================== */

/* ---------------------------------------------- masthead enquiry action
   The enquiry route is reachable the moment anyone arrives, at every width. */
.nav-cta {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: var(--navy); color: var(--white);
  padding: 10px var(--s-5); font-size: var(--t-small); font-weight: 600;
  white-space: nowrap; transition: background var(--t-mid) var(--ease);
}
.nav-cta .arrow { stroke: var(--white); width: 12px; height: 12px; }
.nav-cta:hover { background: var(--orange-deep); }
.nav-cta:hover .arrow { transform: translate(2px, -2px); }
.mast .nav-cta { margin-left: var(--s-5); }

/* ==========================================================================
   Architectural index — the house treatment for a list of anything.
   Hairlines, small orange reference numbers, no decoration. It is static by
   default and only looks interactive when it is (`.idx--go`).
   ========================================================================== */
.idx { list-style: none; margin: 0; padding: 0; border-top: var(--hair) solid var(--rule); }
.idx > li {
  display: grid; grid-template-columns: 2.4em 1fr; align-items: baseline;
  gap: var(--s-4); padding: var(--s-4) 0;
  border-bottom: var(--hair) solid var(--rule);
}
.idx .n {
  font-size: var(--t-label); font-weight: 700; letter-spacing: var(--ls-label);
  color: var(--orange-ink);
}
.idx .x { font-size: var(--t-body); color: var(--ink-2); line-height: 1.45; }
.idx--2 { columns: 2; column-gap: var(--col-gap); }
.idx--2 > li { break-inside: avoid; }
.dark .idx, .dark .idx > li { border-color: var(--rule-dark); }
.dark .idx .n { color: var(--orange); }
.dark .idx .x { color: var(--on-dark); }

/* Interactive variant: each row jumps to a section on this page. */
.idx--go > li { display: block; padding: 0; }
.idx--go a {
  display: grid; grid-template-columns: 2.4em 1fr auto; align-items: center;
  gap: var(--s-4); padding: var(--s-5) 0;
  font-size: var(--t-h3); font-weight: 400; letter-spacing: -0.02em;
}
.idx--go a:hover { color: var(--orange-ink); }
.idx--go a:hover .arrow { transform: translate(2px, 3px); }

/* ==========================================================================
   Accordion — services and FAQ. One pattern, two uses.
   The panel is always in the HTML, so its content is crawlable and
   searchable whether or not it is open.
   ========================================================================== */
.acc { border-top: var(--hair) solid var(--rule); }
.acc-i { border-bottom: var(--hair) solid var(--rule); }
.acc-b {
  width: 100%; display: grid; grid-template-columns: 2.4em 1fr auto;
  align-items: center; gap: var(--s-4); padding: var(--s-5) 0; text-align: left;
  font-size: var(--t-h3); font-weight: 400; letter-spacing: -0.02em;
  transition: color var(--t-mid) var(--ease);
}
.acc-b:hover { color: var(--orange-ink); }
.acc-b .n {
  font-size: var(--t-label); font-weight: 700; letter-spacing: var(--ls-label);
  color: var(--orange-ink);
}
/* The plus becomes a minus. Two rules, one rotates away. */
.pm { position: relative; width: 14px; height: 14px; flex: 0 0 auto; }
.pm::before, .pm::after {
  content: ''; position: absolute; background: var(--orange);
  transition: transform var(--t-mid) var(--ease), opacity var(--t-mid) var(--ease);
}
.pm::before { left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -0.75px; }
.pm::after { top: 0; bottom: 0; left: 50%; width: 1.5px; margin-left: -0.75px; }
.acc-b[aria-expanded="true"] .pm::after { transform: scaleY(0); opacity: 0; }

.acc-p { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-mid) var(--ease); }
.acc-i[data-open] .acc-p { grid-template-rows: 1fr; }
.acc-p > div { overflow: hidden; }
.acc-p p {
  margin: 0 0 var(--s-5); padding-left: calc(2.4em + var(--s-4));
  max-width: 60ch; color: var(--ink-2); line-height: var(--lh-body);
}
.acc-p .pending {
  margin: 0 0 var(--s-5); padding-left: calc(2.4em + var(--s-4));
  font-size: var(--t-small); color: var(--ink-3);
}
/* The link at the end of a panel, added 19 November so each service row can
   reach its own section on Our services.

   A closed panel is clipped, not removed, so its text stays in the document
   and stays readable — which was harmless while panels held only paragraphs.
   A clipped LINK is still in the tab order, so a keyboard user would land on
   something nobody can see. visibility:hidden takes the link out of the tab
   order and out of the accessibility tree without taking the panel's text out
   of either, and it needs no JavaScript to do it. */
.acc-go { margin: 0 0 var(--s-5); margin-left: calc(2.4em + var(--s-4)); }
.acc-i:not([data-open]) .acc-go { visibility: hidden; }
@media (max-width: 540px) { .acc-go { margin-left: calc(1.8em + var(--s-4)); } }
@media (max-width: 540px) {
  .acc-b { grid-template-columns: 1.8em 1fr auto; font-size: 1.0625rem; }
  .acc-p p, .acc-p .pending { padding-left: calc(1.8em + var(--s-4)); }
}

/* ==========================================================================
   Collaborator marquee
   Moves slowly right to left and loops seamlessly. The track holds the list
   twice; the second copy is hidden from assistive technology so nothing is
   announced twice. It pauses on hover, on keyboard focus and on the button,
   and it does not move at all under prefers-reduced-motion.
   ========================================================================== */
.mq-wrap { position: relative; }
.mq {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.mq-t {
  display: flex; width: max-content; align-items: center;
  gap: clamp(44px, 5vw, 96px); padding-right: clamp(44px, 5vw, 96px);
  animation: mq-run 54s linear infinite;
}
@keyframes mq-run { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
.mq:hover .mq-t, .mq:focus-within .mq-t, .mq-wrap[data-paused] .mq-t { animation-play-state: paused; }
/* The marks sit straight on the paper. White tiles were tried on 19 November
   and taken off the same day: they settled a set that does not naturally
   agree with itself, but they were the only rounded shape on the site and
   read as a component rather than as the logos themselves. The spacing does
   the separating instead, which is why the gap is wide. */
.mq-item {
  display: flex; align-items: center; flex: 0 0 auto;
  font-size: clamp(1rem, 1.5vw, 1.375rem); font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink-2); white-space: nowrap;
}
/* Each logo carries its own optical height in --lh, set per partner in the
   build: a square mark and a 5.7:1 wordmark at the same height do not read as
   the same size. --mq-scale shrinks the whole set together on small screens
   without touching the relationships between them.

   Artwork is each partner's own, unaltered. Nothing is drawn, traced,
   recoloured or reconstructed — see assets/partner-logos/SOURCES.md. */
.mq-t { --mq-scale: 1; }
.mq-item img, .mq-item svg {
  display: block; width: auto; max-width: none;
  height: calc(var(--lh, 30px) * var(--mq-scale));
  opacity: .88;
}
.mq-ctl {
  display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-5);
  font-size: var(--t-label); font-weight: 600; letter-spacing: var(--ls-label);
  text-transform: uppercase; color: var(--ink-3);
}
.mq-btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px 12px; border: var(--hair) solid var(--rule-strong);
  font-size: var(--t-label); font-weight: 700; letter-spacing: var(--ls-label);
  text-transform: uppercase; transition: border-color var(--t-mid) var(--ease);
}
.mq-btn:hover { border-color: var(--orange); }
.mq-btn .g { width: 9px; height: 10px; fill: var(--orange); }
@media (max-width: 860px) { .mq-t { --mq-scale: .86; } }
@media (max-width: 520px) {
  .mq-t { --mq-scale: .76; }
  /* The note is longer than the button and wraps to three lines beside it. */
  .mq-ctl { flex-direction: column; align-items: flex-start; gap: var(--s-2); }
}

@media (prefers-reduced-motion: reduce) {
  .mq-t { animation: none; }
  .mq { overflow-x: auto; }
  .mq-btn { display: none; }
}

/* ==========================================================================
   Testimonials — editorial, numbered, browsed with orange left/right arrows.
   Built to take real words. It carries none, and says so.
   ========================================================================== */
.qs-head { display: flex; align-items: center; justify-content: space-between;
           gap: var(--s-5); flex-wrap: wrap; }
.qs-nav { display: flex; align-items: center; gap: var(--s-4); }
.qs-nav button {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: var(--hair) solid var(--rule-strong);
  transition: border-color var(--t-mid) var(--ease), opacity var(--t-mid) var(--ease);
}
.qs-nav button:hover:not(:disabled) { border-color: var(--orange); }
.qs-nav button:disabled { opacity: .35; cursor: default; }
.qs-nav svg { width: 15px; height: 12px; stroke: var(--orange); stroke-width: 1.5; fill: none; }

/* Position, shown rather than counted. Six marks say "six reviews" at a
   glance; "4 of 6" in label type does not, which was the whole problem. */
.qs-ticks { display: flex; align-items: center; gap: 5px; }
.qs-tick { width: clamp(14px, 1.6vw, 22px); height: 2px; background: var(--rule-strong);
           transition: background var(--t-mid) var(--ease); }
.qs-tick[data-on] { background: var(--orange); }

/* The rail runs past the right gutter so the next card is visibly cut by the
   page edge. That is the signal that there is more; everything else here is
   just letting it scroll well. */
.qs-rail {
  display: flex; align-items: stretch; gap: clamp(20px, 2.4vw, 36px);
  margin-top: clamp(28px, 3.4vw, 48px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-behavior: smooth;
  margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter);
  scrollbar-width: none;
}
.qs-rail::-webkit-scrollbar { display: none; }
.qs-rail:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.qs-item {
  flex: 0 0 clamp(264px, 29vw, 400px); scroll-snap-align: start;
  display: flex; flex-direction: column; margin: 0;
  border-top: var(--hair) solid var(--rule);
  padding-top: clamp(20px, 2.2vw, 30px);
}
.qs-q { font-size: clamp(1.0625rem, 1.35vw, 1.3125rem); font-weight: 300; line-height: 1.45;
        letter-spacing: -0.014em; }
.qs-a { margin-top: auto; padding-top: clamp(20px, 2.4vw, 32px);
        font-size: var(--t-label); font-weight: 600;
        letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) { .qs-rail { scroll-behavior: auto; } }

/* The state this component is actually in today. */
.hold-band {
  border: var(--hair) dashed var(--rule-strong); background: var(--stone);
  padding: clamp(28px, 3.6vw, 48px); display: grid; gap: var(--s-3);
  justify-items: start; color: var(--ink-2);
}
.hold-band em { font-style: normal; font-size: var(--t-label); font-weight: 700;
                letter-spacing: var(--ls-label); text-transform: uppercase;
                color: var(--orange-ink); }
.hold-band p { margin: 0; max-width: 56ch; font-size: var(--t-small); line-height: 1.55; }
.dark .hold-band { background: rgba(255,255,255,.05); border-color: var(--rule-dark);
                   color: var(--on-dark-2); }
.dark .hold-band em { color: var(--orange); }

/* ==========================================================================
   Anchors under a sticky masthead
   ========================================================================== */
[id] { scroll-margin-top: clamp(80px, 8vw, 108px); }

/* ==========================================================================
   Business switcher — a native disclosure, so it works with the keyboard
   and with no JavaScript at all. The script only closes it on Escape or a
   click outside.
   ========================================================================== */
.sw { position: relative; margin-left: var(--s-5); }
.sw > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--t-small); font-weight: 600; white-space: nowrap;
  padding: 7px 12px; border: var(--hair) solid var(--rule);
  transition: border-color var(--t-mid) var(--ease);
}
.sw > summary::-webkit-details-marker { display: none; }
.sw > summary::marker { content: ''; }
.sw > summary:hover { border-color: var(--rule-strong); }
.sw > summary svg { width: 9px; height: 6px; stroke: var(--orange); stroke-width: 1.6;
                    fill: none; transition: transform var(--t-mid) var(--ease); }
.sw[open] > summary svg { transform: rotate(180deg); }
.sw-menu {
  position: absolute; top: calc(100% + 7px); left: 0; z-index: 100; min-width: 232px;
  background: var(--paper); border: var(--hair) solid var(--rule);
  box-shadow: 0 14px 36px rgba(5,16,79,.13);
}
.sw-menu a { display: block; padding: 11px 15px; font-size: var(--t-small);
             border-bottom: var(--hair) solid var(--rule); }
.sw-menu a:last-child { border-bottom: 0; }
.sw-menu a:hover { background: var(--stone); color: var(--orange-ink); }
@media (max-width: 860px) { .sw { display: none; } }

/* The testimonial stage. Items are hidden with the `hidden` attribute rather
   than display:none in CSS, so the markup stays honest: what is hidden is
   hidden from assistive technology too. */
.qs-src { display: block; margin-top: .45em; color: var(--orange-ink); }
.dark .qs-src { color: var(--orange); }
