/*
 * CruiseOomph — site shell (header, navigation, footer) and shared primitives.
 * Every value comes from theme.json tokens (--wp--preset-*, --wp--custom-*).
 * Sources: Figma 299:26 (desktop header), 299:96 (mobile header),
 * 330:2 (mobile menu), 299:1381 + 59:301 (footer). See docs/design-tokens.md.
 */

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

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

body {
	font-variation-settings: normal;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .wp-block-site-title, .co-footer__name {
	font-variation-settings: var(--wp--custom--font-variation--fraunces);
	font-weight: 400;
	margin: 0;
}

:where(a) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

:focus-visible {
	outline: var(--wp--custom--state--field--focus-ring);
	outline-offset: 2px;
	border-radius: 2px;
}

/* On the blue grounds the champagne ring is the readable one. */
.co-section--blue :focus-visible,
.co-search :focus-visible,
.co-footer :focus-visible {
	outline: var(--wp--custom--state--button--focus-ring-on-dark);
}

/* ...but the search band's controls sit on white tiles, so they keep blue. */
.co-search .co-search__control:focus-visible {
	outline: var(--wp--custom--state--field--focus-ring);
}

/* Skip link — visible on focus only. */
.co-skip-link {
	position: absolute;
	left: var(--wp--preset--spacing--20);
	top: -100%;
	z-index: 1000;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--blue);
	color: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--pill);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}

.co-skip-link:focus {
	top: var(--wp--preset--spacing--20);
	outline: var(--wp--custom--state--button--focus-ring-on-dark);
}

/* Eyebrow: small caps label used across the site. */
.co-eyebrow {
	font-size: var(--wp--preset--font-size--eyebrow);
	font-weight: 500;
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
	color: var(--wp--preset--color--gold-text);
}

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

/*
 * A Button block inside editor content (.co-prose: a story, a guide, a line's
 * or ship's notes) is the primary pill too. Without these selectors the prose
 * link colour below won over theme.json's button element, and "Plan with Eric"
 * in a story read gold on champagne, 3.5:1 (the nightly axe run, 2026-09-22).
 */
.co-button .wp-block-button__link,
.co-prose .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 3.25rem; /* 52px, Figma pill height */
	padding: 0.875rem 1.5rem;
	border-radius: var(--wp--custom--radius--pill);
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: var(--wp--custom--line-height--body);
	text-decoration: none;
	transition: background-color 120ms ease, color 120ms ease;
}

.co-button--primary .wp-block-button__link,
.co-prose .wp-block-button__link {
	background: var(--wp--preset--color--champagne);
	color: var(--wp--preset--color--blue);
}

.co-button--primary .wp-block-button__link:hover,
.co-prose .wp-block-button__link:hover {
	background: var(--wp--custom--state--button--primary-hover);
	color: var(--wp--preset--color--blue);
}

.co-button--dark .wp-block-button__link {
	background: var(--wp--custom--state--button--dark-default);
	color: #fff;
}

.co-button--dark .wp-block-button__link:hover {
	background: var(--wp--custom--state--button--dark-hover);
	color: #fff;
}

.co-button--dark .wp-block-button__link:focus-visible {
	outline: var(--wp--custom--state--button--focus-ring-on-dark);
}

.co-button .wp-block-button__link[aria-disabled="true"],
.co-button .wp-block-button__link:disabled {
	background: var(--wp--custom--state--button--disabled);
	color: #fff;
	pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Header (patterns/header.php — Figma 299:26, 299:96, 330:2)          */
/* ------------------------------------------------------------------ */

.co-site-header { background: var(--wp--preset--color--surface); }

.co-header {
	max-width: 1440px;
	margin-inline: auto;
	padding-inline: var(--wp--custom--gutter--desktop);
}

.co-header__bar {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--50);
	min-height: 6.25rem; /* 100px */
}

.co-lockup {
	display: inline-flex;
	flex-direction: column;
	line-height: 1;
	text-decoration: none;
	color: var(--wp--preset--color--blue);
	white-space: nowrap;
}

