/*
 * Capnis global typography — single source for frontend (public site).
 * Load after main.css + capnis-overrides.css.
 * Fonts: Inter (body/UI), Poppins (headings). stack: Stripe/Linear-style SaaS feel.
 */

:root {
    --capnis-font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    --capnis-font-display: "Poppins", "Inter", system-ui, -apple-system, sans-serif;

    --capnis-text-base: clamp(1rem, 0.12vw + 0.94rem, 1.125rem);
    --capnis-text-sm: 0.875rem;
    --capnis-leading-normal: 1.65;

    /*
     Remap Theme_Pure template font tokens → Inter + Poppins (no stray display faces).
    */
    --tp-ff-body: var(--capnis-font-sans);
    --tp-ff-p: var(--capnis-font-sans);
    --tp-ff-inter: var(--capnis-font-sans);
    --tp-ff-heading: var(--capnis-font-display);
    --tp-ff-poppins: var(--capnis-font-display);
    --tp-ff-onest: var(--capnis-font-display);
    --tp-ff-teko: var(--capnis-font-display);
    --tp-ff-grotesk: var(--capnis-font-display);
    --tp-ff-besley: var(--capnis-font-display);
    --tp-ff-mango-thin: var(--capnis-font-display);
    --tp-ff-mango-light: var(--capnis-font-display);
    --tp-ff-mango: var(--capnis-font-display);
    --tp-ff-mango-medium: var(--capnis-font-display);
    --tp-ff-mango-semibold: var(--capnis-font-display);
    --tp-ff-mango-bold: var(--capnis-font-display);
    --tp-ff-clash-light: var(--capnis-font-display);
    --tp-ff-clash-regular: var(--capnis-font-display);
    --tp-ff-clash-medium: var(--capnis-font-display);
    --tp-ff-clash-semibold: var(--capnis-font-display);
    --tp-ff-clash-bold: var(--capnis-font-display);
    --tp-ff-platform: var(--capnis-font-display);
    --tp-ff-playfair: var(--capnis-font-display);
    --tp-ff-satisfy: var(--capnis-font-display);
    --tp-ff-dirtyline: var(--capnis-font-display);
    --tp-ff-phudu: var(--capnis-font-display);

    /*
    Preserve icon stack — keep theme/font-awesome.css expectations.
    */
    --tp-ff-fontawesome: "Font Awesome 6 Pro";
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

body.tp-magic-cursor {
    font-family: var(--capnis-font-sans);
    font-size: var(--capnis-text-base);
    line-height: var(--capnis-leading-normal);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Semantic scale — rem-based, clamped on small viewports */
body.tp-magic-cursor h1,
body.tp-magic-cursor .h1 {
    font-family: var(--capnis-font-display);
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.12;
    font-size: clamp(2.5rem, 4.2vw + 1rem, 3rem);
}

body.tp-magic-cursor h2,
body.tp-magic-cursor .h2 {
    font-family: var(--capnis-font-display);
    font-weight: 600;
    letter-spacing: -0.018em;
    line-height: 1.18;
    font-size: clamp(2rem, 2.8vw + 1rem, 2.5rem);
}

body.tp-magic-cursor h3,
body.tp-magic-cursor .h3 {
    font-family: var(--capnis-font-display);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.22;
    font-size: clamp(1.5rem, 1.5vw + 1rem, 1.75rem);
}

body.tp-magic-cursor h4,
body.tp-magic-cursor .h4 {
    font-family: var(--capnis-font-display);
    font-weight: 600;
    letter-spacing: -0.012em;
    line-height: 1.28;
    font-size: clamp(1.25rem, 1.1vw + 0.92rem, 1.5rem);
}

body.tp-magic-cursor h5,
body.tp-magic-cursor .h5 {
    font-family: var(--capnis-font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
    font-size: clamp(1.0625rem, 0.4vw + 0.95rem, 1.25rem);
}

body.tp-magic-cursor h6,
body.tp-magic-cursor .h6 {
    font-family: var(--capnis-font-display);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.4;
    font-size: clamp(1rem, 0.2vw + 0.93rem, 1.0625rem);
}

body.tp-magic-cursor p {
    font-family: var(--capnis-font-sans);
    font-size: var(--capnis-text-base);
    line-height: var(--capnis-leading-normal);
    letter-spacing: 0.015em;
    font-weight: 400;
}

small,
body.tp-magic-cursor small,
body.tp-magic-cursor .small {
    font-size: var(--capnis-text-sm);
    line-height: 1.5;
}

/* UI chrome inherits Inter */
body.tp-magic-cursor .tp-header-menu nav a,
body.tp-magic-cursor .tp-main-menu-mobile a,
body.tp-magic-cursor .tp-btn-black .tp-btn-black-text,
body.tp-magic-cursor input:not([type="checkbox"]):not([type="radio"]),
body.tp-magic-cursor textarea,
body.tp-magic-cursor select,
body.tp-magic-cursor .form-control,
body.tp-magic-cursor .modal-body,
body.tp-magic-cursor table {
    font-family: var(--capnis-font-sans);
}

/* Decorative theme titles that are not semantic h* */
body.tp-magic-cursor .tp-section-title,
body.tp-magic-cursor .tp-section-title-fs-anim,
body.tp-magic-cursor .tp-char-animation {
    font-family: var(--capnis-font-display);
    letter-spacing: -0.02em;
}
