/* ==========================================================
   XTC Pages - page-level typography and local variants
   ========================================================== */

.xtc-section__intro {
  display: grid;
  gap: var(--xtc-space-2);
  margin-bottom: var(--xtc-space-5);
  max-width: 48rem;
  justify-items: start;
  text-align: left;
}

.xtc-section__intro p {
  margin: 0;
  max-width: 42rem;
}

.xtc-section__actions {
  margin-top: var(--xtc-space-4);
}

.xtc-grid,
.xtc-metrics,
.xtc-steps,
.xtc-link-grid {
  gap: var(--xtc-space-4);
  margin-top: var(--xtc-space-5);
}

.xtc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--xtc-space-3);
  margin-top: var(--xtc-space-4);
  min-width: 0;
}

.xtc-actions > * {
  min-width: 0;
}

.xtc-actions > .xtc-btn {
  flex: 0 0 auto;
  max-width: 100%;
}

.xtc-faq {
  gap: var(--xtc-space-2);
  margin-top: var(--xtc-space-4);
}

.xtc-shell h1,
.xtc-shell h2,
.xtc-shell h3,
.xtc-shell h4 {
  color: var(--xtc-ink-strong);
  letter-spacing: -0.02em;
}

.xtc-shell h1 {
  font-size: var(--xtc-fs-h1);
  line-height: 1.12;
  font-weight: 700;
  margin: 0 0 var(--xtc-space-3);
  max-width: 18ch;
}

.xtc-shell h2 {
  font-size: var(--xtc-fs-h2);
  line-height: 1.16;
  font-weight: 700;
  margin: 0 0 var(--xtc-space-2);
}

.xtc-shell h3 {
  font-size: var(--xtc-fs-h3);
  line-height: 1.26;
  font-weight: 700;
  margin: 0 0 10px;
}

.xtc-shell h4 {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
  margin: 0 0 8px;
}

.xtc-shell p,
.xtc-shell li {
  color: var(--xtc-ink-soft);
  font-size: 1rem;
  line-height: 1.68;
}

.xtc-shell p {
  margin: 0 0 14px;
}

.xtc-shell p:last-child {
  margin-bottom: 0;
}

.xtc-shell li + li {
  margin-top: 6px;
}

.xtc-lead,
.xtc-section > .xtc-lead,
.xtc-section__intro p {
  color: var(--xtc-muted);
  font-size: 1rem;
  line-height: 1.62;
}

.xtc-lead {
  max-width: 44rem;
  margin: 0 0 var(--xtc-space-4);
}

.page-header,
body.single-post .entry-header,
body.archive .entry-header,
body.blog .entry-header,
body.page:not(.home) .entry-header {
  display: grid;
  gap: var(--xtc-space-2);
  margin-bottom: var(--xtc-space-5);
  justify-items: start;
  text-align: left;
}

.page-header p,
body.single-post .entry-header p,
body.archive .entry-header p,
body.blog .entry-header p,
body.page:not(.home) .entry-header p {
  margin: 0;
  max-width: 42rem;
  color: var(--xtc-muted);
}

body.single-post .post-thumbnail,
body.single-post .entry-content,
body.page:not(.home) .entry-content,
body.single-post .entry-footer,
body.single-post .post-navigation {
  margin-top: var(--xtc-space-5);
}

body.page:not(.home) .xtc-page__content {
  color: var(--xtc-ink-soft);
}

body.page:not(.home) .xtc-page__content > :not(.xtc-shell):not(.xtc-privacy-policy) {
  max-width: 42rem;
}

body.page:not(.home) .xtc-page__content > :is(h2, h3, h4) {
  margin-top: clamp(26px, 3.6vw, 38px);
  margin-bottom: 10px;
  color: var(--xtc-ink-strong);
  letter-spacing: -0.02em;
}

body.page:not(.home) .xtc-page__content > h2 {
  font-size: clamp(1.36rem, 2vw, 1.8rem);
  line-height: 1.2;
}

body.page:not(.home) .xtc-page__content > h3 {
  font-size: clamp(1.08rem, 1.45vw, 1.24rem);
  line-height: 1.3;
}