.co-lockup__name {
	font-family: var(--wp--preset--font-family--fraunces);
	font-variation-settings: var(--wp--custom--font-variation--fraunces);
	font-size: 1.875rem; /* 30px */
	line-height: 1.15;
}

.co-lockup__by {
	font-size: 0.625rem; /* 10px */
	font-weight: 500;
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	line-height: 1.45;
}

.co-menu-toggle,
.co-menu-close {
	appearance: none;
	background: none;
	border: 0;
	padding: 0.5rem 0;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wp--preset--color--blue);
	cursor: pointer;
}

.co-menu-toggle { display: none; margin-left: auto; }

/* Desktop navigation */
.co-nav { flex: 1 1 auto; }

.co-nav__list {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--wp--preset--spacing--40);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem; /* 15px */
}

.co-nav__list a {
	color: var(--wp--preset--color--blue);
	text-decoration: none;
	padding: 0.25rem 0;
	border-bottom: 1px solid transparent;
	white-space: nowrap;
}

.co-nav__list a:hover,
.co-nav__list .current-menu-item > a {
	border-bottom-color: var(--wp--preset--color--champagne);
}

/* Overlay-only pieces stay hidden on desktop (specificity matches the button rule below). */
.co-nav .co-nav__panel-header,
.co-nav .co-nav__eyebrow,
.co-nav .co-nav__heading,
.co-nav .co-nav__cta-lead,
.co-nav .co-button--primary.co-nav__cta { display: none; }

.co-header__cta { min-width: 15.25rem; } /* 244px */

.co-button--primary.co-header__cta,
.co-button--primary.co-nav__cta {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 3.25rem;
	padding: 0.875rem 1.5rem;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--champagne);
	color: var(--wp--preset--color--blue);
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 120ms ease;
}

.co-button--primary.co-header__cta:hover,
.co-button--primary.co-nav__cta:hover { background: var(--wp--custom--state--button--primary-hover); }

/* Six links and the button fit from 1100px once the button may shrink to its words. */
@media (min-width: 1100px) and (max-width: 1199px) {
	.co-header__cta { min-width: 0; }
}

@media (min-width: 768px) and (max-width: 1099px) {
	.co-header { padding-inline: var(--wp--custom--gutter--tablet); }
}

/* Mobile: header collapses, nav becomes the full-screen panel of 330:2. */
@media (max-width: 767px) {
	.co-header { padding-inline: var(--wp--custom--gutter--mobile); }
	.co-header__bar { min-height: 5.875rem; gap: var(--wp--preset--spacing--30); } /* 94px */
	.co-lockup__name { font-size: 1.6875rem; } /* 27px */
	.co-header__cta { display: none !important; }
}

/* Tablet and mobile: the six links no longer fit in a row, so they move into
   the panel of 330:2 below 1100px; tablets keep Plan with Eric in the bar. */
