/* CODY Typography System V1.0
 * Base body/H1-H6 families, weights and sizes are controlled in Astra.
 * Astra hosts Barlow/Inter locally. This file must not load another font copy.
 * Breakpoints match Astra's documented filters and Elementor: 1024 / 767.
 * Pixel tokens intentionally avoid assuming or overriding the root font size.
 */
:root {
  --cody-font-heading: "Barlow", "Arial Narrow", Arial, sans-serif;
  --cody-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cody-weight-body: 400;
  --cody-weight-medium: 500;
  --cody-weight-semibold: 600;
  --cody-weight-bold: 700;
  --cody-weight-hero: 800;
  --cody-h1-size: 48px;
  --cody-h2-size: 34px;
  --cody-h3-size: 22px;
  --cody-h4-size: 18px;
  --cody-h5-size: 16px;
  --cody-h6-size: 13px;
  --cody-lead-size: 18px;
  --cody-body-size: 16px;
  --cody-nav-size: 15px;
  --cody-cta-primary-size: 16px;
  --cody-cta-secondary-size: 14px;
  --cody-spec-size: 14px;
  --cody-input-size: 15px;
  --cody-caption-size: 13px;
  --cody-h1-line: 1.15;
  --cody-h2-line: 1.22;
  --cody-h3-line: 1.3;
  --cody-h4-line: 1.38;
  --cody-h5-line: 1.4;
  --cody-h6-line: 1.2;
  --cody-lead-line: 1.6;
  --cody-body-line: 1.65;
  --cody-nav-line: 1;
  --cody-cta-line: 1;
  --cody-spec-line: 1.45;
  --cody-input-line: 1.4;
  --cody-caption-line: 1.4;
  --cody-h5-tracking: 0.5px;
  --cody-kicker-tracking: 1.5px;
  --cody-cta-tracking: 0.8px;
  --cody-brand-yellow: #e5ad39;
  --cody-ink: #0f172a;
  --cody-caption-color: #64748b;
}

@media (max-width: 1024px) {
  :root {
    --cody-h1-size: 38px;
    --cody-h2-size: 28px;
    --cody-h3-size: 20px;
    --cody-h4-size: 17px;
    --cody-h5-size: 15px;
    --cody-h6-size: 12px;
    --cody-lead-size: 16px;
    --cody-body-size: 15px;
    --cody-cta-primary-size: 15px;
    --cody-caption-size: 12px;
  }
}
@media (max-width: 767px) {
  :root {
    --cody-h1-size: 32px;
    --cody-h2-size: 24px;
    --cody-h3-size: 18px;
    --cody-h4-size: 16px;
    --cody-h5-size: 15px;
    --cody-lead-size: 15px;
    --cody-nav-size: 16px;
    --cody-spec-size: 13px;
    --cody-input-size: 16px;
  }
}

/* Opt-in component classes work on a heading itself or an Elementor wrapper. */
.cody-hero-title,
.cody-hero-title .elementor-heading-title {
  font-family: var(--cody-font-heading);
  font-size: var(--cody-h1-size);
  font-weight: var(--cody-weight-hero);
  line-height: var(--cody-h1-line);
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.cody-section-title,
.cody-section-title .elementor-heading-title {
  font-family: var(--cody-font-heading);
  font-size: var(--cody-h2-size);
  font-weight: var(--cody-weight-bold);
  line-height: var(--cody-h2-line);
}
.cody-section-title::after {
  content: "";
  display: block;
  inline-size: 44px;
  block-size: 4px;
  margin-block-start: 12px;
  background-color: var(--cody-brand-yellow);
}
.cody-card-title,
.cody-card-title .elementor-heading-title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--cody-font-heading);
  font-size: var(--cody-h3-size);
  font-weight: var(--cody-weight-semibold);
  line-height: var(--cody-h3-line);
  min-block-size: 2.6em;
  max-block-size: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
}
.cody-card {
  display: flex;
  flex-direction: column;
  block-size: 100%;
}
.cody-card .cody-card-summary { font-size: 15px; }
.cody-card :is(.cody-cta-primary, .cody-cta-secondary) { margin-block-start: auto; }
.woocommerce ul.products li.product { display: flex; flex-direction: column; }
.woocommerce ul.products li.product > .button { align-self: flex-start; margin-block-start: auto; }

