/*
 * A-Star Base: the few styles theme.json can't express.
 */

/* Keyboard focus is always visible. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--brand);
	outline-offset: 2px;
}

.is-style-sign :where(a, button):focus-visible {
	outline-color: var(--wp--preset--color--on-brand);
}

/* Header, page content and footer meet without gaps; each section sets its own padding. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

:where(.wp-block-post-content) > .alignfull {
	margin-block-start: 0;
	margin-block-end: 0;
}

::selection {
	background: var(--wp--preset--color--signal);
	color: var(--wp--preset--color--on-signal);
}

/* Header ------------------------------------------------------------------ */

.astar-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.astar-header__brand {
	gap: 0.75rem;
	min-width: 0;
}

.astar-header__brand .wp-block-site-title {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* A wide logo with the name in it: no Site Title beside it, and it may shrink on small phones. */
.astar-header__wordmark {
	flex: 0 1 auto;
	min-width: 0;
	line-height: 0;
}

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

@media (max-width: 420px) {
	.astar-header__wordmark img {
		width: 196px;
	}
}

/* The page you are on is underlined in the menu. */
.astar-header__nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	box-shadow: inset 0 -3px 0 var(--wp--preset--color--signal);
}

.astar-header__nav .wp-block-navigation-item__content {
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
	font-weight: 600;
}

.astar-header__actions {
	gap: 1.5rem;
}

.astar-header__phone {
	font-size: 1.375rem;
	white-space: nowrap;
}

.astar-header__cta .wp-block-button__link {
	padding: 0.6rem 1.1rem;
	font-size: var(--wp--preset--font-size--medium);
	white-space: nowrap;
}

/* On phones the bottom phone bar does the job of these two. */
@media (max-width: 781px) {
	.astar-header .astar-header__phone,
	.astar-header .wp-block-buttons.astar-header__cta {
		display: none;
	}
}

/* Between phone and wide desktop, keep the menu and drop the header phone. */
@media (min-width: 782px) and (max-width: 1080px) {
	.astar-header__phone {
		display: none;
	}
}

/* Hero: the brand panel with a stripe along the bottom, like the stripe on a work van. */
.astar-hero {
	border-bottom: var(--wp--custom--stripe) solid var(--wp--preset--color--signal);
}

.astar-hero h1 {
	max-width: 18ch;
	text-wrap: balance;
}

.astar-hero--page h1 {
	max-width: 24ch;
	font-size: clamp(2.5rem, 5vw, 3.75rem);
}

.astar-lead {
	max-width: 38rem;
	line-height: 1.45;
}

.astar-hero .astar-hero__phone {
	margin-top: var(--wp--preset--spacing--50);
}

.astar-hero .astar-hero__buttons {
	margin-top: var(--wp--preset--spacing--40);
}

.astar-hero .astar-hero__trust {
	margin-top: var(--wp--preset--spacing--40);
	opacity: 0.9;
}

/* Home page hero with a card beside the text. */
.astar-hero .astar-hero__split {
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60);
}

.astar-hero__split h1 {
	max-width: 16ch;
}

.astar-hero__note {
	opacity: 0.92;
}

/* On the brand panel, the call-to-action button turns white on hover, not dark. */
.is-style-sign .wp-element-button:hover,
.is-style-sign .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--on-brand);
	color: var(--wp--preset--color--brand);
}

/* Second, quieter button: an outline in the colour of the text around it. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	padding: calc(0.8rem - 2px) calc(1.5rem - 2px);
	border: 2px solid currentColor;
}

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):hover,
.is-style-sign .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):hover {
	background-color: transparent;
	color: inherit;
	box-shadow: inset 0 0 0 1px currentColor;
}

/* Coming soon page: the brand panel fills the screen, stripe at the bottom. */
.astar-coming-soon {
	min-height: 100vh;
	min-height: 100svh;
	box-sizing: border-box;
}

.astar-coming-soon__brand {
	gap: 0.75rem;
	margin-bottom: var(--wp--preset--spacing--50);
}

.astar-coming-soon__brand .astar-coming-soon__icon {
	flex: none;
	margin: 0;
	line-height: 0;
}

.astar-coming-soon__brand .astar-coming-soon__icon img {
	border-radius: var(--wp--custom--radius);
}

.astar-coming-soon__brand .wp-block-site-title {
	font-size: clamp(1.625rem, 4vw, 1.9rem);
}

.astar-coming-soon h1 {
	max-width: 14ch;
	text-wrap: balance;
}

