/*
 * SkyWanted: content styles. Loaded on the front end and inside the block
 * editor, so pages look the same while they are being edited.
 */

:root {
	--sw-ink: #0a1d38;
	--sw-navy: #04356b;
	--sw-orange: #f97a16;
	--sw-orange-dark: #c75a06;
	--sw-text: #16233a;
	--sw-muted: #51607a;
	--sw-line: #e2e7ef;
	--sw-mist: #f3f6fa;
	--sw-display: "Source Serif 4", Georgia, "Times New Roman", serif;
	--sw-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--sw-gutter: clamp(20px, 4vw, 40px);
	--sw-section: clamp(64px, 8vw, 112px);
	--sw-radius-lg: 24px;
	--sw-radius: 18px;
	--sw-radius-sm: 10px;
	--sw-shadow: 0 1px 2px rgba(10, 29, 56, 0.06), 0 12px 32px rgba(10, 29, 56, 0.08);
	--sw-shadow-lift: 0 2px 4px rgba(10, 29, 56, 0.06), 0 24px 48px rgba(10, 29, 56, 0.14);
}

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

.sw-section {
	padding: var(--sw-section) var(--sw-gutter);
	margin-block: 0;
}

.sw-inner > :first-child {
	margin-top: 0;
}

.sw-inner > :last-child {
	margin-bottom: 0;
}

.sw-section--mist {
	background: var(--sw-mist);
}

.sw-section h2 {
	max-width: 22em;
	text-wrap: balance;
}

.sw-lead {
	font-size: 1.25rem;
	line-height: 1.55;
	color: var(--sw-text);
}

.sw-eyebrow {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sw-orange-dark);
	margin-bottom: 1rem;
}

.sw-eyebrow--after::after {
	content: "";
	flex: none;
	width: 34px;
	height: 2px;
	border-radius: 2px;
	background: var(--sw-orange);
}

.sw-rule::before {
	content: "";
	display: block;
	width: 36px;
	height: 3px;
	margin-bottom: 1.1rem;
	border-radius: 3px;
	background: var(--sw-orange);
}

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

.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.wp-block-button__link,
.wp-element-button {
	display: inline-block;
	padding: 0.95rem 1.5rem;
	font-family: var(--sw-body);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	color: #fff;
	background: var(--sw-orange);
	border: 1px solid var(--sw-orange);
	text-decoration: none;
	cursor: pointer;
	border-radius: var(--sw-radius-sm);
	transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
	color: #fff;
	background: var(--sw-orange-dark);
	border-color: var(--sw-orange-dark);
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(249, 122, 22, 0.25);
}

.wp-block-button__link::after,
.sw-arrow::after {
	content: "\2192";
	display: inline-block;
	margin-left: 0.75em;
	font-family: var(--sw-body);
	transition: transform 0.2s;
}

.wp-block-button__link:hover::after,
.sw-arrow:hover::after {
	transform: translateX(4px);
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 1px solid var(--sw-ink);
	color: var(--sw-ink);
	padding: 0.95rem 1.5rem;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--sw-ink);
	color: #fff;
	box-shadow: none;
}

.wp-block-button.is-style-outline-light > .wp-block-button__link {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.7);
	color: #fff;
}

.wp-block-button.is-style-outline-light > .wp-block-button__link:hover {
	background: #fff;
	border-color: #fff;
	color: var(--sw-ink);
	box-shadow: none;
}

.wp-block-buttons {
	gap: 14px;
	margin-top: 2rem;
}

/* Hero: inset panel with rounded corners ---------------------------------- */

.sw-hero.wp-block-cover {
	position: relative;
	/* Own stacking context: photo, overlay and text always paint in this order. */
	isolation: isolate;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	min-height: clamp(500px, 72vh, 680px);
	margin: clamp(8px, 1.2vw, 16px) clamp(8px, 1.2vw, 16px) 0;
	padding: clamp(56px, 8vw, 104px) var(--sw-gutter);
	border-radius: var(--sw-radius-lg);
	overflow: hidden;
	justify-content: flex-start;
}

.sw-hero > .wp-block-cover__image-background {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

.sw-hero > .wp-block-cover__background {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Zero specificity, so the overlay colour and strength chosen in the editor win. */
:where(.sw-hero) > :where(.wp-block-cover__background) {
	background-color: #0a1d38;
	opacity: 0.3;
}

.sw-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(90deg, rgba(10, 29, 56, 0.92) 0%, rgba(10, 29, 56, 0.72) 45%, rgba(10, 29, 56, 0.15) 85%);
	pointer-events: none;
}

.sw-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--wp--style--global--content-size, 1240px);
	margin-inline: auto;
	color: #fff;
}

