/* ============================================================================
   EduPaperHub — Global Typography System
   Montserrat (headings / nav / buttons) + Roboto (body / content)
   Loaded last, after every other theme stylesheet.
   ============================================================================ */

/* ---------- 1. Font tokens (single source of truth) ---------- */
:root {
    --eph-font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --eph-font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

    /* Legacy aliases used by homepage.css / single-redesign.css */
    --font-body: var(--eph-font-body);
    --font-heading: var(--eph-font-heading);
    --pp-font: var(--eph-font-body);

    /* Typography colours */
    --eph-heading-color: #222222;
    --eph-body-color: #333333;
    --eph-link-color: #0756A4;
}

/* ---------- 2. Families ---------- */
html body {
    font-family: var(--eph-font-body) !important;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--eph-body-color) !important;
}

h1, h2, h3, h4, h5, h6,
.hero-title, .section-title, .page-title, .pp-post-title,
.entry-title, .archive-title, .widget-title,
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    font-family: var(--eph-font-heading) !important;
}

/* Navigation */
.main-navigation ul li a,
.main-navigation ul li ul li a,
.site.front-page-home .main-nav a,
.site.front-page-home .main-nav .sub-menu a,
nav[aria-label="Primary"] a,
.site-header nav a {
    font-family: var(--eph-font-heading) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* Buttons */
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.btn, .button,
.rbtn, .ubtn,
.pp-btn,
.hero-search-btn,
.header-search-btn,
.newsletter-form button,
.pp-comments .comment-form .submit,
.wp-block-button__link {
    font-family: var(--eph-font-heading) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Legacy inline "Poppins" styles inside imported post content */
[style*="Poppins" i],
[style*="Inter" i] {
    font-family: var(--eph-font-heading) !important;
}

/* ---------- 3. Heading sizes, weights, line-height ---------- */
h1, .hero-title, .page-title, .pp-post-title {
    font-size: 34px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

h2 {
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

h3 {
    font-size: 22px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

h4 {
    font-size: 19px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

h5, h6 {
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

/* Colours: content headings use the spec colour. Headings that sit on dark
   surfaces (hero, footer, CTA banners) keep their own contrast colour. */
h1, h2, h3, h4, h5, h6 {
    color: var(--eph-heading-color);
}

.pp-single h1, .pp-single h2, .pp-single h3, .pp-single h4,
.pp-content h1, .pp-content h2, .pp-content h3, .pp-content h4 {
    color: var(--eph-heading-color);
}

/* Dark headings on light page sections */
.hero-title,
.section-title,
.browse-title,
.page-title,
.pp-post-title,
.pp-hero h1.pp-post-title,
.pp-ep-hero h1.pp-post-title {
    color: var(--eph-heading-color) !important;
}

.uhub h2, .uhub h3, .uhub h4 {
    color: var(--eph-heading-color) !important;
}

/* ---------- 4. Paragraphs and article content ---------- */
p, li, td, th, dd, dt, blockquote {
    line-height: 1.7;
}

.page-content,
.single-post-content,
.pp-content,
.pp-single-main,
.single-redesign-main,
.entry-content {
    font-family: var(--eph-font-body) !important;
    line-height: 1.7;
}

.page-content,
.single-post-content,
.entry-content,
.pp-content {
    font-size: 17px;
    color: var(--eph-body-color);
}

.page-content p,
.single-post-content p,
.entry-content p,
.pp-content p,
.pp-content li,
.pp-lead {
    font-size: 17px !important;
    line-height: 1.7 !important;
}

/* Body text colour inside article content */
.page-content p,
.single-post-content p,
.entry-content p,
.pp-content p,
.pp-content li,
.pp-content .pp-lead,
.pp-steps > li p,
.pp-steps > li li {
    color: var(--eph-body-color);
}

/* University profile body copy */
.uhub .usec p,
.uhub .usec li {
    font-size: 17px;
    line-height: 1.7;
    color: var(--eph-body-color);
}

/* Content living on dark banners keeps its light text */
.pp-cta-banner p,
.pp-cta-banner li {
    color: #c9d4f2;
}

/* Bold text */
p strong, p b,
li strong, li b,
.pp-content strong, .pp-content b,
.page-content strong, .page-content b,
.single-post-content strong, .single-post-content b,
.entry-content strong, .entry-content b {
    font-weight: 700;
}

/* ---------- 5. Links ---------- */
.page-content a,
.single-post-content a,
.entry-content a,
.pp-content a,
.pp-content li a,
.article-body a,
.about-content a {
    color: var(--eph-link-color);
}

.page-content a:hover,
.single-post-content a:hover,
.entry-content a:hover,
.pp-content a:hover {
    color: #05427c;
}

/* ---------- 6. Compact UI labels that are headings by markup only ---------- */
.pp-toc h3 { font-size: 13px !important; }
.pp-summary-card .pp-sc-head h3 { font-size: 14px !important; }
.pp-newsletter h4 { font-size: 15px !important; }
.pp-check-col h4 { font-size: 13px !important; }
.pp-paper-dl-card h4 { font-size: 14px !important; }
.pp-dl-block .pp-dl-info h4 { font-size: 16px !important; }
.pp-steps > li h4 { font-size: 15.5px !important; }
.site.front-page-home .mini-body h3 { font-size: 15.5px !important; }
.rbox-sm .rb-body h3 { font-size: 17px !important; }
.error-404-title { font-size: 80px !important; }

/* ---------- 7. Template-level heading overrides ---------- */
.uhub h1 { font-size: 34px !important; font-weight: 700 !important; line-height: 1.3 !important; }
.uhub h2 { font-size: 28px !important; font-weight: 600 !important; line-height: 1.3 !important; }
.uhub h3 { font-size: 22px !important; font-weight: 600 !important; line-height: 1.3 !important; }
.uhub h4 { font-size: 19px !important; font-weight: 600 !important; line-height: 1.3 !important; }

.pp-hero h1.pp-post-title,
.pp-ep-hero h1.pp-post-title {
    font-size: 34px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

/* ---------- 8. Responsive sizes ---------- */
@media (max-width: 1024px) {
    h1, .hero-title, .page-title, .pp-post-title, .uhub h1,
    .pp-hero h1.pp-post-title, .pp-ep-hero h1.pp-post-title { font-size: 32px !important; }
    h2, .uhub h2 { font-size: 26px !important; }
    h3, .uhub h3 { font-size: 21px !important; }
    h4, .uhub h4 { font-size: 18px !important; }

    .main-navigation ul li a,
    .site.front-page-home .main-nav a { font-size: 15px !important; }
}

@media (max-width: 768px) {
    html body { font-size: 16px; }

    h1, .hero-title, .page-title, .pp-post-title, .uhub h1,
    .pp-hero h1.pp-post-title, .pp-ep-hero h1.pp-post-title { font-size: 28px !important; }
    h2, .uhub h2 { font-size: 24px !important; }
    h3, .uhub h3 { font-size: 20px !important; }
    h4, .uhub h4 { font-size: 18px !important; }

    .page-content p,
    .single-post-content p,
    .entry-content p,
    .pp-content p,
    .pp-content li,
    .pp-lead,
    .page-content,
    .single-post-content,
    .pp-content { font-size: 16px !important; }
}

@media (max-width: 480px) {
    h1, .hero-title, .page-title, .pp-post-title, .uhub h1,
    .pp-hero h1.pp-post-title, .pp-ep-hero h1.pp-post-title { font-size: 26px !important; }
    h2, .uhub h2 { font-size: 22px !important; }
    h3, .uhub h3 { font-size: 19px !important; }
    h4, .uhub h4 { font-size: 17px !important; }
}
