@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Serif+Malayalam:wght@300;400;600;700&display=swap');

/* 
   Typography System 
   -----------------
   Primary: Inter (for English)
   Malayalam: Noto Serif Malayalam (for Malayalam script)
*/

:root {
    --font-primary: 'Inter', sans-serif;
    --font-malayalam: 'Noto Serif Malayalam', serif;
    --line-height-base: 1.6;
    --line-height-malayalam: 1.8;
}

body {
    font-family: var(--font-primary);
    line-height: var(--line-height-base);
    color: #1e293b;
    /* slate-800 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global fallback - Noto Serif Malayalam handles Malayalam characters gracefully */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
li,
button {
    font-family: 'Inter', 'Noto Serif Malayalam', serif !important;
}

p {
    /* text-align: left !important; */
    /* Ensure all paragraphs are left-aligned as requested */
    word-spacing: 0.02em;
}

span,
li {
    word-spacing: 0.02em;
}

/* Specific class for Malayalam-heavy blocks for refined spacing */
.ml-text,
[lang="ml"] {
    font-family: var(--font-malayalam);
    line-height: var(--line-height-malayalam);
    font-size: 1.05em;
    /* Optical match adjustment */
    letter-spacing: 0.01em;
    display: inline-block;
}

/* Heading Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    /* slate-900 */
    letter-spacing: -0.01em;
}

/* Utility for better typography across the site */
.text-balance {
    text-wrap: balance;
}

.leading-malayalam {
    line-height: var(--line-height-malayalam);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    body {
        font-size: 15px;
    }
}