/* ==========================================================
   pages.css — ONLY the inner pages (about, portfolio, case
   study, services, blog, products, contact, 404).
   Uses the tokens and components from style.css; nothing here
   changes the home page.
   ========================================================== */

/* First section of an inner page sits under the fixed nav */
.page-head { padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 80px)); }
.page-head--bare { padding: 0; height: var(--nav-h); }

/* Sections that follow a page-head need less top space */
.section--tight { padding-top: 0; }

/* Back link above a title */
.crumbs { margin-bottom: 20px; font-size: 0.85rem; }
.crumbs a { color: var(--text-dim); transition: color .2s ease; }
.crumbs a:hover { color: var(--red-deep); }

/* ---------- Case study ---------- */
.case-meta {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
/* label above value (reverse of the home stat) */
.case-meta .stat span { margin: 0 0 6px; }
.case-meta .stat b {
  font-size: 1rem;
  color: var(--text);
}
.case-meta .stat a { color: var(--red-deep); }

.case-actions { margin-top: 24px; }

.case-cover {
  margin-top: 40px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: linear-gradient(135deg, var(--surface-2), #E7E4DE);
}
.case-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.case-block {
  display: grid;
  grid-template-columns: minmax(0, .4fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--line);
}
.case-block:first-child { border-top: 0; padding-top: 0; }
.case-block .section__title { margin-top: 0; font-size: 1.25rem; }

.about-stats--row {
  margin-top: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.gallery {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

/* ---------- Single service ---------- */
.service-hero {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.service-hero .service-card__icon { margin: 4px 0 0; flex: none; }

.about-grid--top { align-items: start; }

.included span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.check-list { margin-top: 14px; display: grid; gap: 10px; }
.check-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.92rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: .45em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
}

/* Ordered process — the content really is a sequence */
.steps {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.steps__n {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--red-tint);
  color: var(--red-deep);
  font-weight: 700;
  font-size: 0.9rem;
}
.steps p { font-size: 0.92rem; color: var(--text-dim); }

.faq { margin-top: 24px; display: grid; gap: 12px; max-width: 820px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 20px;
}
.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--red-deep);
  font-weight: 600;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 18px; font-size: 0.92rem; color: var(--text-dim); }

/* ---------- Prose (case study text, service body, blog post) ---------- */
.prose { font-size: 0.97rem; color: var(--text-dim); max-width: 70ch; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: 1.3rem; font-weight: 700; color: var(--text); margin-top: 34px; }
.prose h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); margin-top: 26px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--red-deep); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text); }
.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.88em;
}
.prose pre {
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.prose pre code { padding: 0; background: none; }
.prose blockquote {
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--red);
  color: var(--text);
}
.prose img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.prose--post { margin: 40px auto 0; font-size: 1.02rem; }

/* ---------- Blog ---------- */
.post .section__head { max-width: 820px; margin-inline: auto; }
.post .case-cover { max-width: 820px; margin-inline: auto; }
.post-meta { font-size: 0.8rem; color: var(--text-dim); }
.work-card__body .post-meta { margin-bottom: -4px; }
.work-card__title a { transition: color .2s ease; }
.work-card__title a:hover { color: var(--red-deep); }

.tags {
  max-width: 70ch;
  margin: 36px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tags .field-label { margin: 0 6px 0 0; }
.tag {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--surface);
}

/* ---------- Products ---------- */
.service-card__title { font-size: 1rem; font-weight: 600; line-height: 1.4; }

/* ---------- CTA band ---------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: clamp(28px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.cta-band .section__title { margin-top: 0; font-size: 1.3rem; }
.cta-band .section__lead { margin-top: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .case-block { grid-template-columns: 1fr; gap: 10px; }
  .service-hero { flex-direction: column; gap: 12px; }
}
@media (max-width: 560px) {
  .cta-band .btn { width: 100%; }
}