.cody-kicker,
.cody-kicker .elementor-heading-title {
  font-family: var(--cody-font-heading);
  font-size: var(--cody-h6-size);
  font-weight: var(--cody-weight-bold);
  line-height: var(--cody-h6-line);
  letter-spacing: var(--cody-kicker-tracking);
  text-transform: uppercase;
}
.cody-lead,
.cody-lead :where(p) {
  font-family: var(--cody-font-body);
  font-size: var(--cody-lead-size);
  font-weight: var(--cody-weight-body);
  line-height: var(--cody-lead-line);
  max-inline-size: min(70ch, 100%);
  overflow-wrap: break-word;
}

/* Functional text: front-end content only, excluding WP/Elementor controls. */
#page .main-header-menu .menu-link,
#page .main-navigation .menu-link {
  font-family: var(--cody-font-body);
  font-size: var(--cody-nav-size);
  font-weight: var(--cody-weight-semibold);
  line-height: var(--cody-nav-line);
}
#page .ast-mobile-header-content .menu-link,
#page .ast-mobile-popup-content .menu-link {
  min-block-size: 44px;
  display: flex;
  align-items: center;
}
.cody-cta-primary,
.cody-cta-secondary,
#page .wp-block-button__link,
#page .elementor-button,
#page .woocommerce :where(a.button, button.button, input.button) {
  font-family: var(--cody-font-body);
  font-size: var(--cody-cta-primary-size);
  font-weight: var(--cody-weight-bold);
  line-height: var(--cody-cta-line);
  text-transform: uppercase;
  letter-spacing: var(--cody-cta-tracking);
  min-block-size: 44px;
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: break-word;
}
.cody-cta-secondary,
#page .cody-cta-secondary :is(.elementor-button, .wp-block-button__link),
#page .cody-cta-secondary:is(.elementor-button, .wp-block-button__link) {
  font-size: var(--cody-cta-secondary-size);
}

.cody-spec-table,
.woocommerce table.woocommerce-product-attributes {
  inline-size: 100%;
  max-inline-size: 100%;
  table-layout: fixed;
  font-family: var(--cody-font-body);
  font-size: var(--cody-spec-size);
  line-height: var(--cody-spec-line);
  font-variant-numeric: tabular-nums;
}
.cody-spec-table :is(th, td),
.woocommerce table.woocommerce-product-attributes :is(th, td) {
  font-size: inherit;
  line-height: inherit;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.cody-spec-table th,
.woocommerce table.woocommerce-product-attributes th {
  font-weight: var(--cody-weight-semibold);
  text-align: start;
}
.cody-spec-table td,
.woocommerce table.woocommerce-product-attributes td {
  font-weight: var(--cody-weight-body);
  text-align: end;
}
.cody-spec-table :is(th, td) p,
.woocommerce table.woocommerce-product-attributes :is(th, td) p {
  font: inherit;
}
#page :is(input[type="text"], input[type="email"], input[type="tel"],
  input[type="url"], input[type="search"], input[type="number"],
  input[type="password"], input[type="date"], input[type="time"], select, textarea) {
  font-family: var(--cody-font-body);
  font-size: var(--cody-input-size);
  font-weight: var(--cody-weight-body);
  line-height: var(--cody-input-line);
  max-inline-size: 100%;
}
.cody-caption,
.cody-caption :where(p),
#page .rank-math-breadcrumb,
#page .rank-math-breadcrumb p,
#page .ast-footer-copyright p {
  font-family: var(--cody-font-body);
  font-size: var(--cody-caption-size);
  font-weight: var(--cody-weight-body);
  line-height: var(--cody-caption-line);
  color: var(--cody-caption-color);
}
.cody-on-dark { --cody-caption-color: #cbd5e1; }

/* These are letter/line details Astra's individual H5/H6 controls also expose. */
#page h4 { color: var(--cody-ink); }
#page h5 { letter-spacing: var(--cody-h5-tracking); }
#page h6 {
  letter-spacing: var(--cody-kicker-tracking);
  text-transform: uppercase;
}
