/* ============ AiD Design — project case-study pages ============ */

.proj-hero { padding: clamp(56px, 8vw, 110px) var(--pad-x) clamp(36px, 5vw, 64px); max-width: 1180px; margin: 0 auto; }
.proj-hero h1 {
  font-size: clamp(36px, 5vw, 68px);
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.proj-standfirst {
  margin-top: 22px;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--ink-soft);
  max-width: 58ch;
  line-height: 1.6;
}

.proj-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px var(--pad-x);
  border-top: 1px solid var(--scroll-line, var(--line));
  border-bottom: 1px solid var(--scroll-line, var(--line));
}
.proj-meta div h4 {
  font: 600 12px/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.proj-meta div p { font-size: 15px; }

.proj-body { max-width: 780px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--pad-x) 0; }
.proj-body h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  margin: clamp(36px, 5vw, 56px) 0 16px;
}
.proj-body h2:first-child { margin-top: 0; }
.proj-body p { color: var(--ink-soft); margin-bottom: 18px; }
.proj-body ul { color: var(--ink-soft); padding-left: 20px; margin-bottom: 18px; }
.proj-body li { margin-bottom: 8px; }
.proj-quote {
  border-left: 3px solid var(--warm-soft);
  padding: 6px 0 6px 24px;
  margin: 32px 0;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 450;
  line-height: 1.4;
  color: var(--ink);
}
.proj-quote cite { display: block; margin-top: 12px; font: 400 14px/1.4 var(--font-body); color: var(--ink-soft); font-style: normal; }

.proj-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 90px) var(--pad-x) 0;
}
.proj-figure {
  margin: 0;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--scroll-line, var(--line));
  background: var(--paper-warm);
}
.proj-figure.wide { grid-column: 1 / -1; }
/* after a wide lead figure, don't leave the last figure sitting alone in the pair grid */
.proj-figure.wide:first-child ~ .proj-figure:last-child:nth-child(even) { grid-column: 1 / -1; }
.proj-figure img, .proj-figure video { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj-figure figcaption { padding: 12px 18px; font-size: 13px; color: var(--ink-soft); border-top: 1px solid var(--line); }

.proj-next { padding: clamp(60px, 9vw, 110px) 0 clamp(40px, 6vw, 70px) var(--pad-x); }

/* ---------- Blog posts (share proj-hero / proj-body chrome) ---------- */
.post-banner { max-width: 1180px; margin: 0 auto; padding: clamp(24px, 4vw, 44px) var(--pad-x) 0; }
.post-art {
  aspect-ratio: 16 / 5.5;
  border-radius: var(--radius-m);
  border: none;
  background: transparent;      /* free-flowing form, no box */
  overflow: visible;
}
.post-art canvas { width: 100%; height: 100%; }
.post-meta-line { margin-top: 16px; font-size: 14px; color: var(--ink-soft); }
.post-meta-line span { margin-right: 14px; }
@media (max-width: 600px) { .post-art { aspect-ratio: 16 / 9; } }

@media (max-width: 720px) {
  .proj-gallery { grid-template-columns: 1fr; }
}

/* ---------- Automations page: industries + capability grids ---------- */
.auto-section { max-width: 1180px; margin: 0 auto; padding: clamp(64px, 8vw, 116px) var(--pad-x) 0; }
.auto-section .section-title { margin-bottom: 14px; }
.auto-intro { color: var(--ink-soft); max-width: 60ch; margin-bottom: clamp(32px, 4.4vw, 52px); }
.auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(18px, 1.6vw, 24px);
}
.auto-card {
  border: 1px solid var(--scroll-line, var(--line));
  border-radius: var(--radius-m);
  padding: clamp(22px, 2.6vw, 28px);
  background: var(--paper);
  transition: transform 0.3s cubic-bezier(.22,.68,0,1), border-color 0.35s, box-shadow 0.4s ease;
}
.auto-card:hover { transform: translateY(-4px); }
.auto-card[data-hue="warm"]:hover {
  border-color: var(--warm-soft);
  box-shadow: 0 0 26px 2px rgba(192,91,46,0.14), 0 16px 40px -18px rgba(192,91,46,0.34);
}
.auto-card[data-hue="cool"]:hover {
  border-color: var(--cool-soft);
  box-shadow: 0 0 26px 2px rgba(109,124,190,0.16), 0 16px 40px -18px rgba(109,124,190,0.36);
}
.auto-card h3 { font-size: clamp(18px, 1.9vw, 21px); margin-bottom: 6px; }
.ac-who { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; letter-spacing: 0.01em; }
/* Prose alternative to the bullet list, so not every card is three ticks. */
.ac-body { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }
.auto-card h3 + .ac-body { margin-top: 14px; }
.auto-card ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.auto-card li {
  position: relative; padding-left: 18px;
  font-size: 14.5px; line-height: 1.5; color: var(--ink-soft);
}
.auto-card li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%;
}
.auto-card[data-hue="warm"] li::before { background: var(--warm-soft); }
.auto-card[data-hue="cool"] li::before { background: var(--cool-soft); }
.auto-partner {
  margin-top: clamp(26px, 3vw, 38px);
  padding: 20px 24px;
  border: 1px solid var(--scroll-line, var(--line));
  border-radius: var(--radius-m);
  background: var(--paper-warm);
  color: var(--ink-soft);
  font-size: 15px;
}
.auto-partner a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Sub-pages: keep every band on the same 1180 rhythm (the rail inherits the
   home page's full-bleed padding, which reads as off-centre here). */
.proj-next {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(60px, 9vw, 110px) var(--pad-x) clamp(40px, 6vw, 70px);
}
.proj-next .rail-head { padding-right: 0; }
.proj-next .rail { padding-left: 0; padding-right: 0; }
.faq { max-width: 1180px; }

/* Ambient streams flanking long prose (hidden when the gutters vanish) */
.proj-body { position: relative; }
.body-rail { position: absolute; top: 0; bottom: 0; width: 88px; pointer-events: none; }
.body-rail.left  { right: calc(100% + 36px); }
.body-rail.right { left:  calc(100% + 36px); }
.body-rail canvas { width: 100%; height: 100%; display: block; }
@media (max-width: 1200px) { .body-rail { display: none; } }
@media (prefers-reduced-motion: reduce) { .body-rail { display: none; } }

/* Sub-page vertical rhythm: give the dense card bands room to breathe */
.auto-section + .auto-section { padding-top: clamp(72px, 9vw, 128px); }
.auto-section:last-of-type { padding-bottom: clamp(16px, 2vw, 32px); }
.proj-next { padding-top: clamp(72px, 9vw, 124px); }
.faq { padding-top: clamp(64px, 8vw, 112px); }
.auto-card { padding: clamp(24px, 2.8vw, 32px); }
.auto-card ul { gap: 11px; }

/* Animated motif inside the service / article cards on the rails */
.card-art { height: 92px; margin: 6px 0 2px; pointer-events: none; }
.card-art canvas { width: 100%; height: 100%; display: block; }

/* Intro context box: the "what is…" explainer, boxed under the hero */
.proj-body.context-box {
  max-width: 900px;
  margin: clamp(24px, 3.4vw, 46px) auto 0;
  padding: clamp(28px, 3.4vw, 46px) clamp(28px, 3.4vw, 50px);
  border: 1px solid var(--scroll-line, var(--line));
  border-radius: var(--radius-m);
  background: var(--paper-warm);
}
.context-box h2 {
  font-size: clamp(21px, 2.5vw, 29px);
  margin: 0 0 14px;
}
.context-box p { margin-bottom: 14px; }
.context-box p:last-child { margin-bottom: 0; }
.post-banner { padding-top: clamp(28px, 4vw, 56px); }

/* Contextual lateral links, sitting on the same rhythm as every other band */
.related-services {
  max-width: 1180px;
  margin: clamp(44px, 5.5vw, 76px) auto 0;
  padding: 0 var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  font-size: 15px;
}
.rs-label {
  font: 600 12px/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 4px;
}
.related-services a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.related-services a:hover { border-color: var(--ink); }
.rs-sep { color: var(--line); }
@media (max-width: 600px) { .related-services { font-size: 14.5px; } }

/* ---------- Service pages: numbered process + platform strip ----------
   Two things the service pages were missing next to competitors: how the
   engagement actually runs, and what it is built on. */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(20px, 2vw, 30px);
}
.step { padding-top: 18px; border-top: 1px solid var(--scroll-line, var(--line)); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font: 500 12px/1 var(--font-body);
  letter-spacing: 0.08em;
  color: var(--warm-deep);
  margin-bottom: 14px;
}
.step h3 { font-size: clamp(17px, 1.8vw, 20px); margin-bottom: 8px; }
.step p { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); margin: 0; }

