/**
 * @file
 * Editorial typography styles for Wares Point Theme.
 */

/* ==========================================================================
   Heading Hierarchy (Refined, Space-Efficient & Distinct Editorial Design)
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--wp-font-heading);
  color: var(--wp-text, #24211E);
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: var(--wp-space-sm, 0.5rem);
  font-weight: var(--wp-font-weight-heading, 700);
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* Page Titles */
.page-title,
h1.page-title,
.node__title {
  font-family: var(--wp-font-page-title, var(--wp-font-heading));
  color: var(--wp-brown-deep, #896432);
}

/* Block Titles */
.block__title,
.sidebar .block__title,
.footer-block__title,
h2.block-title,
h3.block-title {
  font-family: var(--wp-font-block-title, var(--wp-font-heading));
  font-weight: var(--wp-font-weight-block-title, 700);
}

/* Article & Long-form Content Body */
.node__content,
.node--full-article .node__content,
.field--name-body {
  font-family: var(--wp-font-content, var(--wp-font-body));
}

/* Metadata & Bylines */
.node__meta,
.card__meta,
.metadata,
.comment__meta {
  font-family: var(--wp-font-metadata, var(--wp-font-body));
}

/* --------------------------------------------------------------------------
   Distinct Sizing & Spacing for Headings
   -------------------------------------------------------------------------- */

/* H1: Authoritative article & primary page title */
h1 {
  font-size: clamp(1.65rem, 2.5vw + 0.6rem, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--wp-brown-deep, #896432);
  margin-top: 0;
  margin-bottom: var(--wp-space-md, 0.75rem);
}

/* H2: Section heading with distinct warm sand accent indicator */
h2 {
  font-size: clamp(1.3rem, 1.6vw + 0.5rem, 1.7rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--wp-brown-deep, #896432);
  margin-top: 1.75rem;
  margin-bottom: var(--wp-space-sm, 0.5rem);
  position: relative;
}

/* Distinct subtle border highlight for article & long-form H2 sections */
.node__content h2,
.field--name-body h2 {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--wp-border-soft, #DECDB5);
}

/* H3: Subsection heading with warm tan tone and compact spacing */
h3 {
  font-size: clamp(1.1rem, 1.1vw + 0.4rem, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--wp-tan-dark, #A88554);
  margin-top: 1.25rem;
  margin-bottom: var(--wp-space-xs, 0.35rem);
}

/* H4: Topic heading / sub-point */
h4 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--wp-text, #24211E);
  margin-top: 1rem;
  margin-bottom: var(--wp-space-xs, 0.25rem);
}

/* H5: Label-style small heading */
h5 {
  font-family: var(--wp-font-body, system-ui, sans-serif);
  font-size: 0.925rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--wp-text-muted, #6B6259);
  margin-top: 0.75rem;
  margin-bottom: var(--wp-space-xs, 0.25rem);
}

/* H6: Small uppercase eyebrow / metadata banner heading */
h6 {
  font-family: var(--wp-font-body, system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wp-tan-dark, #A88554);
  margin-top: 0.75rem;
  margin-bottom: var(--wp-space-xs, 0.25rem);
}

/* Prevent excessive top margins on consecutive headings */
h1 + h2,
h2 + h3,
h3 + h4,
h4 + h5,
h5 + h6 {
  margin-top: 0.5rem;
}

/* Keep headings attached to subsequent paragraphs */
h1, h2, h3, h4, h5, h6 {
  break-after: avoid;
}

p {
  margin-top: 0;
  margin-bottom: var(--wp-space-md);
}

/* Long-form editorial readability: maintains ~65-80 characters per line */
.node--full-article .node__content > p,
.node--full-article .node__content > ul,
.node--full-article .node__content > ol,
.text-readable {
  max-width: var(--wp-max-width-text, 75ch);
}

.lead,
p.lead {
  font-size: 1.25rem;
  line-height: var(--wp-line-height-normal);
  color: var(--wp-text-muted);
}

.eyebrow {
  display: inline-block;
  font-family: var(--wp-font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--wp-tan-dark);
  margin-bottom: var(--wp-space-sm);
}

blockquote {
  margin: var(--wp-space-xl) 0;
  padding: var(--wp-space-md) var(--wp-space-xl);
  border-left: 4px solid var(--wp-sand-primary);
  background-color: rgba(238, 214, 181, 0.25);
  font-family: var(--wp-font-heading);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--wp-brown-deep);
}

blockquote p:last-child {
  margin-bottom: 0;
}

code, kbd, samp {
  font-family: var(--wp-font-mono);
  font-size: 0.875em;
  padding: 0.2em 0.4em;
  border-radius: var(--wp-radius-sm);
  background-color: var(--wp-beige-light);
  color: var(--wp-brown-deep);
}

pre {
  font-family: var(--wp-font-mono);
  font-size: 0.9rem;
  padding: var(--wp-space-md);
  border-radius: var(--wp-radius-md);
  background-color: #24211e;
  color: var(--wp-cream-light);
  overflow-x: auto;
  margin: var(--wp-space-lg) 0;
}

pre code {
  padding: 0;
  background-color: transparent;
  color: inherit;
}