body.page:not(.home) .xtc-page__content > h4 {
  font-size: 1rem;
  line-height: 1.38;
}

body.page:not(.home) .xtc-page__content > :is(p, ul, ol, blockquote, table, hr) {
  max-width: 42rem;
}

body.page:not(.home) .xtc-page__content > p {
  margin-bottom: 16px;
  color: var(--xtc-ink-soft);
  line-height: 1.72;
}

body.page:not(.home) .xtc-page__content > :is(ul, ol) {
  margin: 0 0 18px;
  padding-left: 1.3rem;
  color: var(--xtc-ink-soft);
}

body.page:not(.home) .xtc-page__content > :is(ul, ol) li + li {
  margin-top: 8px;
}

body.page:not(.home) .xtc-page__content > hr {
  border: 0;
  border-top: 1px solid rgba(41, 92, 69, 0.14);
  margin: clamp(26px, 3.6vw, 38px) 0;
}

.xtc-shell--contact-page .xtc-hero {
  padding: clamp(28px, 3.6vw, 38px);
  margin-bottom: var(--xtc-space-2);
  text-align: left;
}

.xtc-shell--contact-page .xtc-section__intro {
  margin-bottom: var(--xtc-space-4);
}

.xtc-shell--contact-page .xtc-contact-box,
.xtc-shell--contact-page .xtc-step,
.xtc-shell--contact-page .xtc-stat {
  padding: 18px;
  box-shadow: var(--xtc-shadow-soft);
}

.xtc-shell--contact-page .xtc-section--contact-form-wrap,
.xtc-shell--contact-page #xtc-contact-form-section {
  scroll-margin-top: calc(var(--xtc-header-height) + var(--xtc-page-top-space));
}

.xtc-shell--contact-page .xtc-contact-form,
.xtc-shell--contact-page .wp-block-jetpack-contact-form {
  border: 1px solid var(--xtc-border);
  border-radius: var(--xtc-radius-lg);
  padding: clamp(22px, 3.1vw, 30px);
  gap: 15px;
  box-shadow: var(--xtc-shadow-md);
  background: linear-gradient(180deg, var(--xtc-surface) 0%, var(--xtc-surface-1) 100%);
}

.xtc-shell--contact-page .xtc-contact-form__row {
  gap: 12px;
}

.xtc-shell--contact-page .xtc-contact-form label,
.xtc-shell--contact-page .wp-block-jetpack-contact-form label {
  gap: 6px;
  line-height: 1.32;
}

.xtc-shell--contact-page .xtc-section--contact-form-wrap h2,
.xtc-shell--contact-page #xtc-contact-form-section h2 {
  margin-bottom: 8px;
}

.xtc-shell--contact-page .xtc-section--contact-form-wrap p,
.xtc-shell--contact-page #xtc-contact-form-section p {
  color: var(--xtc-muted);
}

.xtc-shell--contact-page .xtc-section--social-proof,
.xtc-shell--contact-page .xtc-section--what-happens-next,
.xtc-shell--contact-page .xtc-section--contact-guidance {
  margin-top: var(--xtc-space-4);
  padding-top: var(--xtc-space-5);
}

.xtc-shell--contact-page .xtc-section--contact-form-wrap .xtc-section__intro,
.xtc-shell--contact-page #xtc-contact-form-section .xtc-section__intro {
  max-width: 38rem;
}

@media (max-width: 900px) {
  .xtc-section__intro {
    margin-bottom: var(--xtc-space-4);
  }

  .xtc-grid,
  .xtc-metrics,
  .xtc-steps,
  .xtc-link-grid {
    margin-top: var(--xtc-space-4);
  }

  .xtc-shell--contact-page .xtc-hero {
    padding: 24px 22px;
  }
}

@media (max-width: 640px) {
  .xtc-section__intro {
    margin-bottom: var(--xtc-space-3);
  }

  .xtc-shell--contact-page .xtc-hero {
    padding: 22px 18px;
  }

  body.single-post .post-thumbnail {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--xtc-radius-lg);
  }

  body.single-post .post-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}
