/* Theme Font Customization */
/* Space Grotesk & Inter Fonts for Twenty Twenty Four */

/* Import fonts directly if needed */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap");

/* CSS Custom Properties for fonts */
:root {
    --font-primary: "Space Grotesk", -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, sans-serif;
    --font-secondary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, sans-serif;

    /* WordPress block editor font variables */
    --wp--preset--font-family--space-grotesk: "Space Grotesk", sans-serif;
    --wp--preset--font-family--inter: "Inter", sans-serif;
}

/* Apply Space Grotesk to all headings */
h1,
h2,
h3,
h4,
h5,
h6,
.wp-block-site-title,
.wp-block-site-title a,
.wp-block-post-title,
.wp-block-heading,
.entry-title,
.site-title,
.wp-block-query-title,
.wp-block-archive-title,
.wp-block-site-tagline {
    font-family: var(--font-primary) !important;
    font-weight: 600;
}

/* Apply Inter to body text and UI elements */
body,
.wp-block-paragraph,
.wp-block-list,
.wp-block-list li,
.wp-block-navigation,
.wp-block-navigation a,
.wp-block-button,
.wp-block-button a,
.wp-block-quote,
.wp-block-pullquote,
.wp-block-verse,
.wp-block-table,
.wp-block-latest-posts,
.wp-block-latest-comments,
.wp-block-search,
.wp-block-tag-cloud,
.wp-block-categories,
.wp-block-archives,
.wp-block-calendar,
.wp-block-rss,
p,
span,
div,
a,
li,
td,
th,
input,
textarea,
select,
button {
    font-family: var(--font-secondary) !important;
}

/* Specific font weights for hierarchy */
h1 {
    font-weight: 700 !important;
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-weight: 600 !important;
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-weight: 500 !important;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h4,
h5,
h6 {
    font-weight: 500 !important;
}

/* Navigation and buttons */
.wp-block-navigation a,
.wp-block-button a {
    font-weight: 500 !important;
    letter-spacing: 0.025em;
}

/* Body text optimization for readability */
body {
    font-weight: 400;
    line-height: 1.6;
}

.wp-block-paragraph {
    font-weight: 400;
    line-height: 1.7;
}

/* Site title styling */
.wp-block-site-title {
    font-weight: 700 !important;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.025em;
}

/* Ensure consistent font loading */
* {
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Override theme's global padding variables for specific page only */
body.page-id-6 {
    --wp--style--root--padding-left: 0px;
    --wp--style--root--padding-right: 0px;
}

/* Additional override for constrained layout - ONLY for homepage */
body.page-id-6 .is-layout-constrained {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Override for has-global-padding class - ONLY for homepage */
body.page-id-6 .has-global-padding {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Remove padding for main content area - ONLY for homepage */
body.page-id-6 .wp-block-post-content.has-global-padding,
body.page-id-6 .wp-block-post-content.is-layout-constrained,
body.page-id-6 .entry-content.wp-block-post-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ensure full width for our custom content - ONLY for homepage */
body.page-id-6 .wp-block-post-content-is-layout-constrained {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