.sw-hero .wp-block-cover__inner-container > * {
	max-width: 40rem;
	margin-inline: 0;
}

.sw-hero h1 {
	color: #fff;
	margin-block: 0 1.25rem;
}

.sw-hero .sw-eyebrow {
	color: #ffb27a;
}

.sw-hero .sw-lead {
	color: #e3e9f2;
}

/* Text left, rounded photo right: used by every block with a photo --------- */

.sw-split {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: clamp(32px, 6vw, 88px);
	align-items: center;
}

.sw-split--top {
	align-items: start;
}

.sw-split > *,
.sw-split__text > :first-child {
	margin-top: 0;
}

.sw-split > * {
	margin-bottom: 0;
}

.sw-split__text > :last-child {
	margin-bottom: 0;
}

.sw-split__text p:not(.sw-eyebrow):not(.sw-lead) {
	color: var(--sw-muted);
}

.sw-photo {
	margin: 0;
	border-radius: var(--sw-radius-lg);
	overflow: hidden;
	box-shadow: var(--sw-shadow);
}

.sw-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* Page heading ------------------------------------------------------------ */

.sw-pagehead {
	padding-block: clamp(48px, 7vw, 96px);
	background: linear-gradient(180deg, var(--sw-mist) 0%, #fff 100%);
}

.sw-pagehead h1 {
	font-size: clamp(2.125rem, 4.4vw, 3.375rem);
	margin-block: 0 1.25rem;
	text-wrap: balance;
}

.sw-pagehead--plain h1 {
	margin-bottom: 0;
}

/* A heading-only band (Contact) sits close to the content below it. */
.sw-pagehead--plain {
	padding-bottom: clamp(24px, 3vw, 40px);
}

.sw-pagehead--plain + .sw-section {
	padding-top: clamp(32px, 4vw, 56px);
}

.sw-pagehead .sw-lead + p {
	margin-top: 1rem;
}

/* Service cards (homepage and Services page) ------------------------------ */

.sw-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(20px, 2.5vw, 32px);
	margin-top: 2.5rem;
}

.sw-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--sw-line);
	border-radius: var(--sw-radius);
	overflow: hidden;
	box-shadow: var(--sw-shadow);
	transition: transform 0.3s, box-shadow 0.3s;
}

.sw-card__media {
	overflow: hidden;
}

.sw-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform 0.6s;
}

.sw-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: clamp(24px, 3vw, 36px);
}

.sw-card__body h3 {
	margin: 0;
	font-size: clamp(1.375rem, 2vw, 1.75rem);
}

.sw-card__body p {
	margin: 12px 0 0;
	color: var(--sw-muted);
}

.sw-card__link {
	align-self: flex-start;
	margin-top: auto;
	padding-top: 24px;
	font-weight: 600;
	color: var(--sw-ink);
	text-decoration: none;
}

.sw-card__link::after {
	content: " \2192";
	color: var(--sw-orange-dark);
	transition: margin 0.2s;
}

.sw-card:hover .sw-card__link::after {
	margin-left: 4px;
}

/* Service page content groups --------------------------------------------- */

.sw-boxes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(20px, 2.5vw, 32px);
}

.sw-boxes > * {
	margin: 0;
}

.sw-box {
	padding: clamp(28px, 3.5vw, 44px);
	background: #fff;
	border: 1px solid var(--sw-line);
	border-radius: var(--sw-radius);
	box-shadow: var(--sw-shadow);
}

.sw-box > * {
	margin-block: 0;
}

.sw-box > h2 {
	font-size: clamp(1.375rem, 2vw, 1.75rem);
}

.sw-box > p {
	margin-top: 12px;
	color: var(--sw-muted);
}

.sw-box > .sw-checklist {
	margin-top: 20px;
}

/* Highlighted group (Landing Gear, Aviation Know-How): full width, dark. */
.sw-box--featured {
	grid-column: 1 / -1;
	background: radial-gradient(120% 160% at 100% 0%, #123a66 0%, var(--sw-ink) 60%);
	border-color: transparent;
	color: #d6deea;
}

.sw-box--featured > h2 {
	color: #fff;
}

.sw-box--featured > p {
	max-width: 52rem;
	color: #c9d3e2;
}

.sw-box--featured .sw-checklist {
	columns: 2;
	column-gap: 48px;
}

.sw-box--featured .sw-checklist li {
	border-color: rgba(255, 255, 255, 0.14);
	break-inside: avoid;
}

/* Lists ------------------------------------------------------------------- */

.sw-checklist {
	list-style: none;
	padding: 0;
	margin-block: 0;
}

.sw-checklist li {
	position: relative;
	padding: 10px 0 10px 28px;
	margin: 0;
	border-bottom: 1px solid var(--sw-line);
}

.sw-checklist li:last-child {
	border-bottom: 0;
}

.sw-checklist li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 1.15em;
	width: 12px;
	height: 6px;
	border: solid var(--sw-orange);
	border-width: 0 0 2px 2px;
	transform: rotate(-45deg);
}

