:root {
    --primary-background: #fbfbfe;
    --primary-text: #110f24;
    --secondary-background: #ffffff;
    --secondary-text: #4b4869;
    --accent-background: #6d28d9;
    --accent-text: #ffffff;
    --muted-purple-background: #f5f3ff;
    --border-color: #e9e3ff;
    --focus-ring-color: #a78bfa;
    --font-family-sans: 'Plus Jakarta Sans', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-sans);
    background-color: var(--primary-background);
    color: var(--primary-text);
    line-height: 1.7;
}

a,
a:hover,
a:focus {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-sans);
    font-weight: 700;
    line-height: 1.3;
}

ul,
ol {
    padding: 0;
    margin: 0;
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    h1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    h3 {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }

    h4 {
        font-size: clamp(1.1rem, 4vw, 1.25rem);
    }

    p,
    span,
    a,
    li,
    input,
    textarea,
    button {
        font-size: 0.95rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* ===== header ===== */
body {
    font-family: var(--font-family-sans);
    background-color: var(--primary-background);
    color: var(--primary-text);
}

/* ===== hero ===== */
#hero {
    font-family: var(--font-family-sans);
    overflow-x: hidden;
}

#hero h1 {
    line-height: 1.2;
    hyphens: auto;
}

#hero h2 {
    line-height: 1.3;
    hyphens: auto;
}

/* ===== featured_article ===== */
.hyphens-auto {
    hyphens: auto;
}

/* ===== articles_grid ===== */
#articles-grid {
    overflow-x: hidden;
}

.js-article-card {
    word-break: break-word;
    hyphens: auto;
}

/* ===== popular_posts ===== */
#popular-posts {
    background-color: var(--primary-background);
    font-family: var(--font-family-sans);
}

.popular-posts-card {
    background-color: var(--secondary-background);
    border-color: var(--border-color);
}

.popular-posts-quote-box {
    background-color: var(--muted-purple-background);
    border-left-color: var(--accent-background);
}

.popular-posts-btn {
    background-color: var(--accent-background);
    color: var(--accent-text);
}

.popular-posts-btn:hover {
    background-color: var(--focus-ring-color);
}

/* ===== sidebar_tags ===== */
.active-tag {
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.15);
    border-color: transparent !important;
}

.js-insight-card {
    will-change: transform, opacity;
}

/* ===== team_blog ===== */
#team-blog {
    hyphens: auto;
}

#author-modal {
    transition: opacity 0.25s ease-out;
}

#author-modal.flex {
    display: flex !important;
}

/* ===== contact_form ===== */
#contact-form {
    --primary-background: #fbfbfe;
    --primary-text: #110f24;
    --secondary-background: #ffffff;
    --secondary-text: #4b4869;
    --accent-background: #6d28d9;
    --accent-text: #ffffff;
    --muted-purple-background: #f5f3ff;
    --border-color: #e9e3ff;
    --focus-ring-color: #a78bfa;
    --font-family-sans: 'Plus Jakarta Sans', sans-serif;
    font-family: var(--font-family-sans);
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: #a1a1aa;
}

#contact-form .form-input:focus {
    border-color: var(--focus-ring-color);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25);
}

#contact-form .form-input.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* ===== footer ===== */
html {
    scroll-behavior: smooth;
}

.footer-policies a {
    color: #4b4869;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.footer-policies a:hover {
    color: #6d28d9;
}