/* content.css - additive styles for generated content pages only.
 *
 * Loaded ONLY by pages under /services, /industries, /solutions, /resources,
 * /locations and the hubs. styles.css and theme-gold.css are untouched, so the
 * homepage and the original 7 pages cannot regress from anything in here.
 * Uses existing design tokens only: no new colours, no new fonts.
 */

/* ---- Breadcrumbs ---- */
.crumbs {
  margin-bottom: var(--s-4);
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.crumbs li + li::before {
  content: "/";
  margin-right: var(--s-1);
  color: var(--line-strong);
}
.crumbs a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.crumbs a:hover {
  color: var(--baby);
  border-bottom-color: var(--baby);
}
.crumbs [aria-current="page"] {
  color: var(--text);
}

.hero-content {
  padding-bottom: var(--s-4);
}

/* ---- Prose ---- */
.prose {
  max-width: 72ch;
}
.prose h2 {
  margin-bottom: var(--s-3);
}
.prose h3 {
  margin-top: var(--s-6);
  margin-bottom: var(--s-2);
  font-size: 1.15rem;
  color: var(--heading);
}
.prose p {
  margin-bottom: var(--s-3);
}
.prose ul,
.prose ol {
  margin: 0 0 var(--s-4);
  padding-left: 1.25rem;
  color: var(--muted);
}
.prose li {
  margin-bottom: var(--s-2);
}
.prose strong {
  color: var(--text);
}
.prose a {
  color: var(--baby);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose a:hover {
  color: var(--baby-soft);
}

/* ---- Direct answer card ---- */
.answer-card {
  max-width: 72ch;
  padding: var(--s-4) var(--s-6);
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
}
.answer-card p {
  margin: 0 0 var(--s-2);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.65;
}
.answer-card p:last-child {
  margin-bottom: 0;
}
.answer-card a {
  color: var(--baby);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Grids ----
   styles.css is mobile-first (.grid-2 goes 2-up at min-width:640, .grid-3 at
   min-width:900). Match that direction rather than fighting it with max-width
   overrides: single column is the base, columns are added upward. */
.grid-2,
.grid-3 {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Grid items default to min-width:auto, so an item whose min-content exceeds the
   container drags the whole track wider than the grid box and the page scrolls
   sideways. Nothing in a content card needs to be wider than its column. */
.grid-2 > *,
.grid-3 > * {
  min-width: 0;
}

/* .feature-list li is display:flex (styles.css). Inline <a> children become
   separate flex items and flex does not wrap between items, so a list item
   containing links reports a min-content equal to the SUM of its links. That was
   blowing the grid track out to 505px at 390px wide. The generator wraps item
   content in a single <span>; this lets that span shrink and wrap normally. */
.feature-list li > span {
  min-width: 0;
  flex: 1 1 auto;
}

/* Long URLs, DNS records and code samples must wrap rather than push the page.
   Applied to every <code> in the content area, not a hand-listed set of parents:
   the pages legitimately contain things like yourdomain.com/robots.txt and
   v=spf1 include:_spf.google.com, which are single unbreakable tokens wider than
   a 390px column. */
main code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card-muted {
  background: var(--panel-2);
}

/* ---- Link cards ---- */
.link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.link-card:hover {
  transform: translateY(-3px);
  border-color: var(--baby);
}
.link-card h3 {
  color: var(--heading);
  margin-bottom: var(--s-2);
}
.link-card p {
  color: var(--muted);
  margin: 0;
}
/* Keyboard users must get the same affordance as mouse users. */
.link-card:focus-visible {
  outline: 2px solid var(--baby);
  outline-offset: 3px;
  border-color: var(--baby);
}

/* ---- Steps ---- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-4);
  max-width: 78ch;
}
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-4);
  align-items: start;
  padding: var(--s-4);
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-md);
}
.step-n {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.9rem;
}
/* The content column is a grid item, so it defaults to min-width:auto and an
   unbreakable token inside it (a URL, a DNS record) would widen the whole track
   past the container. */
.steps li > div {
  min-width: 0;
}
.steps h3 {
  margin: 0 0 var(--s-1);
}
.steps p {
  margin: 0;
  color: var(--muted);
}

/* ---- Checklist ---- */
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.check-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: var(--s-3);
  color: var(--muted);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.75rem;
  height: 0.4rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.check-list strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.15rem;
}

/* ---- FAQ ---- */
.faq-list {
  max-width: 78ch;
  display: grid;
  gap: var(--s-2);
}
.faq-item {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-md);
  padding: 0;
}
.faq-item summary {
  cursor: pointer;
  padding: var(--s-3) var(--s-4);
  font-weight: 600;
  color: var(--heading);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent);
  flex: none;
  line-height: 1;
}
.faq-item[open] summary::after {
  content: "\2212";
}
.faq-item summary:focus-visible {
  outline: 2px solid var(--baby);
  outline-offset: -2px;
  border-radius: var(--r-md);
}
.faq-a {
  padding: 0 var(--s-4) var(--s-4);
  color: var(--muted);
}
.faq-a p {
  margin: 0 0 var(--s-2);
}
.faq-a p:last-child {
  margin-bottom: 0;
}
.faq-a a {
  color: var(--baby);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Trust / accuracy note ---- */
.trust-note {
  max-width: 72ch;
  padding: var(--s-3) var(--s-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: transparent;
}
.trust-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.trust-note a {
  color: var(--baby);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Reduced motion: reveals must never hide content ---- */
@media (prefers-reduced-motion: reduce) {
  .link-card,
  .link-card:hover {
    transform: none;
    transition: none;
  }
}