.sw-checklist--boxed {
	max-width: 46rem;
	padding: clamp(24px, 3vw, 36px);
	background: #fff;
	border: 1px solid var(--sw-line);
	border-radius: var(--sw-radius);
	box-shadow: var(--sw-shadow);
}

/* Closing call to action: rounded dark panel ------------------------------ */

.sw-cta__panel {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) auto;
	gap: 28px 56px;
	align-items: center;
	padding: clamp(36px, 5vw, 64px);
	border-radius: var(--sw-radius-lg);
	background: radial-gradient(120% 180% at 100% 0%, #15457a 0%, var(--sw-ink) 62%);
	color: #d6deea;
}

.sw-cta__panel > * {
	margin: 0;
}

.sw-cta__text > * {
	margin-block: 0;
}

.sw-cta__text h2 {
	color: #fff;
}

.sw-cta__text p {
	margin-top: 0.9rem;
	max-width: 40em;
}

.sw-cta__panel .wp-block-buttons {
	margin-top: 0;
	justify-content: flex-end;
}

/* Registered entities, contact page, network block ------------------------ */

.sw-entities h2,
.sw-contact__aside h2 {
	font-size: 1.375rem;
	margin: 0 0 16px;
}

.sw-entities__list {
	display: grid;
	gap: 16px;
}

.sw-entity {
	padding: 22px 24px;
	background: var(--sw-mist);
	border-radius: var(--sw-radius);
}

.sw-entity > * {
	margin: 0;
}

.sw-entity .sw-entity__label {
	margin-bottom: 6px;
	font-family: var(--sw-body);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--sw-orange-dark);
}

/* Entity cards: a large, faded flag fills the right side of the card. */
.sw-entity {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.sw-entity > :not(.sw-entity__flag) {
	position: relative;
	z-index: 1;
}

.sw-entity__flag {
	position: absolute;
	inset: 0 0 0 auto;
	width: 45%;
	z-index: 0;
	opacity: 0.35;
	-webkit-mask-image: linear-gradient(to right, transparent 0%, #000 70%);
	mask-image: linear-gradient(to right, transparent 0%, #000 70%);
	pointer-events: none;
}

.sw-entity__flag .sw-flag {
	display: block;
	width: 100%;
	height: 100%;
}

.sw-entity p {
	color: var(--sw-text);
}

.sw-contact {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
}

.sw-contact > * {
	margin: 0;
}

.sw-contact__aside {
	display: grid;
	gap: 14px;
	padding: clamp(24px, 3vw, 36px);
	border: 1px solid var(--sw-line);
	border-radius: var(--sw-radius);
	box-shadow: var(--sw-shadow);
}

.sw-contact__aside .sw-entity {
	padding: 18px 20px;
}

.sw-contact__aside h2:not(:first-child) {
	margin-top: 12px;
}

.sw-contact__lines {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
	font-weight: 600;
}

.sw-contact__lines a {
	color: var(--sw-ink);
}

.sw-network__panel {
	padding: clamp(36px, 5vw, 64px);
	border-radius: var(--sw-radius-lg);
	border: 1px solid var(--sw-line);
	background: linear-gradient(120deg, #fff 0%, var(--sw-mist) 100%);
	box-shadow: var(--sw-shadow);
}

.sw-network__panel > :first-child {
	margin-top: 0;
}

.sw-network__panel > :last-child {
	margin-bottom: 0;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 960px) {
	.sw-split,
	.sw-contact,
	.sw-cta__panel {
		grid-template-columns: minmax(0, 1fr);
	}

	.sw-cta__panel .wp-block-buttons {
		justify-content: flex-start;
	}
}

@media (max-width: 760px) {
	.sw-cards,
	.sw-boxes {
		grid-template-columns: minmax(0, 1fr);
	}

	.sw-box--featured .sw-checklist {
		columns: 1;
	}

	.sw-hero::after {
		background: rgba(10, 29, 56, 0.74);
	}

	.wp-block-buttons .wp-block-button,
	.wp-block-buttons .wp-block-button__link {
		width: 100%;
		justify-content: space-between;
	}
}
