/* ==========================================================================
   Global style: one font, one type scale, one container width for the
   product, industry and blog pages (archives and single pages).
   Loaded last so it wins over the page stylesheets.
   ========================================================================== */

:root {
  --pak-font: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale (desktop max → phone min) */
  --pak-h1: clamp(34px, 3vw + 18px, 60px);          /* page titles        */
  --pak-h2: clamp(26px, 1.6vw + 17px, 40px);        /* section headings   */
  --pak-h2-article: clamp(24px, 1vw + 17px, 30px);  /* headings in posts  */
  --pak-h3: clamp(19px, .4vw + 15px, 22px);         /* sub headings       */
  --pak-card-title: 20px;                           /* card titles        */
  --pak-lead: clamp(16px, .3vw + 14px, 18px);       /* intro paragraphs   */
  --pak-body: 16px;                                 /* body text          */
  --pak-card-text: 15px;                            /* card text          */
  --pak-small: 14px;
  --pak-eyebrow: 13px;
  --pak-btn: 16px;
  --pak-btn-sm: 14px;

  --pak-lh-title: 1.12;
  --pak-lh-head: 1.2;
  --pak-lh-body: 1.65;

  --pak-container: 1272px;   /* content width (1320 minus gutters) */
  --pak-gutter: 24px;
}

@media (max-width: 767px) {
  :root { --pak-gutter: 16px; }
}

/* ---------- One font family everywhere (also replaces Elementor's Roboto) ---------- */
body[class*="elementor-kit-"],
body {
  --e-global-typography-primary-font-family: "Jost";
  --e-global-typography-secondary-font-family: "Jost";
  --e-global-typography-text-font-family: "Jost";
  --e-global-typography-accent-font-family: "Jost";
}

main#content,
main#content :is(h1, h2, h3, h4, h5, h6, p, li, a, span, label, input, select, textarea, button, small, strong, em, blockquote, figcaption, th, td):not([class*="icon"]):not([class*="eicon"]):not([class*="fa-"]):not([class*="dashicons"]),
main#content .elementor-widget-container,
main#content .elementor-widget-container *:not(i):not(svg):not(svg *):not([class*="icon"]):not([class*="eicon"]):not([class*="fa-"]):not([class*="dashicons"]),
#pak-blog,
#pak-blog *:not(i):not(svg):not(svg *),
#pak-post,
#pak-post *:not(i):not(svg):not(svg *) {
  font-family: var(--pak-font) !important;
}

/* ---------- H1: page titles ---------- */
.pak-phero__title,
#pak-blog .hero h1,
#pak-post h1,
.pkg-pp-hero__title,
.pkg-banner__title {
  font-size: var(--pak-h1) !important;
  font-weight: 700 !important;
  line-height: var(--pak-lh-title) !important;
  letter-spacing: -.02em !important;
}

/* ---------- H2: section headings ---------- */
.pkg-h2,
.pkg-pp .pkg-h2,
.pkg-pp-body .pkg-h2,
.pkg-pp-overview .pkg-h2,
.pkg-cl .pkg-h2,
.pkg-cl-panel .pkg-h2,
.pkg-pp-sheet__title,
.pak-parchive__subhead,
.pak-icta__title,
#pak-blog section h2:not(.toolbar h2),
#pak-post section:not(.post-wrap) h2 {
  font-size: var(--pak-h2) !important;
  font-weight: 700 !important;
  line-height: var(--pak-lh-head) !important;
  letter-spacing: -.01em;
}

/* Headings inside a blog article are one step smaller. */
#pak-post .content h2 {
  font-size: var(--pak-h2-article) !important;
  font-weight: 700 !important;
  line-height: var(--pak-lh-head) !important;
}

/* "Latest articles" heading above the post list. */
#pak-blog .toolbar h2 {
  font-size: var(--pak-h3) !important;
  font-weight: 700 !important;
}

/* ---------- H3 ---------- */
.pkg-pp h3:not(.pak-pcard__title),
.pkg-ind h3,
.pkg-cl h3,
#pak-post .content h3 {
  font-size: var(--pak-h3) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

/* ---------- Card titles (product, industry, blog, related posts) ---------- */
.pak-pcard__title,
#pak-blog .grid h3,
#pak-post .related h3,
#pak-post [class*="related"] h3 {
  font-size: var(--pak-card-title);
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