@media (max-width: 1099px) {
	.co-menu-toggle { display: inline-block; }

	.co-nav {
		position: fixed;
		inset: 0;
		z-index: 1000;
		display: none;
		background: var(--wp--preset--color--surface);
		overflow-y: auto;
	}

	.co-nav.is-open { display: block; }
	html.co-menu-open { overflow: hidden; }

	.co-nav__panel { padding: 0 1.5rem 2.5rem; }

	.co-nav .co-nav__panel-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 5.875rem;
	}

	.co-nav .co-nav__eyebrow {
		display: block;
		margin: 1.75rem 0 1.5rem;
		font-weight: 600;
		color: var(--wp--preset--color--blue);
	}

	.co-nav .co-nav__heading {
		display: block;
		margin: 0 0 1.75rem;
		font-family: var(--wp--preset--font-family--fraunces);
		font-variation-settings: var(--wp--custom--font-variation--fraunces);
		font-size: 2.25rem; /* 36px */
		line-height: 1.08;
		color: var(--wp--preset--color--blue);
		max-width: 14ch; /* keeps the Figma two-line break: "Where would you / like to go?" */
	}

	.co-nav__list {
		display: block;
		background: #fff;
		border: 1px solid #d1dbe3;
		border-radius: var(--wp--custom--radius--tab);
		overflow: hidden;
		font-size: 1.125rem; /* 18px */
	}

	.co-nav__list li + li a { border-top: 1px solid #d1dbe3; }

	.co-nav__list a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 4.5rem; /* 72px */
		padding: 0 1.25rem;
		font-weight: 500;
		border-bottom: 0;
	}

	.co-nav__list a::after { content: "\2192"; }

	.co-nav__list a:hover { background: #f1f4f6; }
	.co-nav__list .current-menu-item > a { background: #f6e8c7; }

	.co-nav .co-nav__cta-lead {
		display: block;
		margin: 2.5rem 0 1.25rem;
		font-size: 0.875rem;
		font-weight: 500;
		color: var(--wp--preset--color--blue);
	}

	.co-nav .co-button--primary.co-nav__cta {
		display: flex;
		width: 100%;
		font-size: 0.875rem;
		font-weight: 600;
	}
}

/* ------------------------------------------------------------------ */
/* Main                                                                */
/* ------------------------------------------------------------------ */

.co-main {
	min-height: 40vh;
	padding-block: var(--wp--preset--spacing--60);
}

/* ------------------------------------------------------------------ */
/* Footer (Figma 433:2 desktop, 433:50 mobile; prototype 437:98)       */
/* ------------------------------------------------------------------ */

.co-site-footer { background: var(--wp--preset--color--blue); }

.co-footer {
	--co-footer-text: var(--wp--preset--color--surface);
	--co-footer-muted: var(--wp--preset--color--champagne-soft);
	--co-footer-accent: var(--wp--preset--color--champagne);
	box-sizing: border-box;
	max-width: 87rem; /* 1280 + 2 × 56 */
	margin-inline: auto;
	padding: 4rem var(--wp--custom--gutter--desktop) 2rem;
	color: var(--co-footer-text);
	font-size: 0.875rem;
	line-height: 1.55;
}

.co-footer a { color: inherit; text-decoration: none; }
.co-footer a:hover { color: var(--co-footer-accent); }
.co-footer a:focus-visible { outline: var(--wp--custom--state--button--focus-ring-on-dark); outline-offset: 2px; }
.co-footer p { margin: 0; }

.co-footer__main {
	display: grid;
	grid-template-columns: minmax(0, 400fr) minmax(0, 440fr) 20rem;
	gap: 2.5rem 3.5rem;
	align-items: start;
}

/* Column 1: lockup, one line of copy, two link lists */
.co-footer__brand { display: flex; flex-direction: column; gap: 0.75rem; }

.co-lockup--on-dark { color: var(--co-footer-text); }
.co-lockup--on-dark .co-lockup__name { font-size: 2rem; line-height: 1.2; }
.co-lockup--on-dark .co-lockup__by { font-size: 0.6875rem; letter-spacing: 0.145em; color: var(--co-footer-muted); }
.co-lockup--on-dark:hover { color: var(--co-footer-text); }
.co-lockup--on-dark:hover .co-lockup__name { color: var(--co-footer-accent); }

.co-footer__tagline {
	max-width: 23.75rem;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--co-footer-muted);
}

.co-footer__nav-groups { display: flex; gap: 2.5rem; margin-top: 0.75rem; }
.co-footer__nav { flex: 0 1 11.25rem; }

.co-footer__eyebrow {
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.45;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--co-footer-muted);
}

.co-footer__list { list-style: none; margin: 0.375rem 0 0; padding: 0; }
.co-footer__list li { margin: 0; }
.co-footer__list a { display: inline-block; padding-block: 0.3125rem; line-height: 1.375; } /* 32px rows, 24px+ targets (WCAG 2.5.8) */

/* Column 2: newsletter invitation */
.co-footer__newsletter { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }

.co-footer__heading {
	margin: 0;
	font-family: var(--wp--preset--font-family--fraunces);
	font-variation-settings: var(--wp--custom--font-variation--fraunces);
	font-weight: 400;
	font-size: 2rem;
	line-height: 1.2;
	color: var(--co-footer-text);
}

.co-footer__body { max-width: 26.25rem; font-size: 1rem; line-height: 1.55; color: var(--co-footer-muted); }

