/* ==========================================================================
   Million Dots — Shared layout primitives
   The section frame, headings, cards, chips, lists and reveal states that
   every page-section block builds on. Ported from the design's base.css and
   components.css; every value comes from theme.json tokens.
   ========================================================================== */

/* --- Page-edge measure ---------------------------------------------------
   Distance from the viewport edge to the inside of the container gutter.
   Used by sections that break an image out to the left edge.
   ------------------------------------------------------------------------ */
:root {
	--mdc-edge: calc(
		(100vw - min(100vw, var(--wp--custom--layout--container-max))) / 2 +
			var(--wp--custom--layout--gutter)
	);
}

/* --- Section frame -------------------------------------------------------- */
.mdc-section {
	position: relative;
	padding-block: var(--wp--custom--section--padding);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.mdc-section--alt {
	background-color: var(--wp--preset--color--surface-alt);
}

.mdc-section--dark {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--custom--color--ink-invert-soft);
}

.mdc-section--tight {
	padding-block: var(--wp--custom--section--padding-tight);
}

.mdc-container {
	width: 100%;
	max-width: var(--wp--custom--layout--container-max);
	margin-inline: auto;
	padding-inline: var(--wp--custom--layout--gutter);
}

/* --- Headings ------------------------------------------------------------
   Scoped to our blocks so core blocks elsewhere keep their own styles.
   ------------------------------------------------------------------------ */
[class*="mdc-"] h1,
[class*="mdc-"] h2,
[class*="mdc-"] h3,
[class*="mdc-"] h4 {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-weight: var(--wp--custom--weight--semibold);
	letter-spacing: var(--wp--custom--tracking--display);
	line-height: var(--wp--custom--leading--snug);
	text-wrap: balance;
	color: inherit;
}

[class*="mdc-"] h1 {
	font-size: var(--wp--preset--font-size--heading-one);
	font-weight: var(--wp--custom--weight--bold);
	line-height: var(--wp--custom--leading--tight);
}

[class*="mdc-"] h2 {
	font-size: var(--wp--preset--font-size--heading-two);
	font-weight: var(--wp--custom--weight--bold);
}

[class*="mdc-"] h3 {
	font-size: var(--wp--preset--font-size--heading-three);
}

[class*="mdc-"] h4 {
	font-size: var(--wp--preset--font-size--heading-four);
	letter-spacing: var(--wp--custom--tracking--tight);
}

[class*="mdc-"] p {
	text-wrap: pretty;
}

[class*="mdc-"] strong {
	font-weight: var(--wp--custom--weight--semibold);
}

[class*="mdc-"] address {
	font-style: normal;
}

[class*="mdc-"] ul,
[class*="mdc-"] ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

[class*="mdc-"] button {
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
}

[class*="mdc-"] img,
[class*="mdc-"] svg {
	display: block;
	max-width: 100%;
}

[class*="mdc-"] img {
	height: auto;
}

[class*="mdc-"] figure,
[class*="mdc-"] blockquote {
	margin: 0;
}

/* --- Section heads -------------------------------------------------------- */
.mdc-section-head {
	max-width: 62ch;
}

.mdc-section-head p {
	margin: var(--wp--preset--spacing--40) 0 0;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--custom--color--ink-muted);
}

.mdc-section--dark .mdc-section-head p {
	color: var(--wp--custom--color--ink-invert-muted);
}

.mdc-section--dark .mdc-eyebrow {
	color: var(--wp--custom--color--ink-invert-muted);
}

.mdc-eyebrow--center {
	justify-content: center;
	text-align: center;
}

/* --- Focus --------------------------------------------------------------- */
[class*="mdc-"] :focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: var(--wp--custom--radius--xs);
}

.mdc-section--dark :focus-visible,
.mdc-footer :focus-visible {
	outline-color: var(--wp--preset--color--base);
}

/* --- Screen-reader-only text --------------------------------------------- */
.mdc-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --- Reveal on scroll ----------------------------------------------------- */
.mdc-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition:
		opacity var(--wp--custom--duration--reveal) var(--wp--custom--ease--out),
		transform var(--wp--custom--duration--reveal) var(--wp--custom--ease--out);
	transition-delay: var(--mdc-reveal-delay, 0ms);
}

.mdc-reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.mdc-reveal {
		opacity: 1;
		transform: none;
	}
}

/* In the editor nothing scrolls the block into view, so show everything. */
.editor-styles-wrapper .mdc-reveal {
	opacity: 1;
	transform: none;
}

/* --- Arrow link ----------------------------------------------------------- */
.mdc-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--weight--semibold);
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.mdc-link-arrow .mdc-icon {
	width: 1.1em;
	height: 1.1em;
	transition: transform var(--wp--custom--duration--base) var(--wp--custom--ease--out);
}

.mdc-link-arrow:hover .mdc-icon {
	transform: translateX(4px);
}

/* --- Card ----------------------------------------------------------------- */
.mdc-card {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	box-shadow: var(--wp--custom--shadow--sm);
	transition:
		box-shadow var(--wp--custom--duration--base) var(--wp--custom--ease--out),
		transform var(--wp--custom--duration--base) var(--wp--custom--ease--out),
		border-color var(--wp--custom--duration--base) var(--wp--custom--ease--out);
}

