/* Homepage case study spotlight. Shares the client mark styles with the Case studies page. */

.client-logo { display: inline-grid; place-items: center; background: var(--paper); border-radius: var(--radius-sm); overflow: hidden; flex: none; }
.client-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.client-logo .logo-ph { font-size: .72rem; font-weight: 500; color: var(--graphite); border: 1.5px dashed rgba(14, 37, 27, .3); border-radius: 4px; padding: .25rem .55rem; }
.client-logo-md { width: 150px; height: 46px; padding: 8px 14px; }
.client-logo-lg { width: 220px; height: 76px; padding: 12px 20px; }
.client-anon { display: inline-flex; align-items: center; gap: .55rem; font-size: .9rem; font-weight: 500; }
.anon-dot { width: 24px; height: 24px; border-radius: 50%; border: 1.5px dashed rgba(247, 243, 234, .45); flex: none; }

/* Slider of tall photo cards, running off the right edge of the page */
.spot-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem 3rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem); }
.spot-head h2 { max-width: 16ch; }
.spot-controls { display: flex; align-items: center; gap: 1.25rem; }
.spot-all { color: var(--mint); text-decoration: none; font-weight: 500; white-space: nowrap; }
.spot-all::after { content: " →"; }
.spot-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.spot-arrows { display: flex; gap: .5rem; }
.spot-arrows button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-dark); background: transparent; color: var(--on-dark); cursor: pointer; display: grid; place-items: center; transition: border-color 200ms, color 200ms, opacity 200ms, scale 140ms var(--ease-out); }
.spot-arrows button:hover:not(:disabled) { border-color: var(--mint); color: var(--mint); }
.spot-arrows button:disabled { opacity: .3; cursor: default; }
.spot-arrows svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.spot-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(260px, 26vw, 340px); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  /* bleed past the right edge of the content column */
  margin-right: calc(-1 * max(var(--gutter), (100vw - var(--wrap)) / 2 + var(--gutter)));
  padding-right: max(var(--gutter), (100vw - var(--wrap)) / 2 + var(--gutter));
  cursor: grab;
}
.spot-track::-webkit-scrollbar { display: none; }
.spot-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.spot-track.is-dragging a { pointer-events: none; }

.spot-card {
  --accent: var(--mint);
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  aspect-ratio: 3 / 4; padding: 1.4rem; border-radius: var(--radius); overflow: hidden; isolation: isolate;
  scroll-snap-align: start; text-decoration: none; color: var(--paper); background: var(--window);
  transition: scale 140ms var(--ease-out);
}
.spot-media { position: absolute; inset: -8% 0; z-index: -2; transform: translateY(var(--py, 0px)) scale(1.02); transition: scale 300ms var(--ease-out); }
.spot-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-card:focus-visible .spot-media { scale: 1.08; }
@media (hover: hover) and (pointer: fine) { .spot-card:hover .spot-media { scale: 1.08; } .spot-card:hover .spot-go { opacity: 1; transform: none; } }
/* Placeholder image: a dark field with the accent glowing up through a fine grid */
.spot-ph { width: 100%; height: 100%; display: grid; place-items: center;
  background:
    radial-gradient(70% 55% at 70% 30%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%),
    linear-gradient(rgba(247, 243, 234, .05) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(247, 243, 234, .05) 1px, transparent 1px) 0 0 / 22px 22px,
    #13261C; }
.spot-ph span { font-size: .75rem; color: rgba(247, 243, 234, .45); border: 1px dashed rgba(247, 243, 234, .25); padding: .25rem .6rem; border-radius: 4px; }
.spot-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8, 20, 14, .92) 0%, rgba(8, 20, 14, .55) 38%, transparent 62%); }
.spot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.spot-chip { font-size: .78rem; font-weight: 500; padding: .3rem .65rem; border-radius: 999px; background: rgba(8, 20, 14, .6); backdrop-filter: blur(6px); color: var(--paper); white-space: nowrap; }
.spot-chip b { color: var(--accent); font-weight: 500; }
.spot-bottom { display: grid; gap: .6rem; }
.spot-eyebrow { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: rgba(247, 243, 234, .8); }
.spot-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.spot-card h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.15; letter-spacing: -0.02em; }
.spot-go { font-size: .88rem; color: var(--accent); opacity: 0; transform: translateY(6px); transition: opacity 250ms, transform 300ms var(--acorn-ease-settle); }
.spot-go::after { content: " →"; }
.spot-card:focus-visible .spot-go { opacity: 1; transform: none; }
.spot-card .client-logo-md { width: 120px; height: 38px; padding: 6px 12px; }
.spot-card .client-anon { font-size: .8rem; color: rgba(247, 243, 234, .85); }