.astar-coming-soon .astar-coming-soon__label {
	margin-top: var(--wp--preset--spacing--50);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.astar-coming-soon .astar-coming-soon__label + * {
	margin-top: 0.25rem;
}

.astar-coming-soon .astar-coming-soon__contact {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: clamp(1.5rem, 5vw, 1.9rem);
	line-height: 1.15;
	overflow-wrap: anywhere;
}

/* Sections ------------------------------------------------------------------ */

.astar-intro {
	max-width: 40rem;
	color: var(--wp--preset--color--muted);
}

.is-style-sign .astar-intro {
	color: inherit;
}

.astar-section-body {
	margin-top: var(--wp--preset--spacing--50) !important;
}

.astar-more {
	margin-top: var(--wp--preset--spacing--50) !important;
	font-weight: 600;
}

.astar-quote-columns {
	gap: var(--wp--preset--spacing--60);
}

.astar-quote-section .astar-contact {
	margin-top: var(--wp--preset--spacing--40);
}

.astar-aside > * + * {
	margin-top: 1rem;
}

@media (min-width: 782px) {
	.astar-aside {
		position: sticky;
		top: 1.5rem;
	}
}

.astar-service-layout {
	gap: var(--wp--preset--spacing--60);
}

/* Building blocks ------------------------------------------------------------ */

/* Small capital-letter label, e.g. above a heading or a detail. */
.is-style-label,
.astar-label {
	margin-bottom: 0;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.is-style-label + * {
	margin-top: 0.25rem;
}

/* Smaller, quieter text for notes under the main text. */
.astar-note {
	font-size: 1rem;
	color: var(--wp--preset--color--muted);
}

.is-style-sign .astar-note {
	color: inherit;
}

/* Large price or figure. */
.astar-price {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.9rem;
	line-height: 1;
}

.astar-price--large {
	font-size: 2.25rem;
}

.astar-price small {
	font-size: 1.25rem;
}

/* Card: a white box with a thin line around it. Works on the brand panel too. */
.is-style-card {
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
}

.is-style-card.is-style-card :is(h1, h2, h3, h4, h5, h6, a) {
	color: var(--wp--preset--color--ink);
}

.is-style-card :where(a, button, summary):focus-visible {
	outline-color: var(--wp--preset--color--brand);
}

.is-style-card > * + * {
	margin-top: 0.75rem;
}

/* Line on top: for short points side by side. */
.is-style-topline {
	padding-top: 1rem;
	border-top: 3px solid var(--wp--preset--color--brand);
}

.is-style-topline > * + * {
	margin-top: 0.5rem;
}

/* Ticks: a list, or single boxes, with a round tick in the brand colour. */
ul.is-style-ticks {
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.is-style-ticks > li,
.is-style-tick {
	position: relative;
	padding-left: 2rem;
}

ul.is-style-ticks > li::before,
.is-style-tick::before {
	content: "";
	position: absolute;
	top: 0.2em;
	left: 0;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: var(--wp--preset--color--brand);
}

ul.is-style-ticks > li::after,
.is-style-tick::after {
	content: "";
	position: absolute;
	top: calc(0.2em + 0.24rem);
	left: 0.45rem;
	width: 0.3rem;
	height: 0.6rem;
	border: solid var(--wp--preset--color--on-brand);
	border-width: 0 0.14rem 0.14rem 0;
	transform: rotate(40deg);
}

ul.is-style-ticks > li {
	color: var(--wp--preset--color--muted);
}

ul.is-style-ticks > li strong {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

/* Inside a card, each tick gets a line above it, like rows on a report. */
.is-style-card ul.is-style-ticks > li {
	padding-top: 0.6rem;
	padding-bottom: 0.6rem;
	border-top: 1px solid var(--wp--preset--color--line);
}

.is-style-card ul.is-style-ticks > li::before {
	top: calc(0.6rem + 0.2em);
}

.is-style-card ul.is-style-ticks > li::after {
	top: calc(0.6rem + 0.2em + 0.24rem);
}

.is-style-tick > * + * {
	margin-top: 0.15rem;
}

.is-style-tick :is(h3, h4) {
	font-size: 1.25rem;
}

/* Card heading row: title on the left, a small label on the right. */
.astar-card-head {
	gap: 0.5rem 1rem;
	align-items: baseline;
}

.astar-card-head > * {
	margin: 0;
}

/* Price list table. */
.wp-block-table.is-style-prices {
	margin-top: 0.75rem;
}

.wp-block-table.is-style-prices table {
	border-collapse: collapse;
	text-align: left;
}

.wp-block-table.is-style-prices :is(th, td) {
	padding: 0.75rem 1rem 0.75rem 0;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	vertical-align: top;
	text-align: left;
}

.wp-block-table.is-style-prices thead {
	border-bottom: 0;
}

.wp-block-table.is-style-prices thead th {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--wp--preset--color--ink);
	font-weight: 600;
	vertical-align: bottom;
}

.wp-block-table.is-style-prices tbody td:first-child,
.wp-block-table.is-style-prices tbody td:nth-child(2) {
	font-weight: 600;
}

.wp-block-table.is-style-prices tbody td:nth-child(2) {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.wp-block-table.is-style-prices :is(th, td):last-child {
	padding-right: 0;
}

/* On phones each package becomes its own short block: name, price, then what it includes. */
@media (max-width: 480px) {
	.wp-block-table.is-style-prices thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.wp-block-table.is-style-prices :is(table, tbody, tr, td) {
		display: block;
	}

	.wp-block-table.is-style-prices tbody tr {
		padding: 0.85rem 0;
		border-bottom: 1px solid var(--wp--preset--color--line);
	}

	.wp-block-table.is-style-prices tbody tr:first-child {
		border-top: 2px solid var(--wp--preset--color--ink);
	}

	.wp-block-table.is-style-prices tbody td {
		padding: 0;
		border: 0;
	}

	.wp-block-table.is-style-prices tbody td:first-child {
		font-family: var(--wp--preset--font-family--display);
		font-size: 1.375rem;
		font-weight: 700;
		line-height: 1.2;
	}

	.wp-block-table.is-style-prices tbody td:nth-child(2) {
		margin: 0.15rem 0 0.35rem;
	}
}

/* Price lists on one page line up with each other. */
@media (min-width: 700px) {
	.wp-block-table.is-style-prices th:first-child {
		width: 11rem;
	}

	.wp-block-table.is-style-prices th:nth-child(2) {
		width: 10rem;
	}
}

.astar-faq {
	margin-top: var(--wp--preset--spacing--40) !important;
}

/* Questions that open (FAQ). */
.wp-block-details.is-style-card {
	padding: 1rem 1.25rem;
}

.wp-block-details.is-style-card > summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 1.25rem;
	line-height: 1.25;
}

.wp-block-details.is-style-card > summary + * {
	margin-top: 0.75rem;
}

.wp-block-details.is-style-card > :last-child {
	margin-bottom: 0;
}

/* Sample site pictures: the computer view with the phone view over its corner. */
.astar-shots {
	position: relative;
	padding: 0 4% 6% 0;
}

.astar-shots .wp-block-image {
	margin: 0;
}

.astar-shots .astar-shots__desktop img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius);
}

.astar-shots .astar-shots__phone {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 27%;
}

.astar-shots .astar-shots__phone img {
	display: block;
	width: 100%;
	height: auto;
	border: 3px solid var(--wp--preset--color--ink);
	border-radius: 10px;
	background: var(--wp--preset--color--base);
}

/* A grid of boxes that fits as many columns as there is room for, and one column on phones. */
.astar-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--astar-grid-min, 16rem)), 1fr));
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
}

