/*
Theme Name:        PT Sussis
Theme URI:         https://ptsussis.se/
Author:            Christofer Laurin
Author URI:        https://antropomorf.se/
Description:       Custom block theme for PT Sussis, personal training in Rättvik. Requires the Blockstudio and AMRF Site Settings plugins.
Version:           1.0.0
Requires at least: 6.9
Tested up to:      7.1
Requires PHP:      8.3
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       ptsussis-theme
Domain Path:       /languages
Update URI:        false
*/

/* Base resets theme.json can't express. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--nav-bar-height, clamp(4rem, 3vw + 3.5rem, 6.5rem));
	scrollbar-gutter: stable;
}

body {
	margin: 0;
}

/* Footer stays at the bottom of the viewport on a short page instead of
   riding up under the content — .wp-site-blocks is the real parent of
   header/main/footer (WordPress's own template-part wrapper), main is
   the only one of the three allowed to grow. */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* margin-block-end has no theme.json element-spacing equivalent. */
h1,
h2,
h3,
h4,
h5 {
	margin-block-end: 0.5em;
}

h2 {
	text-wrap: balance;
}

h3,
p,
li {
	text-wrap: pretty;
}

h1 strong,
h2 strong,
h3 strong,
h4 strong,
h5 strong,
h6 strong {
	font-weight: inherit;
}

.ptsussis-section h2 {
	margin: 0 0 var(--wp--custom--heading-gap);
}

p strong {
	font-weight: var(--wp--custom--font-weight-strong);
}

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

/* theme.json's link element has no thickness/offset properties. */
a {
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
