/*
 * Base: the design system's token names mapped onto theme.json presets, so
 * every component rule below reads like the design system it came from.
 * Element defaults, focus, buttons and the small text styles.
 */

:root {

	/* Palette */
	--black: var(--wp--preset--color--black);
	--ink-1: var(--wp--preset--color--ink-1);
	--ink-2: var(--wp--preset--color--ink-2);
	--ink-3: var(--wp--preset--color--ink-3);
	--ink-4: var(--wp--preset--color--ink-4);
	--line-1: var(--wp--preset--color--line-1);
	--line-2: var(--wp--preset--color--line-2);
	--grey-100: var(--wp--preset--color--grey-100);
	--grey-300: var(--wp--preset--color--grey-300);
	--grey-500: var(--wp--preset--color--grey-500);
	--grey-600: var(--wp--preset--color--grey-600);
	--white: var(--wp--preset--color--white);
	--blue-700: var(--wp--preset--color--blue-700);
	--blue-800: var(--wp--preset--color--blue-800);
	--sky-200: var(--wp--preset--color--sky-200);
	--sky-400: var(--wp--preset--color--sky-400);
	--star-gold: var(--wp--preset--color--star-gold);

	/* Semantic */
	--brand-accent: var(--sky-200);
	--brand-ink: var(--sky-200);
	--text-body: var(--grey-100);
	--text-heading: var(--white);
	--text-muted: var(--grey-500);
	--text-legal: var(--grey-600);
	--text-on-tint: var(--sky-200);
	--surface-page: var(--black);
	--surface-muted: var(--ink-1);
	--surface-card: var(--ink-2);
	--surface-deep: var(--ink-3);
	--surface-brand: var(--blue-700);
	--surface-brand-deep: var(--blue-800);
	--surface-tint: var(--blue-800);
	--border-default: var(--line-1);
	--border-strong: var(--line-2);
	--border-on-tint: rgba(189, 238, 255, 0.22);

	/* Type */
	--font-sans: var(--wp--preset--font-family--poppins);
	--fs-h1: var(--wp--preset--font-size--h-1);
	--fs-h2: var(--wp--preset--font-size--h-2);
	--fs-h3: var(--wp--preset--font-size--h-3);
	--fs-h4: var(--wp--preset--font-size--h-4);
	--fs-lead: var(--wp--preset--font-size--lead);
	--fs-body: var(--wp--preset--font-size--body);
	--fs-small: var(--wp--preset--font-size--body-small);
	--fs-caption: var(--wp--preset--font-size--caption);
	--fs-legal: var(--wp--preset--font-size--legal);
	--fs-numeral: var(--wp--preset--font-size--numeral);

	/* Space and layout */
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 20px;
	--space-6: 24px;
	--space-8: 32px;
	--space-10: 40px;
	--space-12: 48px;
	--space-16: 64px;
	--space-section: var(--wp--preset--spacing--section);
	--container-max: var(--wp--custom--container--max);
	--container-narrow: var(--wp--custom--container--narrow);
	--gutter: var(--wp--custom--container--gutter);
	--pm-fade: clamp(64px, 9vw, 140px);
	--header-h: 88px;
	--header-h-compact: 62px;
	--sticky-bar-h: 0px;

	/* Motion */
	--ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
	--ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
	--ease-sash: cubic-bezier(0.76, 0, 0.24, 1);
	--ease-door: cubic-bezier(0.6, 0.02, 0.28, 1);
	--ease-curtain: cubic-bezier(0.22, 0.61, 0.36, 1);
	--dur-1: 150ms;
	--dur-2: 260ms;
	--dur-3: 420ms;
	--dur-4: 520ms;
	--dur-sash: 1100ms;

	/* The logo's fanlight, drawn from its measured geometry, as a mask. */
	--fanlight-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 313.6 154.8'%3E%3Cdefs%3E%3Cmask id='m' maskUnits='userSpaceOnUse' x='0' y='0' width='313.6' height='154.8'%3E%3Ccircle fill='%23fff' cx='156.8' cy='156.8' r='156.8'/%3E%3Ccircle fill='%23000' cx='156.8' cy='156.8' r='66.4'/%3E%3Crect fill='%23000' x='222.2' y='152.1' width='100.4' height='9.4' transform='rotate(-45 156.8 156.8)'/%3E%3Crect fill='%23000' x='222.2' y='152.1' width='100.4' height='9.4' transform='rotate(-90 156.8 156.8)'/%3E%3Crect fill='%23000' x='222.2' y='152.1' width='100.4' height='9.4' transform='rotate(-135 156.8 156.8)'/%3E%3Ccircle fill='%23fff' cx='156.8' cy='156.8' r='57.4'/%3E%3C/mask%3E%3C/defs%3E%3Crect width='313.6' height='154.8' fill='%23fff' mask='url(%23m)'/%3E%3C/svg%3E");

	color-scheme: dark;
}

html {
	scroll-padding-top: calc(var(--header-h-compact) + 24px);
	scroll-padding-bottom: calc(var(--sticky-bar-h) + 16px);
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizelegibility;
	overflow-x: clip;
}

/* Flush by default, with no specificity, so the layout's block gap spaces
   text wherever it sits in a flow layout. */
:where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) {
	margin: 0;
}

