/*
 Theme Name:   Higher Ground Theme
 Theme URI:    https://higher-ground.org.uk
 Description:  GeneratePress child theme for Higher Ground Allendale
 Author:       Brian Johnson
 Author URI:   https://themustardseed.co.uk
 Template:     generatepress
 Version:      0.1
*/

/*
* CSS variables
*/
:root {
    /* Spacing */
    --space-4xs: clamp(0.65536rem, 0.376vw + 0.535rem, 1.048576rem);
    --space-3xs: clamp(0.8192rem, 0.47vw + 0.669rem, 1.31072rem);
    --space-2xs: clamp(1.024rem, 0.587vw + 0.836rem, 1.6384rem);
    --space-xs: clamp(1.28rem, 0.734vw + 1.045rem, 2.048rem);
    --space-s: clamp(1.6rem, 0.918vw + 1.306rem, 2.56rem);
    --space-m: clamp(2rem, 1.147vw + 1.633rem, 3.2rem);
    --space-l: clamp(2.5rem, 1.434vw + 2.041rem, 4rem);
    --space-xl: clamp(3.125rem, 1.793vw + 2.551rem, 5rem);
    --space-2xl: clamp(3.90625rem, 2.241vw + 3.189rem, 6.25rem);
    --space-3xl: clamp(4.8828125rem, 2.801vw + 3.987rem, 7.8125rem);
    --space-4xl: clamp(6.10351562rem, 3.501vw + 4.983rem, 9.765625rem);
    /* CSS Grid Presets */
    --grid-1: repeat(1, minmax(0, 1fr));
    --grid-2: repeat(2, minmax(0, 1fr));
    --grid-3: repeat(3, minmax(0, 1fr));
    --grid-4: repeat(4, minmax(0, 1fr));
    --grid-5: repeat(5, minmax(0, 1fr));
    --grid-6: repeat(6, minmax(0, 1fr));
    /* Text - based on 1.125 */
    --text-2xs: clamp(1.12rem, 0.136vw + 1.076rem, 1.26rem);
    --text-xs: clamp(1.26rem, 0.153vw + 1.211rem, 1.42rem);
    --text-s: clamp(1.42rem, 0.17vw + 1.368rem, 1.6rem);
    --text-m: clamp(1.6rem, 0.191vw + 1.539rem, 1.8rem);
    --text-l: clamp(1.8rem, 0.22vw + 1.73rem, 2.03rem);
    --text-xl: clamp(2.03rem, 0.239vw + 1.954rem, 2.28rem);
    --text-2xl: clamp(2.28rem, 0.268vw + 2.194rem, 2.56rem);
    --text-3xl: clamp(2.56rem, 0.306vw + 2.462rem, 2.88rem);
    --text-4xl: clamp(2.88rem, 0.344vw + 2.77rem, 3.24rem);
    --text-5xl: clamp(3.24rem, 0.392vw + 3.115rem, 3.65rem);
    --text-6xl: clamp(3.65rem, 0.44vw + 3.509rem, 4.11rem);
    /*--text-7xl: 22rem;*/
    /* Line heights */
    --line-height-2xs: 1;
    --line-height-xs: 1.1;
    --line-height-s: 1.2;
    --line-height-m: 1.3;
    --line-height-l: 1.4;
    --line-height-xl: 1.5;
    /* Gaps - Modified
    --grid-gap: var(--space-m, clamp(2rem, 1.147vw + 1.633rem, 3.2rem));
    --card-gap: var(--grid-gap, var(--space-m));
    --content-gap: var(--space-m, clamp(2rem, 1.147vw + 1.633rem, 3.2rem));
    /* Gaps - originals */
    --container-gap: clamp(4rem, 1.912vw + 3.388rem, 6rem);
    /* Borders and radii */
    --radius-s: 2px;
    --radius-m: 4px;
    --radius-l: 6px;
    --radius-xl: 8px;
    --radius-2xl: 12px;
    --radius-3xl: 16px;
    --radius-4xl: 22px;
    --radius-50: 50%;
    --image-border-radius: var(--radius-3xl);
    --button-border-radius: var(--radius-l);
    /* Default aspect ratios for archives, post grid layouts, single post featured image */
    --grid-aspect-ratio: 3/2;
    --single-aspect-ratio: 3/2;
    /* Experimental Squircle and fallback radii */
    --hg-frame-radius: var(--image-border-radius, var(--radius-3xl, 16px));
    --hg-frame-radius-squircle: 8%;
    --hg-corner-shape: superellipse(2);
    /* Extra spacing to correct some Gutenberg blocks */
    --hg-block-gap: 1em;
    /* Focus shadow width and colour for clickable cards */
    --focus-width: 2px;
    --focus-color: var(--accent-3);
}

/* Highlight customisation (GP Starter) */
.underline mark {
  box-shadow: inset 0 -0.28em 0 0 var(--accent-3);
  /*background: none !important;*/
}

/*Experimental Squircle styling */
.squircle {
    border-radius: var(--hg-frame-radius);
}
@supports (corner-shape: squircle) {
    .squircle {
        border-radius: var(--hg-frame-radius-squircle);
        corner-shape: var(--hg-corner-shape);
    }
}

/*
 * Pie Calendar overrides (draft)
 * Dependent on the heading font in the GP Font Library having its
 * CSS Variable Suffix set to "heading".
 * If the heading font is changed, the suffix on the new font must be changed to
 * "heading" or this CSS will fail.
 */
.piecal-popover__title {
    font-family: var(--gp-font--heading);
    font-weight: 800;
    font-size: inherit;
    line-height: 1.125;
}

/*
* Clickable and focusable cards
*/
.clickable-card {
    position: relative;
    transition: translate 0.3s ease-in-out;
}

.clickable-card:hover,
.clickable-card:focus-within {
    translate: 0 -0.25em;
}

.clickable-card h2 a::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.clickable-card:focus-within {
    box-shadow: 0 0 0 var(--focus-width) var(--focus-color);
}

.clickable-card:focus-within :focus {
    box-shadow: none;
    outline: none;
}

/* Remove underlined links on hover on cards */
.gbp-card__title:is(:hover, :focus) {
    text-decoration: none;
}

/* Add margin below some Gutenberg blocks */
.wp-block-embed,
.wp-block-buttons,
.wp-block-image,
.wp-block-gallery {
    margin-bottom: var(--hg-block-gap);
}

/*
* Add top spacing to new custom header when Admin bar present */
/*.admin-bar .hg-site-header {
    top: var(--wp-admin--admin-bar--height, 1000px);
}*/