.mdc-card--hover:hover {
	box-shadow: var(--wp--custom--shadow--md);
	transform: translateY(-3px);
	border-color: var(--wp--custom--color--border-strong);
}

/* --- Chip ----------------------------------------------------------------- */
.mdc-chip {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--accent-tint);
	color: var(--wp--custom--color--accent-press);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: var(--wp--custom--weight--semibold);
	letter-spacing: 0.02em;
}

.mdc-chip--dark {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.mdc-chip--outline {
	background-color: transparent;
	border-color: var(--wp--custom--color--border-strong);
	color: var(--wp--custom--color--ink-muted);
}

/* --- Tick list ------------------------------------------------------------ */
.mdc-tick-list {
	display: grid;
	gap: var(--wp--preset--spacing--30);
}

.mdc-tick-list li {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--wp--preset--spacing--30);
	align-items: start;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--custom--color--ink-muted);
}

.mdc-tick-list .mdc-icon {
	width: 18px;
	height: 18px;
	margin-top: 4px;
	stroke-width: 2.1;
	color: var(--wp--preset--color--accent);
}

.mdc-section--dark .mdc-tick-list li {
	color: var(--wp--custom--color--ink-invert-muted);
}

/* --- Dark button ---------------------------------------------------------- */
a.mdc-btn.mdc-btn--dark {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

a.mdc-btn.mdc-btn--dark:hover {
	background-color: var(--wp--custom--color--surface-dark-hover);
	color: var(--wp--preset--color--base);
}

/* --- Text selection ------------------------------------------------------- */
::selection {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
}

/* ==========================================================================
   Carousel — shared by the fleet tabs
   ========================================================================== */

.mdc-carousel {
	position: relative;
}

.mdc-carousel__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(268px, 1fr);
	gap: var(--wp--custom--layout--grid-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding-block: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
	scrollbar-width: thin;
	scrollbar-color: var(--wp--custom--color--border-strong) transparent;
}

.mdc-carousel__track > * {
	scroll-snap-align: start;
}

.mdc-carousel__track::-webkit-scrollbar {
	height: 4px;
}

.mdc-carousel__track::-webkit-scrollbar-thumb {
	background-color: var(--wp--custom--color--border-strong);
	border-radius: var(--wp--custom--radius--pill);
}

.mdc-carousel__nav {
	display: flex;
	gap: var(--wp--preset--spacing--20);
}

.mdc-carousel__nav.is-hidden {
	visibility: hidden;
	pointer-events: none;
}

.mdc-carousel__btn {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--wp--custom--color--border-strong);
	border-radius: var(--wp--custom--radius--sm);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	transition:
		background-color var(--wp--custom--duration--fast) var(--wp--custom--ease--out),
		border-color var(--wp--custom--duration--fast) var(--wp--custom--ease--out),
		color var(--wp--custom--duration--fast) var(--wp--custom--ease--out),
		opacity var(--wp--custom--duration--fast) var(--wp--custom--ease--out);
}

.mdc-carousel__btn:hover:not(:disabled) {
	background-color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.mdc-carousel__btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

@media (min-width: 1100px) {
	.mdc-carousel__track {
		grid-auto-columns: minmax(
			0,
			calc((100% - var(--wp--custom--layout--grid-gap) * 2) / 3)
		);
	}
}

/* ==========================================================================
   Tabs — shared by the fleet section
   ========================================================================== */

.mdc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--10);
	padding: var(--wp--preset--spacing--10);
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	box-shadow: var(--wp--custom--shadow--xs);
}

.mdc-tab {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--sm);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--weight--semibold);
	color: var(--wp--custom--color--ink-muted);
	white-space: nowrap;
	transition:
		background-color var(--wp--custom--duration--fast) var(--wp--custom--ease--out),
		color var(--wp--custom--duration--fast) var(--wp--custom--ease--out);
}

.mdc-tab:hover {
	color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--surface-alt);
}

.mdc-tab[aria-selected="true"] {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.mdc-tab__count {
	margin-left: var(--wp--preset--spacing--10);
	font-size: var(--wp--preset--font-size--x-small);
	color: currentColor;
	opacity: 0.6;
}

.mdc-tab-panel[hidden] {
	display: none;
}

/* ==========================================================================
   Mobile action bar — rendered by the footer block
   ========================================================================== */

.mdc-action-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: var(--wp--custom--z-index--sticky);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	background-color: var(--wp--preset--color--border);
	border-top: 1px solid var(--wp--preset--color--border);
	box-shadow: var(--wp--custom--shadow--bar);
	transform: translateY(110%);
	transition: transform var(--wp--custom--duration--base) var(--wp--custom--ease--out);
}

.mdc-action-bar.is-visible {
	transform: none;
}

.mdc-action-bar a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--20);
	background-color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--weight--semibold);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.mdc-action-bar a.is-accent {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
}

@media (min-width: 960px) {
	.mdc-action-bar {
		display: none;
	}
}

/* The bar is fixed, so it is hidden in the editor where nothing scrolls. */
.editor-styles-wrapper .mdc-action-bar {
	display: none;
}
