/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/*** 1. THEME TWEAKS ***/

/* Set the main content area height */
#main {
    min-height: 60vh;
}

/* Primary Menu Button Styles */
@media (min-width: 600px) {
   .main-navigation .main-nav ul li.nav-cta a {
       background: var(--accent) !important;
       color: var(--base-3) !important;
       padding: 1em 1.5em;
       margin-left: 16px;
       border-radius: 6px;
       line-height: 1;
       font-weight: 800;
   }

   .main-navigation .main-nav ul li.nav-cta a:hover {
       background: var(--accent-alt) !important;
       color: var(--base-3) !important;
   }
}

/* No underline from links */
.no-ul, .no-ul a {
    text-decoration: none;
}

/* Text Balance / Pretty */
.balance {
   text-wrap: balance;
}

p, div, blockquote, li {
   text-wrap: pretty;
}

/*** 3. TYPOGRAPHY ***/


:root {
  /* System font stacks for better performance and reliability */
  --headline-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --body-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* Reduced font sizes with maintained proportions */
  --fs-body: clamp(0.875rem, calc(0.84rem + 0.18vw), 1rem);
  --fs-headline-xl: clamp(2.5rem, calc(1.9rem + 3vw), 4rem);
  --fs-headline-h1: clamp(2rem, calc(1.7rem + 1.8vw), 3rem);
  --fs-headline-h2: clamp(1.65rem, calc(1.45rem + 1vw), 2.25rem);
  --fs-headline-h3: clamp(1.35rem, calc(1.25rem + 0.5vw), 1.75rem);
  --fs-headline-h4: clamp(1.15rem, calc(1.1rem + 0.18vw), 1.25rem);
  --fs-headline-h5: clamp(1.1rem, calc(1.05rem + 0.18vw), 1.2rem);
  --fs-headline-h6: clamp(1rem, calc(0.95rem + 0.18vw), 1.15rem);
  --fs-headline-pre: clamp(0.875rem, calc(0.85rem + -0.05vw), 0.9rem);
  --fs-headline-body-xl: clamp(1.15rem, calc(1.05rem + 0.5vw), 1.4rem);
  --fs-headline-body-l: clamp(1rem, calc(0.95rem + 0.3vw), 1.2rem);
  --fs-headline-body-s: clamp(0.8rem, calc(0.78rem + 0.08vw), 0.85rem);
  --fs-headline-body-xs: clamp(0.75rem, calc(0.73rem + -0.01vw), 0.75rem);
  --text-s: clamp(0.8rem, calc(0.78rem + 0.08vw), 0.85rem);
  --text-xs: clamp(0.75rem, calc(0.73rem + -0.01vw), 0.75rem);
}
/* text-s and text-xs are unused I think */

/* Default Body / p font settings */
p, div {
    font-size: var(--fs-body);
    font-weight: 400;
    line-height: 1.5;
    font-family: var(--body-font);
}

p {
    margin-bottom: 1.5rem;
}

/* Default Headings weight, margin, font-family */
h1, h2, h3, h4, h5, h6, .hxl, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
    margin-bottom: .5em;
    font-family: var(--headline-font);
}

/* Heading font-size and line-height */
.hxl {
    font-size: var(--fs-headline-xl);
    line-height: 1.05;
}

h1, .h1 {
    font-size: var(--fs-headline-h1);
    line-height: 1.05;
}

h2, .h2 {
    font-size: var(--fs-headline-h2);
    line-height: 1.1;
}

h3, .h3 {
    font-size: var(--fs-headline-h3);
    line-height: 1.15;
}

h4, .h4 {
    font-size: var(--fs-headline-h4);
    line-height: 1.1;
}

h5, .h5 {
    font-size: var(--fs-headline-h5);
    line-height: 1.25;
}

h6, .h6 {
    font-size: var(--fs-headline-h6);
    line-height: 1.4;
}

.pre {
    font-size: var(--fs-headline-pre);
    text-transform: uppercase;
    letter-spacing: .1em;
}

/* Additional Body font-size */
.body-xl {
    font-family: var(--body-font);
    font-size: var(--fs-headline-body-xl);
}

.body-l {
    font-family: var(--body-font);
    font-size: var(--fs-headline-body-l);
}

.body-s {
    font-family: var(--body-font);
    font-size: var(--fs-headline-body-s);
}

.body-xs {
    font-family: var(--body-font);
    font-size: var(--fs-headline-body-xs);
}


/* Add top margin to blog post H2-H6 */
.single-post :is(h2, h3, h4, h5, h6) {
    margin-top: 1.5em;
 }
 
 /* Button Global Line Height */
 .gb-button {
    line-height: 1em;
 }
 
 /* Remove bottom margin on last paragraph */
 .gb-container p:last-child:last-of-type {
    margin-bottom: 0px;
 }
 
 .block-editor-block-list__layout .gb-container p:nth-last-child(2) {
    margin-bottom: 0px;
 }

 /* -- SECTIONS -- */
.gb-container-section-xs {
	padding: 1rem clamp(1rem, 0.848rem + 0.758vw, 1.5rem) 1rem clamp(1rem, 0.848rem + 0.758vw, 1.5rem);
}