/* ======================================================
   GLOBAL TYPOGRAPHY SYSTEM
   Legacy Protection Services
====================================================== */

:root {
    /* Font Families */
    --font-primary: 'Open Sans', sans-serif;
    --font-heading: 'Poppins', sans-serif;

    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Type Scale */
    --font-xs: 0.75rem;              /* 12px */
    --font-sm: 0.875rem;             /* 14px */
    --font-base: 1rem;               /* 16px */
    --font-md: 1.0625rem;            /* 17px */
    --font-lg: 1.125rem;             /* 18px */
    --font-xl: 1.25rem;              /* 20px */
    --font-xxl: clamp(1.5rem, 1vw + 1.2rem, 2rem);
    --font-xxxl: clamp(1.9rem, 1.8vw + 1.2rem, 2.75rem);
    --font-display: clamp(2.25rem, 3vw + 1.2rem, 3.5rem);

    /* Line Heights */
    --line-tight: 1.15;
    --line-snug: 1.35;
    --line-normal: 1.65;
    --line-loose: 1.8;

    /* Letter Spacing */
    --letter-spacing-tight: -0.02em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.04em;
}

/* ==========================================
   BASE
========================================== */

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-normal);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   HEADINGS
========================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    color: var(--color-black);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-tight);
}

h1 {
    font-size: var(--font-xxxl);
    line-height: var(--line-tight);
    margin-bottom: 0.6em;
}

h2 {
    font-size: var(--font-xxl);
    line-height: var(--line-tight);
    margin-bottom: 0.65em;
}

h3 {
    font-size: var(--font-xl);
    line-height: var(--line-snug);
    margin-bottom: 0.7em;
}

h4 {
    font-size: var(--font-lg);
    line-height: var(--line-snug);
    margin-bottom: 0.75em;
}

h5 {
    font-size: var(--font-md);
    line-height: 1.45;
    margin-bottom: 0.8em;
}

h6 {
    font-size: var(--font-base);
    line-height: 1.5;
    margin-bottom: 0.85em;
}

/* ==========================================
   BODY TEXT
========================================== */

p {
    margin-top: 0;
    margin-bottom: 1.1em;
    font-size: var(--font-base);
    line-height: var(--line-normal);
}

small {
    font-size: var(--font-sm);
    line-height: 1.5;
}

strong {
    font-weight: var(--font-weight-semibold);
}

em {
    font-style: italic;
}

/* ==========================================
   LINKS
========================================== */

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover,
a:focus {
    color: var(--color-primary);
    text-decoration: none;
}

/* ==========================================
   LISTS
========================================== */

ul,
ol {
    margin-top: 0;
    margin-bottom: 1.25em;
    padding-left: 1.25rem;
}

li {
    margin-bottom: 0.45em;
    line-height: var(--line-normal);
}

/* ==========================================
   MEDIA
========================================== */

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ==========================================
   REUSABLE TYPOGRAPHY PATTERNS
========================================== */

.text-xs {
    font-size: var(--font-xs);
    line-height: 1.5;
}

.text-sm {
    font-size: var(--font-sm);
    line-height: 1.6;
}

.text-body {
    font-size: var(--font-base);
    line-height: var(--line-normal);
}

.text-large {
    font-size: var(--font-md);
    line-height: 1.75;
}

.text-lead {
    font-size: var(--font-lg);
    line-height: 1.75;
}

.eyebrow-text {
    display: inline-block;
    font-size: var(--font-xs);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.display-title {
    font-size: var(--font-display);
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
}

.section-heading {
    font-size: var(--font-xxl);
    line-height: var(--line-tight);
    letter-spacing: var(--letter-spacing-tight);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
}

.section-copy {
    font-size: var(--font-base);
    line-height: var(--line-normal);
}

.compact-copy {
    font-size: var(--font-sm);
    line-height: 1.65;
}

.meta-text {
    font-size: var(--font-xs);
    line-height: 1.5;
    letter-spacing: 0.04em;
}

/* ==========================================
   TEXT COLOR HELPERS
========================================== */

.text-muted {
    color: var(--color-text-light);
}

.text-white {
    color: var(--color-white);
}

/* ==========================================
   RESPONSIVE REFINEMENT
========================================== */

@media (max-width: 767.98px) {
    body {
        font-size: 0.975rem;
    }

    h1 {
        margin-bottom: 0.55em;
    }

    h2 {
        margin-bottom: 0.6em;
    }

    h3,
    h4 {
        line-height: 1.3;
    }

    p {
        margin-bottom: 1em;
    }

    .text-large,
    .text-lead {
        font-size: var(--font-base);
        line-height: var(--line-normal);
    }

    .display-title {
        line-height: 1.08;
    }
}

@media (max-width: 479.98px) {
    .section-heading {
        line-height: 1.18;
    }
}