@media (hover: none) { .spot-go { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .spot-media { transform: none; transition: none; } }

/* Customer stories on the home page and the service pages: a carousel on the darkest green. The chosen story
   fills the wide slot on the left and the rest run off the right edge of the window; spotlight.js sizes and moves
   the cards. The Customers page keeps the photo slider above. */
html.v2 #main > [data-trust-cards] {
  background: #0A1C14; /* the darkest green; --window is redefined lighter at the end of styles.css */
  color: var(--paper);
  overflow-x: clip;
}
/* Covers the right layout rail across this band; the rail is one page-wide element (styles.css), above the bands */
html.v2 #main > [data-trust-cards]::after {
  content: "";
  position: absolute;
  z-index: 6;
  top: 0;
  bottom: 0;
  right: var(--rail-x);
  width: 1px;
  background: #0A1C14;
  pointer-events: none;
}
.proof-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem 3rem;
}
[data-trust-cards] .proof-head h2 {
  max-width: 12em;
  font-size: clamp(2.65rem, 4.5vw, 3.65rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--paper);
}
[data-trust-cards] .proof-head .section-intro { margin: 1rem 0 0; }
.proof-arrows { display: flex; gap: .6rem; }
.proof-arrows[hidden] { display: none; }
.proof-arrow {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(247, 243, 234, .25);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out), scale 140ms var(--ease-out);
}
.proof-arrow:active:not(:disabled) { scale: .96; }
.proof-arrow:disabled { opacity: .3; cursor: default; }
.proof-arrow svg, .proof-all svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.proof-track {
  position: relative;
  z-index: 7; /* above the layout rails (z-index 5) and the strip covering the right one */
  margin-top: clamp(2rem, 4vw, 2.75rem);
  touch-action: pan-y;
}
.proof-track.is-dragging, .proof-track.is-dragging .proof-hit { cursor: grabbing; -webkit-user-select: none; user-select: none; }
/* spotlight.js sets each card's place, width and fade every frame, and --f: 1 in the feature slot, 0 a slot or more away */
.proof-card {
  --f: 0;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transition: scale 140ms var(--ease-out);
}
/* .is-moving is on while the row moves and until the mouse next moves, so cards passing under a still pointer don't react */
.proof-track:not(.is-moving) .proof-card:active { scale: .985; }
.proof-face { display: block; }
.proof-photo {
  position: relative;
  display: block;
  height: var(--proof-h, 420px);
  border-radius: 16px;
  overflow: hidden;
  background: var(--ink);
}
.proof-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: scale 180ms var(--ease-out);
}
/* Darkens the top of each photo so the white client name stays readable */
.proof-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 16, 12, .82) 0%, rgba(8, 16, 12, .5) 34%, rgba(8, 16, 12, .08) 62%, rgba(8, 16, 12, 0) 78%);
}
/* The name and title grow from the smaller card's size to the feature's as --f goes from 0 to 1 */
.proof-name {
  --inset: calc(20px + 8px * var(--f));
  --small: clamp(1.5rem, 2.2vw, 2rem);
  position: absolute;
  top: var(--inset);
  left: var(--inset);
  right: var(--inset);
  max-width: 8.2em;
  color: #fff;
  font-size: calc(var(--small) + (clamp(2rem, 3vw, 2.7rem) - var(--small)) * var(--f));
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.proof-title {
  display: block;
  margin-top: .9rem;
  font-size: calc(clamp(1.05rem, 1.2vw, 1.2rem) + (clamp(1.45rem, 2vw, 1.85rem) - clamp(1.05rem, 1.2vw, 1.2rem)) * var(--f));
  font-weight: 500;
  line-height: calc(1.25 - .05 * var(--f));
  color: var(--paper);
}
.proof-industry {
  display: block;
  margin-top: .45rem;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(247, 243, 234, .6);
}
.proof-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
}
.proof-hit:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 16px; }

.proof-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(247, 243, 234, .07);
  color: var(--paper);
  font-size: 1rem;
  transition: background-color 160ms var(--ease-out);
}
.proof-all:focus-visible { outline-offset: 3px; border-radius: 18px; }

/* On a light ground (the industry pages, Discover more on a case page) the band is white and the type and controls turn ink */
html.v2 #main > [data-trust-cards][data-tone="paper"] { background: var(--white); color: var(--ink); }
html.v2 #main > [data-trust-cards][data-tone="paper"]::after { background: var(--white); }
[data-trust-cards][data-tone="paper"] .proof-head h2 { color: var(--ink); }
:is([data-tone="paper"], .proof-light) .proof-arrow { border-color: rgba(14, 37, 27, .2); color: var(--ink); }
:is([data-tone="paper"], .proof-light) .proof-title { color: var(--ink); }
:is([data-tone="paper"], .proof-light) .proof-industry { color: var(--text-muted); }
:is([data-tone="paper"], .proof-light) .proof-all { background: rgba(14, 37, 27, .05); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  :is([data-tone="paper"], .proof-light) .proof-arrow:hover:not(:disabled) { border-color: var(--forest); color: var(--forest); }
  :is([data-tone="paper"], .proof-light) .proof-all:hover { background: rgba(14, 37, 27, .09); }
}

@media (hover: hover) and (pointer: fine) {
  .proof-arrow:hover:not(:disabled) { border-color: var(--mint); color: var(--mint); }
  .proof-track:not(.is-moving) .proof-card:hover .proof-photo img { scale: 1.03; }
  .proof-all:hover { background: rgba(247, 243, 234, .12); }
}
@media (max-width: 800px) {
  .proof-head { flex-direction: column; align-items: flex-start; }
  [data-trust-cards] .proof-head h2 { max-width: 10em; }
  .proof-name { --inset: calc(16px + 4px * var(--f)); --small: 1.4rem; font-size: calc(var(--small) + (clamp(1.6rem, 7vw, 2rem) - var(--small)) * var(--f)); }
}
@media (prefers-reduced-motion: reduce) {
  .proof-card, .proof-card *, .proof-arrow, .proof-all { transition: none !important; }
  .proof-track:not(.is-moving) .proof-card:active, .proof-arrow:active, .proof-track:not(.is-moving) .proof-card:hover .proof-photo img { scale: 1; }
}
