/* ===========================================================
   American Networks Design System — case study page
   Reuses global tokens from style.css (--dark, --white, --font,
   --light-grey-bg, --dark-grey, --white-grey etc). Page-scoped
   tokens below are additive, never override globals.
   =========================================================== */

:root {
  --ds-orange: #e46008;
  --ds-black: #0a0a0a;
  --ds-body: #4a4a4a;
  --ds-muted: #8a8a8a;
  --ds-stat-label: #b2b2b8;
  --ds-border: #e2e2e2;
  --ds-pad: clamp(24px, 7vw, 160px);
  --ds-max: 1040px;
}

.ds {
  font-family: var(--font);
  color: var(--ds-black);
  background: var(--white);
  overflow-x: hidden;
}

.ds section {
  padding-left: var(--ds-pad);
  padding-right: var(--ds-pad);
}

/* ---------- header: logo + fade-in bar ----------
   Same mechanic as agent-support.html's .case2-nav/.case2-site-nav: the
   logo starts large and floating over the hero, then shrinks and settles
   onto a bar that fades in as --ds-progress ramps 0→1 (driven by
   design-system.js, scrolling through .ds-hero — this page has no hero
   photo to pin/fade, so the bar is the only thing that appears). */
.ds-site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 76px;
  z-index: 30;
  background: rgba(0, 0, 0, var(--ds-progress, 0));
  pointer-events: none;
}
.ds-site-nav.is-visible { pointer-events: auto; }

.ds-back {
  position: fixed;
  top: calc(24px - 12px * var(--ds-progress, 0));
  left: var(--side-pad);
  z-index: 31;
  display: inline-flex;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
.ds-back:hover { opacity: 1; }
.ds-back img {
  width: calc(90px - 38px * var(--ds-progress, 0));
  height: calc(90px - 38px * var(--ds-progress, 0));
  display: block;
  /* logo-dark.png would vanish against the bar once it goes solid
     black — invert it to white in step with the same progress. */
  filter: invert(var(--ds-progress, 0));
}

/* ---------- reveal-on-scroll (progressive enhancement) ---------- */
[data-reveal] {
  opacity: 1;
  transform: none;
}
.ds-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.ds-js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .ds-js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- hero ---------- */
.ds-hero {
  padding-top: clamp(96px, 16vw, 168px);
  /* No bottom padding: the hero image is full-bleed and the section's
     last child, so it should sit flush against .ds-stats below it —
     padding here would just reopen the gap the bleed is meant to close. */
  padding-bottom: 0;
  max-width: calc(var(--ds-max) + var(--ds-pad) * 2);
  margin: 0 auto;
}

/* Matches agent-support.html's .case2-breadcrumb treatment. */
.ds-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 20px;
}
.ds-breadcrumb a {
  color: var(--ds-black);
  text-decoration: none;
  padding: 8px 12px;
  margin-left: -12px;
}
.ds-breadcrumb a:hover { color: var(--ds-orange); }
.ds-breadcrumb-caret { color: var(--ds-muted); }
.ds-breadcrumb [aria-current] { padding: 8px 12px; color: var(--ds-muted); }

.ds-hero__title {
  font-size: clamp(32px, 5.4vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--ds-black);
  margin: 0 0 24px;
  max-width: 760px;
}

.ds-hero__intro {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5;
  color: var(--ds-body);
  max-width: 620px;
  margin: 0 0 40px;
}

.ds-meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 56px);
  margin: 0 0 32px;
  padding: 28px 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}
.ds-meta__item dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--ds-muted);
  margin: 0 0 6px;
}
.ds-meta__item dd {
  font-size: 14px;
  font-weight: 500;
  color: var(--ds-black);
  margin: 0;
  max-width: 220px;
}

.ds-hero__cta { margin-bottom: 48px; }

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ds-orange);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.ds-btn:hover { transform: translateY(-1px); opacity: 0.92; }
.ds-btn--sm { padding: 12px 24px; font-size: 13px; }
.ds-btn--lg { padding: 16px 32px; font-size: 16px; }

.ds-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--light-grey-bg);
  border: 1.5px dashed #c6c6c6;
  border-radius: 16px;
  color: var(--ds-muted);
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  padding: 24px;
}
/* Full-bleed: breaks out of .ds-hero's own padding + max-width regardless
   of viewport, via calc(50% - 50vw) on both margins rather than the usual
   transform:translateX(-50%) — this element carries [data-reveal], whose
   .is-visible rule (higher specificity, see above) sets transform:none
   once revealed, silently cancelling a transform-based bleed. Margin
   isn't touched by that rule, so this version isn't affected. .ds already
   sets overflow-x:hidden so the 100vw math never adds a scrollbar. */