/* ---------- Eyebrows (small label above headings) ---------- */
.pak-phero__eyebrow,
.pkg-ind-eyebrow,
#pak-blog .eyebrow,
#pak-post .eyebrow,
.pkg-eyebrow {
  font-size: var(--pak-eyebrow) !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
}

.pkg-ind-eyebrow { gap: 10px; }
.pkg-ind-eyebrow::before,
.pkg-ind-eyebrow::after { width: 24px; }
.pkg-ind-eyebrow::after { display: none; }

/* ---------- Paragraphs ---------- */
.pkg-lead,
.pak-phero__lead,
#pak-blog .hero .lead,
#pak-post .p-hero p {
  font-size: var(--pak-lead) !important;
  line-height: 1.6 !important;
}

.pkg-text,
.pkg-pp p:not([class*="__count"]):not(.pak-pcard__text),
.pkg-ind p,
.pkg-cl p,
.pak-icta__text {
  font-size: var(--pak-body);
  line-height: var(--pak-lh-body) !important;
}

.pak-pcard__text,
#pak-blog .grid p {
  font-size: var(--pak-card-text);
  line-height: 1.6 !important;
}

/* Article text stays a little larger for easy reading. */
#pak-post .content p,
#pak-post .content li {
  font-size: clamp(16px, .3vw + 15px, 18px);
  line-height: 1.8 !important;
}

/* ---------- Buttons ---------- */
.pkg-btn,
.pak-pa-btn,
#pak-blog .btn,
#pak-post .btn,
main#content .elementor-button {
  font-size: var(--pak-btn) !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.pak-pcard .pak-pcard__btn {
  font-size: var(--pak-btn-sm) !important;
}

/* ---------- One container width ---------- */
#pak-blog .wrap,
#pak-post .wrap {
  width: min(var(--pak-container), 100% - var(--pak-gutter) * 2) !important;
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {
  .pak-pcard__title,
  #pak-blog .grid h3 { font-size: 18px; }
  .pkg-btn,
  .pak-pa-btn,
  #pak-blog .btn,
  #pak-post .btn { font-size: 15px !important; }
}

/* ---------- About Us page: same type scale as the other pages ---------- */
.pak-about .hero h1 {
  font-size: var(--pak-h1) !important;
  font-weight: 700 !important;
  line-height: var(--pak-lh-title) !important;
  letter-spacing: -.02em !important;
}
.pak-about section:not(.final) h2 {
  font-size: var(--pak-h2) !important;
  font-weight: 700 !important;
  line-height: var(--pak-lh-head) !important;
  letter-spacing: -.01em;
}
/* The closing call-to-action is a statement line, so it uses the page-title size. */
.pak-about .final h2 {
  font-size: var(--pak-h1) !important;
  font-weight: 700 !important;
  line-height: var(--pak-lh-title) !important;
}

/* ==========================================================================
   Mobile safety rules for every theme page
   ========================================================================== */

/* Nothing can push the page sideways (slide-in animations, long words,
   wide embeds). "clip" keeps sticky elements working. */
html { overflow-x: clip; }
main#content,
.pak-quote,
.pak-hto { overflow-x: clip; }

/* Very long words or links wrap instead of running off the screen. */
main#content :is(h1, h2, h3, h4, h5, h6, p, li, a, td, th, dd, dt, blockquote, figcaption, label) {
  overflow-wrap: break-word;
}

/* Images, videos and embeds never get wider than their column. */
main#content :is(img, video, iframe, embed, object, svg):not([width="1"]) { max-width: 100%; }
main#content :is(img, video) { height: auto; }

@media (max-width: 767px) {
  /* 16px text in form fields stops iPhones zooming in when a field is tapped. */
  main#content :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea),
  .pak-quote :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: 16px !important;
  }

  /* Comfortable tap areas for breadcrumb and small text links. */
  main#content :is(.pak-phero__crumbs, .pkg-pp-crumbs, .crumbs, [class*="crumbs"]) a {
    display: inline-block;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  main#content input[type="checkbox"],
  main#content input[type="radio"] { min-width: 18px; min-height: 18px; }

  /* Wide tables scroll inside their box instead of stretching the page. */
  main#content .content table,
  main#content .entry-content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ==========================================================================
   One heading scale on phones (767px and below), on every page.
   Page title 34px · section heading 26px · closing statement 30px ·
   card/step heading 20px · big numbers scaled down.
   ========================================================================== */