.co-footer__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	box-sizing: border-box;
	min-height: 3.5rem;
	padding: 0.75rem 1.5rem;
	border-radius: 999px;
	background: var(--wp--preset--color--champagne);
	color: var(--wp--preset--color--blue) !important;
	font-weight: 600;
	font-size: 0.875rem;
	line-height: 1.4;
}
.co-footer__cta:hover { background: #ecd7b2; }

.co-footer__note { max-width: 26.25rem; font-size: 0.75rem; line-height: 1.5; color: var(--co-footer-muted); }

/* Column 3: affiliation panels and social buttons */
.co-footer__affiliations { display: flex; flex-direction: column; gap: 0.75rem; }

.co-footer__panel {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	max-width: 20rem;
	height: 6.75rem;
	padding: 1rem 1.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1.125rem;
	background: var(--wp--preset--color--field);
}
.co-footer__panel img { display: block; max-width: 100%; height: auto; }
.co-footer__panel--dark { background: var(--wp--preset--color--blue); border-color: var(--co-footer-accent); }
.co-footer__panel:hover { border-color: var(--co-footer-accent); }

.co-footer__social { display: flex; gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
.co-footer__social li { margin: 0; }
.co-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 3rem;
	height: 3rem;
	border: 1px solid var(--co-footer-accent);
	border-radius: 999px;
	color: var(--co-footer-text);
}
.co-footer__social-link:hover { background: var(--co-footer-accent); color: var(--wp--preset--color--blue); }

/* Hairline and legal row */
.co-footer__legal-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(227, 202, 160, 0.55); /* champagne at 55% */
	font-size: 0.75rem;
	line-height: 1.5;
}
.co-footer__copyright { color: var(--co-footer-muted); }
.co-footer__email a,
.co-footer__legal a { display: inline-block; padding-block: 0.375rem; } /* 24px targets (WCAG 2.5.8) */
.co-footer__legal a:hover { text-decoration: underline; }

@media (max-width: 1023px) {
	.co-footer__main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.co-footer__affiliations { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
	.co-footer__affiliations .co-footer__panel { flex: 1 1 12rem; }
	.co-footer__social { flex-basis: 100%; }
}

@media (max-width: 767px) {
	.co-footer { padding: 3rem var(--wp--custom--gutter--mobile) 1.5rem; }
	.co-footer__main { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
	.co-footer__nav-groups { gap: 1.5rem; }
	.co-footer__nav { flex: 1 1 0; }
	.co-footer__affiliations { flex-direction: column; }
	.co-footer__affiliations .co-footer__panel { flex: 0 0 auto; max-width: none; }
	.co-footer__social { flex-basis: auto; }
	.co-footer__legal-row { flex-direction: column; align-items: flex-start; gap: 0.25rem; margin-top: 2rem; padding-top: 1.5rem; }
}

/* Front page sections manage their own gutters and full-bleed grounds. */
.co-main--flush { padding-block: 0; }

/* ------------------------------------------------------------------ */
/* Prose pages (the privacy notice, Phase 8.3)                          */
/* ------------------------------------------------------------------ */

.co-prose {
	max-width: var(--wp--custom--measure--prose);
	color: var(--wp--preset--color--blue);
	font-size: var(--wp--preset--font-size--body);
	line-height: var(--wp--custom--line-height--prose);
}
.co-prose h2 {
	margin: var(--wp--preset--spacing--50) 0 var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--h-4);
	line-height: var(--wp--custom--line-height--heading);
}
.co-prose p { margin: 0 0 var(--wp--preset--spacing--30); }
.co-prose ul { margin: 0 0 var(--wp--preset--spacing--30); padding-left: 1.25em; }
.co-prose li { margin: 0 0 var(--wp--preset--spacing--20); }
.co-prose__lead { font-size: var(--wp--preset--font-size--lead); color: var(--wp--preset--color--muted); }
.co-prose__updated { margin-top: var(--wp--preset--spacing--50); font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.co-prose a { color: var(--wp--preset--color--gold-text); } /* Not a Button block: the pill rules above outrank this. */