.ds-placeholder--hero {
  aspect-ratio: 16 / 9;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
  overflow: hidden;
}
.ds-placeholder--hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-placeholder--card { aspect-ratio: 4 / 3; margin-bottom: 20px; border-radius: 12px; overflow: hidden; }
.ds-placeholder--card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-placeholder--wide { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; }
.ds-placeholder--wide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- stats ---------- */
.ds-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 48px);
  background: var(--dark);
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(40px, 6vw, 64px);
}
.ds-stat { text-align: center; min-width: 120px; }
.ds-stat__num {
  font-size: clamp(28px, 3.4vw, 36px);
  font-weight: 800;
  color: var(--white);
  margin: 0 0 6px;
  font-variant-numeric: tabular-nums;
}
.ds-stat__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-stat-label);
  margin: 0;
}
.ds-stats__divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
}
@media (max-width: 700px) {
  .ds-stats__divider { display: none; }
}

/* ---------- generic content blocks ---------- */
.ds-block {
  max-width: calc(var(--ds-max) + var(--ds-pad) * 2);
  margin: 0 auto;
  padding-top: clamp(56px, 9vw, 96px);
  padding-bottom: clamp(56px, 9vw, 96px);
}
.ds-block--grey {
  background: var(--light-grey-bg);
  max-width: none;
}

/* Full-bleed background sections (grey block, proves): the section
   itself spans edge to edge for the background color, while this
   wrapper centers the actual content as one block — so widening the
   viewport only grows the background, never shifts text/cards apart. */
.ds-inner {
  max-width: var(--ds-max);
  margin: 0 auto;
}

.ds-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ds-orange);
  margin: 0 0 16px;
}
.ds-eyebrow--orange { color: var(--ds-orange); }

.ds-h2 {
  font-size: clamp(26px, 3.6vw, 34px);
  font-weight: 800;
  line-height: 1.3;
  color: var(--ds-black);
  margin: 0 0 24px;
  max-width: 640px;
}

.ds-copy p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ds-body);
  max-width: 680px;
  margin: 0 0 18px;
}
.ds-copy p:last-child { margin-bottom: 0; }

.ds-copy-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ds-body);
  max-width: 720px;
  margin: 0 0 40px;
}

/* ---------- building-the-system cards ---------- */
/* Each card is an image + text row instead of a stacked tile — these
   before/after screenshots carry real detail (two side-by-side app
   states), so the image gets the wider column instead of being squeezed
   into a third of a 3-up grid. */
.ds-cards {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.ds-card {
  display: grid;
  grid-template-columns: minmax(0, 620px) 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 860px) {
  .ds-card { grid-template-columns: 1fr; }
}
.ds-placeholder--card { margin-bottom: 0; }
.ds-card h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ds-black);
  margin: 0 0 10px;
}
.ds-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ds-body);
  margin: 0;
}

/* ---------- pressure-test rows ---------- */
.ds-pressure-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 64px);
}
.ds-pressure-row {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.ds-pressure-row:nth-child(even) .ds-placeholder--wide { order: 2; }
@media (max-width: 780px) {
  .ds-pressure-row { grid-template-columns: 1fr; }
  .ds-pressure-row:nth-child(even) .ds-placeholder--wide { order: 0; }
}
.ds-pressure-row__text h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ds-black);
  margin: 0 0 12px;
}
.ds-pressure-row__text p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ds-body);
  margin: 0;
}

/* ---------- what this proves ---------- */
.ds-proves {
  background: var(--dark);
  padding-top: clamp(64px, 9vw, 112px);
  padding-bottom: clamp(64px, 9vw, 112px);
}
.ds-proves__statement {
  font-size: clamp(22px, 3vw, 29px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--white);
  margin: 0 0 28px;
}
.ds-proves__body {
  font-size: 16px;
  line-height: 1.65;
  color: #c7c7ca;
  margin: 0 0 32px;
  max-width: 720px;
}
.ds-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
}
.ds-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- other projects (compact quick-link tile, matches
   agent-support.html's .case2-other treatment) ---------- */
.ds-other .tile {
  flex: 0 1 320px;
  padding: 16px;
  gap: 16px;
}
.ds-other .tile__img { aspect-ratio: 320 / 200; }
.ds-other .tile h3 { font-size: 19px; }
.ds-other .tile__heading { gap: 8px; }
.ds-other .tile__text {
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- footer CTA (lives inside .ds-proves, right below the
   closing paragraph — keeps the CTA close to real content instead of
   stranded under a tall empty gap) ---------- */
.ds-footer-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.ds-textlink {
  color: #c7c7ca;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ds-textlink:hover { color: var(--white); }

/* ---------- mobile ---------- */
@media (max-width: 600px) {
  .ds-meta { flex-direction: column; gap: 20px; }
  .ds-pressure-row { gap: 20px; }
  /* Static on mobile, matching agent-support.html's .case2-nav — no
     shrink animation at this size, just a fixed small logo. */
  .ds-back { top: 12px; left: 20px; }
  .ds-back img { width: 60px; height: 60px; }
  .ds-site-nav { height: 60px; }
}