@media (max-width: 767px) {
  /* Page titles */
  main#content h1,
  .pak-quote h1 {
    font-size: 34px !important;
    line-height: 1.1 !important;
    letter-spacing: -.02em !important;
  }

  /* Section headings */
  .pak-ind .pi-h2,
  .pak-hto .ho-h2,
  .pak-quote > section h2,
  main#content.pak-contact-page section h2,
  .pak-why section h2,
  .pak-about section h2 {
    font-size: 26px !important;
    line-height: 1.2 !important;
    letter-spacing: -.01em !important;
  }

  /* Closing call-to-action statements */
  .pak-ind .pi-final h2,
  .pak-hto .ho-final h2,
  .pak-about .final h2,
  .pak-why .final-box h2,
  main#content.pak-contact-page .cta h2 {
    font-size: 30px !important;
    line-height: 1.05 !important;
  }

  /* Card and step headings */
  .pak-ind .pi-card h3,
  .pak-ind .pi-tq h3,
  .pak-hto .ho-st h3,
  main#content.pak-contact-page section h3,
  .pak-why section h3,
  .pak-about section h3 {
    font-size: 20px !important;
    line-height: 1.3 !important;
  }

  /* Big display numbers */
  .pak-ind .pi-hs b { font-size: 38px !important; }
  .pak-about .h-gallery .stat b { font-size: 56px !important; }
  .pak-about .bento b.num { font-size: 40px !important; }
  .pak-why .years .big { font-size: 72px !important; line-height: 1 !important; }
  .pak-why .r-grid .n { font-size: 42px !important; }
  .pak-ind .pi-marquee span,
  .pak-why .marquee span { font-size: 26px !important; }
}

/* Small phones */
@media (max-width: 380px) {
  main#content h1,
  .pak-quote h1 { font-size: 30px !important; }
  .pak-ind .pi-final h2,
  .pak-hto .ho-final h2,
  .pak-about .final h2,
  .pak-why .final-box h2 { font-size: 28px !important; }
}

/* ==========================================================================
   One H2 style on every page (home, product, industry, industries, blog,
   about, why choose us, quote, contact, how to order).
   40px text, 48px line height (28px / 36px on phones). Loaded last, so it
   replaces the per-page sizes. Text color stays per section, so headings on
   dark backgrounds stay white.
   Not changed: headings inside articles and text boxes, card titles
   (product cards, filter, quote form card, map card, note boxes), the hero
   slider title and headings inside Elementor templates.
   ========================================================================== */
:is(main#content, .pak-quote, .pak-ind) h2:not(.ph-slide__title):not(.elementor-heading-title):not(#pak-post .content h2):not(.ph-seo__scroll h2):not(.pkg-cl-acc__body h2):not(#pak-blog .toolbar h2):not(#pak-blog .feat-card h2):not(.pak-contact .mapcard h2):not(.elementor-widget-container h2):not(.pak-pcard__title):not(.pak-filter__title):not(.screen-reader-text):not(.pkg-cl-note h2):not(.pak-bq__head):not(.ps-tb__title):not(.psm-sec__title) {
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif !important;
  font-size: 40px !important;
  font-weight: 700 !important;
  line-height: 48px !important;
  letter-spacing: -0.4px !important;
  text-transform: none !important;
}
@media (max-width: 767px) {
  :is(main#content, .pak-quote, .pak-ind) h2:not(.ph-slide__title):not(.elementor-heading-title):not(#pak-post .content h2):not(.ph-seo__scroll h2):not(.pkg-cl-acc__body h2):not(#pak-blog .toolbar h2):not(#pak-blog .feat-card h2):not(.pak-contact .mapcard h2):not(.elementor-widget-container h2):not(.pak-pcard__title):not(.pak-filter__title):not(.screen-reader-text):not(.pkg-cl-note h2):not(.pak-bq__head):not(.ps-tb__title):not(.psm-sec__title) {
    font-size: 28px !important;
    line-height: 36px !important;
  }
}

/* ---------- Phones: small badges and labels no smaller than 12px ---------- */
@media (max-width: 767px) {
  .ps-pill,
  .dt-tc-cat,
  .pak-pcard__badge,
  .ph-hot__badge,
  .ph-pr__stat > span,
  .aw-sn small {
    font-size: 12px !important;
  }
}