.stack-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.stack-item {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 13px 22px 13px 17px;
  border: 1px solid var(--scroll-line, var(--line));
  border-radius: 999px;
  background: var(--paper-warm);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(.22,.68,0,1), border-color 0.3s, background-color 0.3s;
}
.stack-item:hover, .stack-item:focus-visible { transform: translateY(-3px); border-color: var(--warm-soft); background: var(--paper); }
.stack-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.stack-item img { width: 22px; height: 22px; flex: none; }
.stack-item.no-mark { padding-left: 22px; }   /* no logo yet, keep the pill balanced */
.stack-name { font: 500 14px/1.2 var(--font-body); display: block; }
.stack-role { font-size: 12px; line-height: 1.2; color: var(--ink-soft); display: block; margin-top: 4px; }

/* ---------- Industry pages ---------- */
.ind-hero-media {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.ind-hero-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-m);
  border: 1px solid var(--scroll-line, var(--line));
  background: var(--paper-warm);
}

/* Automation list: name plus the one line that says what it actually does. */
.autos { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.auto-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: clamp(12px, 3vw, 44px);
  padding: clamp(20px, 2.4vw, 28px) 0;
  border-top: 1px solid var(--scroll-line, var(--line));
}
.auto-row:last-child { border-bottom: 1px solid var(--scroll-line, var(--line)); }
.auto-row h3 { font-size: clamp(17px, 1.9vw, 20px); margin: 0; }
.auto-row p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); max-width: 62ch; }
@media (max-width: 680px) {
  .auto-row { grid-template-columns: 1fr; gap: 8px; }
}

.sys-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: clamp(28px, 3.2vw, 40px);
}
.sys-label {
  font: 600 12px/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 6px;
}
.sys-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border: 1px solid var(--scroll-line, var(--line));
  border-radius: 999px;
  background: var(--paper-warm);
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* Index cards are whole-card links */
a.ind-card { display: block; text-decoration: none; color: inherit; }
a.ind-card h3 { color: var(--ink); }
