/* ==========================================================================
   pages.css — Styles for sub-pages (page hero, prose, blog, contact, 404)
   and active-nav state. Loaded after sections.css.
   ========================================================================== */

/* ---- Active nav state (body[data-page] matches [data-nav]) ---- */
body[data-page="features"] [data-nav="features"],
body[data-page="pricing"] [data-nav="pricing"],
body[data-page="about"] [data-nav="about"],
body[data-page="contact"] [data-nav="contact"],
body[data-page="blog"] [data-nav="blog"] {
  color: var(--brand);
  background: var(--surface);
}

/* ---- Page hero (sub-page header) ---- */
.page-hero {
  background: var(--grad-hero);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  text-align: center;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: center;
  color: var(--muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { color: var(--line-strong); }
.page-hero__title { font-size: var(--fs-h1); margin-bottom: var(--sp-3); }
.page-hero__subtitle {
  color: var(--muted);
  font-size: var(--fs-lead);
  max-width: 60ch;
  margin-inline: auto;
}

/* ---- Prose (legal pages, article body) ---- */
.prose { max-width: var(--container-narrow); margin-inline: auto; }
.prose h2 { font-size: var(--fs-h3); margin-top: var(--sp-7); margin-bottom: var(--sp-3); }
.prose h3 { font-size: var(--fs-h4); margin-top: var(--sp-5); margin-bottom: var(--sp-2); }
.prose p { color: var(--ink-700); margin-bottom: var(--sp-4); }
.prose ul { margin-bottom: var(--sp-4); display: grid; gap: var(--sp-2); }
.prose ul li {
  position: relative;
  padding-inline-start: var(--sp-5);
  color: var(--ink-700);
}
.prose ul li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
.prose__updated { color: var(--muted-light); font-size: var(--fs-sm); margin-bottom: var(--sp-6); }

/* ---- About highlights ---- */
.about-values { margin-top: var(--sp-7); }
.value-card { text-align: center; }
.value-card .icon-badge { margin-inline: auto; }
.value-card h3 { font-size: var(--fs-h4); margin-bottom: var(--sp-2); }
.value-card p { color: var(--muted); font-size: var(--fs-sm); }

/* ---- Blog ---- */
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-card__thumb {
  aspect-ratio: 16 / 9;
  background: var(--grad-cta);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
}
.post-card__thumb svg { width: 48px; height: 48px; }
.post-card__body { padding: var(--sp-5); display: flex; flex-direction: column; flex: 1; }
.post-card__meta { color: var(--muted-light); font-size: var(--fs-xs); margin-bottom: var(--sp-2); }
.post-card__title { font-size: 1.15rem; font-weight: var(--fw-semibold); margin-bottom: var(--sp-2); }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--brand); }
.post-card__excerpt { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.post-card__more { margin-top: auto; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }

/* ---- Single article ---- */
.article { max-width: var(--container-narrow); margin-inline: auto; }
.article__meta { color: var(--muted-light); font-size: var(--fs-sm); margin-bottom: var(--sp-6); }
.article__cover {
  aspect-ratio: 16 / 7;
  background: var(--grad-cta);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: var(--sp-6);
}
.article__cover svg { width: 64px; height: 64px; }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--sp-7);
  align-items: start;
}
.contact-info { display: grid; gap: var(--sp-4); }
.contact-item { display: flex; gap: var(--sp-3); align-items: flex-start; }
.contact-item .icon-badge { margin-bottom: 0; width: 44px; height: 44px; flex: none; }
.contact-item h2 { font-size: 1rem; font-weight: var(--fw-semibold); margin-bottom: 2px; }
.contact-item p { color: var(--muted); font-size: var(--fs-sm); }
.contact-item a { color: var(--muted); }
.contact-item a:hover { color: var(--brand); }

.form { display: grid; gap: var(--sp-4); scroll-margin-top: 96px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.field { display: grid; gap: var(--sp-2); }
.field label { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.field__hint { font-size: var(--fs-xs); color: var(--muted); }
/* A field only bots fill (the contact form's honeypot). */
.form__trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form-notice { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); font-size: var(--fs-sm); line-height: 1.9; }
.form-notice p { margin: 0; }
.form-notice ul { margin: var(--sp-2) 0 0; padding-inline-start: var(--sp-5); }
.form-notice--success { background: rgba(22, 163, 74, 0.1); color: var(--success-700); }
.form-notice--error { background: rgba(220, 38, 38, 0.08); color: var(--danger-700); }
.field input,
.field textarea {
  font: inherit;
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-050);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input.ltr { text-align: start; }

/* ---- 404 ---- */
.notfound { text-align: center; padding-block: var(--sp-9); }
.notfound__code {
  font-size: clamp(4rem, 2rem + 12vw, 8rem);
  font-weight: var(--fw-bold);
  line-height: 1;
  color: var(--brand);
}
.notfound__title { font-size: var(--fs-h3); margin-block: var(--sp-3) var(--sp-3); }
.notfound__text { color: var(--muted); margin-bottom: var(--sp-6); }

/* ---- Blog pagination ---- */
.blog-pagination { margin-top: var(--sp-7); }
.blog-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: center;
}
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 var(--sp-3);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: var(--fw-medium);
}
.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
}
