/* ═══════════════════════════════════════════════════════════════
   JOEASIBA.COM — GLOBAL TYPOGRAPHY STANDARDS
   
   This file enforces minimum readable font sizes across ALL pages.
   It overrides Tailwind's text-sm/text-xs classes in content areas
   while preserving small sizes for UI elements (nav, labels, badges).
   
   Load via nav.php so every page gets it automatically.
   Last updated: March 19, 2026
   ═══════════════════════════════════════════════════════════════ */

/* ─── BASE MINIMUMS ─── */

/* All paragraphs in main content: minimum 18px (matches text-lg) */
section p {
    font-size: max(1.125rem, inherit) !important;
    line-height: 1.7 !important;
}

/* All list items in main content: minimum 16px */
section li {
    font-size: max(1rem, inherit) !important;
    line-height: 1.7 !important;
}

/* ─── HEADINGS ─── */

/* h1: minimum 2.5rem on mobile, scales up */
section h1 {
    font-size: max(2.5rem, inherit) !important;
}

/* h2: minimum 2rem on mobile */
section h2 {
    font-size: max(2rem, inherit) !important;
}

/* h3: minimum 1.375rem on mobile (22px) */
section h3 {
    font-size: max(1.375rem, inherit) !important;
}

/* ─── CARD CONTENT ─── */

/* Card descriptions (inside bordered/rounded containers) */
div[class*="rounded-xl"] > div > p,
div[class*="rounded-2xl"] > p,
div[class*="rounded-xl"] > p {
    font-size: max(1.125rem, inherit) !important;
    line-height: 1.7 !important;
}

/* Card titles inside rounded containers */
div[class*="rounded-xl"] h3,
div[class*="rounded-2xl"] h3 {
    font-size: max(1.25rem, inherit) !important;
}

/* Card list items */
div[class*="rounded-xl"] li,
div[class*="rounded-2xl"] li {
    font-size: max(1rem, inherit) !important;
}

/* ─── ECOSYSTEM / GRID CARDS (homepage) ─── */

/* The six-resource grid cards on homepage and similar grid layouts */
div[class*="grid"] > div > p {
    font-size: max(1.05rem, inherit) !important;
    line-height: 1.7 !important;
}

div[class*="grid"] > div > h3,
div[class*="grid"] > a > h3 {
    font-size: max(1.25rem, inherit) !important;
}

/* Gold/accent subtitles in cards */
div[class*="grid"] > div > p[class*="text-[#e8b849]"],
div[class*="grid"] > div > p[class*="e8b849"] {
    font-size: max(1rem, inherit) !important;
}

/* ─── BLOCKQUOTES ─── */

blockquote {
    font-size: max(1.125rem, inherit) !important;
    line-height: 1.7 !important;
}

/* ─── ANCHOR / CTA TEXT ─── */

/* CTA links that look like text links (not buttons) */
section a[class*="text-[#e8b849]"]:not([class*="rounded-full"]):not([class*="rounded-lg"]):not([class*="rounded-xl"]) {
    font-size: max(1rem, inherit) !important;
}

/* ─── TABLET & DESKTOP SCALING ─── */

@media (min-width: 768px) {
    section p {
        font-size: max(1.25rem, inherit) !important;
    }

    section li {
        font-size: max(1.125rem, inherit) !important;
    }

    section h2 {
        font-size: max(2.5rem, inherit) !important;
    }

    section h3 {
        font-size: max(1.5rem, inherit) !important;
    }

    div[class*="rounded-xl"] > div > p,
    div[class*="rounded-2xl"] > p,
    div[class*="rounded-xl"] > p {
        font-size: max(1.25rem, inherit) !important;
    }

    div[class*="grid"] > div > p {
        font-size: max(1.2rem, inherit) !important;
    }

    blockquote {
        font-size: max(1.25rem, inherit) !important;
    }
}

@media (min-width: 1024px) {
    section p {
        font-size: max(1.35rem, inherit) !important;
    }

    section h2 {
        font-size: max(3rem, inherit) !important;
    }
}


/* ═══════════════════════════════════════════════════════════════
   PROTECTED ELEMENTS — These should STAY small.
   The rules above use "section" scoping, so nav and footer
   are already excluded. These overrides are safety nets.
   ═══════════════════════════════════════════════════════════════ */

/* Navigation links stay their own size */
nav p, nav a, nav span, nav li {
    font-size: revert !important;
    line-height: revert !important;
}

/* Footer text stays compact */
footer p, footer a, footer span {
    font-size: revert !important;
    line-height: revert !important;
}

/* Form inputs, buttons keep their own sizing */
input, button, select, textarea, label {
    font-size: revert !important;
    line-height: revert !important;
}

/* Tier number badges, small uppercase tracking labels */
p[class*="tracking-widest"],
p[class*="tracking-wider"],
p[class*="tracking-["],
span[class*="tracking-widest"],
span[class*="tracking-wider"] {
    font-size: revert !important;
    line-height: revert !important;
}

/* Price tags in tier cards */
span[class*="font-bold"][class*="text-[#e8b849]"] {
    font-size: revert !important;
}

/* Tier "best for" subtle hints at bottom of cards */
p[class*="italic"][class*="text-white/30"],
p[class*="italic"][class*="e8b849/60"] {
    font-size: revert !important;
}

/* Copyright and fine print */
p[class*="text-white/30"],
p[class*="text-white/20"] {
    font-size: revert !important;
}

/* Archive search input area */
#archive-search {
    font-size: revert !important;
}

/* Subscribe form message */
#subscribe-message {
    font-size: revert !important;
}