.astar-grid--cards {
	gap: 1.25rem;
}

.astar-grid--ticks {
	--astar-grid-min: 15rem;
}

.astar-grid--points {
	--astar-grid-min: 13rem;
}

.astar-grid--samples {
	--astar-grid-min: 19rem;
	gap: var(--wp--preset--spacing--50);
}

.astar-grid.astar-grid > * {
	margin: 0;
	min-width: 0;
}

.astar-grid > * > * + * {
	margin-top: 0.75rem;
}

.astar-grid > .is-style-tick > * + * {
	margin-top: 0.15rem;
}

/* Section spacing helpers used by the page layouts. */
.astar-section > * + * {
	margin-top: var(--wp--preset--spacing--50);
}

.astar-section > .wp-block-heading + * {
	margin-top: 0.75rem;
}

.astar-section > .wp-block-heading + .astar-grid {
	margin-top: var(--wp--preset--spacing--40);
}

.astar-split {
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60);
}

.astar-facts > * + * {
	margin-top: 0.75rem;
}

.astar-facts .is-style-label {
	color: var(--wp--preset--color--muted);
}

.astar-facts .is-style-label + p {
	margin-top: 0.1rem;
	font-weight: 600;
}

/* Large email address on the contact page. */
.astar-contact-big {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.6rem;
	line-height: 1.1;
	overflow-wrap: anywhere;
}

/* Soft box for a short reassurance line. */
.astar-softbox {
	padding: 1rem;
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--surface);
}

/* Quiet (secondary) text colour. */
.astar-quiet,
.is-style-tick p,
.is-style-topline p {
	color: var(--wp--preset--color--muted);
}

.is-style-topline :is(h3, h4) {
	font-size: 1.25rem;
}