:where(h1, h2, h3, h4, h5, h6) {
	text-wrap: balance;
}

:where(p, li) {
	text-wrap: pretty;
}

:where(a) {
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	transition: color var(--dur-1) var(--ease-out);
}

::selection {
	background: var(--sky-200);
	color: var(--black);
}

:focus-visible {
	outline: 2px solid var(--sky-400);
	outline-offset: 3px;
}

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

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	overflow-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
	clip-path: none;
	height: auto;
	width: auto;
	left: 12px;
	top: 12px;
	padding: 12px 18px;
	z-index: 100000;
	background: var(--sky-200);
	color: var(--black);
	font-weight: 600;
}

/* Decorative layers are added as the first children of some blocks; the
   first real child still starts flush, as it would without them. */
:where(.pm-layers, .pm-hero__light, .pm-hero__frame, .pm-hero__transom, .pm-header__day, .pm-header__line, .pm-header__progress, .pm-footer__light, .pm-fanlight) + * {
	margin-block-start: 0 !important;
}

/* ---------- Small text styles ---------- */

.is-style-lead {
	font-size: var(--fs-lead);
	line-height: 1.5;
}

.is-style-caption {
	font-size: var(--fs-caption);
	color: var(--text-muted);
}

.is-style-badge,
.is-style-badge-outline {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	width: fit-content;
	margin: 0;
	padding: 7px 11px;
	border: 1px solid var(--blue-800);
	background: var(--blue-800);
	color: var(--sky-200);
	font-size: var(--fs-caption);
	font-weight: 600;
	line-height: 1.1;
}

.is-style-badge-outline {
	background: transparent;
	border-color: var(--sky-200);
}

:where(.is-style-section-tint, .is-style-section-brand) .is-style-badge {
	background: var(--blue-700);
	border-color: var(--blue-700);
	color: var(--white);
}

/* ---------- Buttons ---------- */

.wp-block-buttons {
	gap: var(--space-3);
}

.wp-block-button__link,
.wp-element-button {
	position: relative;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-3);
	min-height: 50px;
	padding: 0 22px;
	border-radius: 0;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color var(--dur-2) var(--ease-out),
		color var(--dur-2) var(--ease-out),
		border-color var(--dur-2) var(--ease-out);
}

/* A band of light crosses the glass on hover, once. */
.wp-block-button__link::before,
.wp-element-button::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
	background-size: 260% 100%;
	background-repeat: no-repeat;
	background-position: -140% 0;
	opacity: 0;
}

.wp-block-button__link:hover::before,
.wp-element-button:hover::before {
	opacity: 1;
	animation: pm-glint 700ms var(--ease-out) both;
}

/* And light passes across it as it moves through the screen (not on touch
   screens: each glint is a layer several times the button's width). */
@supports (animation-timeline: view()) {

	@media (hover: hover) and (pointer: fine) {

		.wp-block-button__link::after {
			content: "";
			position: absolute;
			top: 0;
			bottom: 0;
			left: 0;
			width: 340%;
			pointer-events: none;
			background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.38) 50%, transparent 58%);
			animation: pm-edge linear both;
			animation-timeline: view();
		}

		.is-style-secondary .wp-block-button__link::after,
		.is-style-text .wp-block-button__link::after {
			background-image: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.14) 50%, transparent 58%);
		}
	}
}

.wp-block-button.is-style-secondary .wp-block-button__link,
.wp-element-button.is-style-secondary {
	background: transparent;
	color: var(--white);
	border-color: rgba(255, 255, 255, 0.5);
}

.wp-block-button.is-style-secondary .wp-block-button__link:hover,
.wp-block-button.is-style-secondary .wp-block-button__link:focus-visible,
.wp-element-button.is-style-secondary:hover {
	background: var(--sky-200);
	color: var(--black);
	border-color: var(--sky-200);
}

.wp-block-button.is-style-text .wp-block-button__link {
	min-height: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--sky-200);
	font-size: var(--fs-caption);
	font-weight: 600;
	overflow: visible;
}

.wp-block-button.is-style-text .wp-block-button__link::before,
.wp-block-button.is-style-text .wp-block-button__link::after {
	display: none;
}

.wp-block-button.is-style-text .wp-block-button__link:hover {
	color: var(--white);
	background: none;
}

.pm-btn-sm .wp-block-button__link,
.wp-block-button.pm-btn-sm .wp-block-button__link {
	min-height: 42px;
	padding: 0 16px;
}

.pm-btn-full .wp-block-button,
.pm-btn-full .wp-block-button__link {
	width: 100%;
}

@media (max-width: 480px) {

	.wp-block-buttons:not(.pm-btn-inline) > .wp-block-button {
		flex: 1 1 100%;
	}

	.wp-block-buttons:not(.pm-btn-inline) > .wp-block-button .wp-block-button__link {
		width: 100%;
	}
}

/* Separators are hairlines. */
.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--border-default);
	opacity: 1;
}

/* Lists: plain bullets in sky. */
.wp-block-list li::marker {
	color: var(--sky-200);
}

.wp-block-list li + li {
	margin-top: 6px;
}

/* Tables */
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table :where(td, th) {
	border: 1px solid var(--border-default);
	padding: 10px 12px;
}