/* A brand band with the stripe along the bottom (like the hero). */
.astar-band {
	border-bottom: var(--wp--custom--stripe) solid var(--wp--preset--color--signal);
}

.astar-band .astar-lead {
	margin-top: 0.5rem;
}

/* "$84.99/month": the figure large, the rest smaller. */
.astar-price--per {
	font-size: 1.25rem;
}

.astar-price--per strong {
	font-size: 2.25rem;
	font-weight: 700;
}

/* Text that reads best in a narrower column, kept to the left of a wide section. */
.astar-policy,
.astar-faq,
.astar-terms-list {
	max-width: var(--wp--style--global--content-size);
}

.astar-policy > .wp-block-heading {
	margin-top: var(--wp--preset--spacing--50);
}

.astar-policy > .wp-block-heading:first-child {
	margin-top: 0;
}

.astar-policy > .wp-block-heading + * {
	margin-top: 0.75rem;
}

.astar-section > .astar-gap-top {
	margin-top: var(--wp--preset--spacing--60);
}

.astar-section > .wp-block-table + p {
	margin-top: 0.75rem;
}

.astar-terms-list li + li {
	margin-top: 0.25rem;
}

.astar-contact-side > * + * {
	margin-top: 1rem;
}

.astar-contact-side > .is-style-label {
	margin-top: 1.5rem;
}

.astar-contact-side > .is-style-label + * {
	margin-top: 0.25rem;
}

/* Form fields: a border dark enough to see the edge of each box (3:1 against the page). */
.astar-quote :is(input[type="text"], input[type="tel"], input[type="email"], select, textarea) {
	border-color: var(--wp--preset--color--muted);
}

.astar-quote [aria-invalid="true"] {
	border-color: #b42318;
}

/* Footer -------------------------------------------------------------------- */

.astar-footer .wp-block-heading {
	margin-bottom: 0.75rem;
}

.astar-footer__bottom {
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--line);
}

.astar-footer__bottom p {
	margin: 0;
}

.astar-footer .astar-footer__logo {
	margin-bottom: 0.75rem;
	line-height: 0;
}

.astar-footer ul.astar-footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.astar-footer ul.astar-footer__links li + li {
	margin-top: 0.25rem;
}

.astar-footer .astar-footer__email {
	overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition: none !important;
		animation: none !important;
	}
}

/* ---------- Phone menu (the pop-up that opens from the menu button) ---------- */

.astar-menu-brand,
.astar-menu-cta {
	display: none;
}

.astar-header__nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 0;
	border-top: 6px solid var(--wp--preset--color--signal);
	border-bottom: 6px solid var(--wp--preset--color--signal);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
}

.astar-header__nav .is-menu-open .wp-block-navigation__responsive-dialog {
	margin-top: 0;
	padding: 0 var(--wp--preset--spacing--40, 1.25rem) var(--wp--preset--spacing--50, 2rem);
}

.astar-header__nav .is-menu-open .astar-menu-brand {
	display: flex;
	align-items: center;
	min-height: 4.5rem;
	padding: 0.75rem 3.5rem 0.75rem 0;
	border-bottom: 2px solid var(--wp--preset--color--brand);
}

.astar-menu-brand__link {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	color: inherit;
	text-decoration: none;
}

.astar-menu-brand__logo {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 3rem;
}

.astar-menu-brand__name {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.375rem;
	font-weight: 700;
}

.astar-header__nav .is-menu-open .wp-block-navigation__responsive-container-close {
	top: 0.75rem;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border: 2px solid var(--wp--preset--color--brand);
	border-radius: 4px;
	color: var(--wp--preset--color--brand);
}

.astar-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: stretch;
	gap: 0;
	padding-top: 0.5rem;
}

.astar-header__nav .is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
	align-items: stretch;
	gap: 0;
	width: 100%;
}

.astar-header__nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
	align-items: stretch;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.astar-header__nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 1rem 0 1rem 1rem;
	border-left: 4px solid transparent;
	box-shadow: none;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.625rem;
	line-height: 1.2;
	font-weight: 700;
}

.astar-header__nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	border-left-color: var(--wp--preset--color--signal);
	box-shadow: none;
}

.astar-header__nav .is-menu-open .astar-menu-cta {
	display: block;
	margin-top: var(--wp--preset--spacing--50, 2rem);
}

.astar-menu-cta__link {
	display: block;
	text-align: center;
}

/* Small tablets: five menu links don't fit beside a wide logo, so keep the menu button up to 781px. */
@media (min-width: 600px) and (max-width: 781px) {
	.astar-header__nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.astar-header__nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}
