/*
 * Cirrus Design Studio — site stylesheet
 * Last modified: 2026-07-27
 */

/*
 * Colour theme — a blue-grey tonal palette built from the site background
 * colour (#e6ecf7 ≈ hsl(219, 52%, 94%)). Every step keeps the same blue-leaning
 * hue (~219°); only lightness/saturation change, giving a cohesive scale from
 * the base tone up to lighter tints and down to darker shades.
 */
:root {
	--blue-grey-50:  #f3f6fc; /* lightest tint */
	--blue-grey-100: #e8edf8; /* base — the current page background */
	--blue-grey-200: #d3dcee;
	--blue-grey-300: #b5c3de;
	--blue-grey-400: #8da0c4;
	--blue-grey-500: #677fad; /* mid tone */
	--blue-grey-600: #4b6595;
	--blue-grey-700: #395079;
	--blue-grey-800: #283a5d;
	--blue-grey-900: #18263f; /* darkest shade */
	--blue-grey-950: #0f182a; /* deepest — page ground for the dark theme */

	/* Semantic roles — map palette steps to jobs so the UI stays consistent */

	/* Surfaces — dark blue-grey theme */
	--page-bg:        var(--blue-grey-900); /* deep blue-grey page ground */
	--surface:        var(--blue-grey-800); /* cards / panels lift off the page */
	--surface-sunken: var(--blue-grey-950); /* wells / inset areas (deepest) */

	/* Borders & dividers */
	--border:        var(--blue-grey-800);
	--border-strong: var(--blue-grey-700);

	/* Text — light on dark */
	--text:        var(--blue-grey-50);  /* primary body text */
	--text-muted:  var(--blue-grey-400); /* secondary text (passes AA on page-bg) */
	--text-subtle: var(--blue-grey-500); /* captions / hints */

	/* Accent / interactive — lightened so it reads on the dark ground */
	--accent:          var(--blue-grey-400); /* links, buttons */
	--accent-hover:    var(--blue-grey-300);
	--accent-contrast: var(--blue-grey-900); /* dark text/icons on an accent fill */

	/* Layout */
	--sleeve-max:     1500px; /* global content width */
	--sleeve-pad:     20px;   /* gutter inside the sleeve */
	--header-height:  95px;   /* fixed header height */
}

html,
body {
	margin: 0;
	padding: 0;
	width: 100%;
	min-height: 100vh;
	box-sizing: border-box;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--text);
	background-color: var(--page-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/*
 * SLEEVE — global, reusable content constraint.
 * Wrap any block's inner content in a .sleeve to cap it at the site width and
 * centre it. Kept intentionally generic (width + centring only) so every block
 * — header, sections, footer — shares one source of truth for the layout width.
 */
.sleeve {
	width: 100%;
	max-width: var(--sleeve-max);
	margin-inline: auto;
	padding-inline: var(--sleeve-pad);
	box-sizing: border-box;
}

/*
 * SITE HEADER — fixed to the top, transparent background. The backdrop-filter
 * blurs whatever page content scrolls beneath it so it doesn't compete with the
 * header content. Sits above everything else via z-index.
 */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;      /* full viewport width */
	z-index: 1000;
	background: transparent;
	-webkit-backdrop-filter: blur(14px) saturate(120%);
	backdrop-filter: blur(14px) saturate(120%);
}

/* Header-specific layout lives on the header's own sleeve, NOT on .sleeve,
   so the global sleeve stays generic. Four sections laid out in a row. */
.site-header__sleeve {
	display: flex;
	align-items: center;
	gap: 24px;
	padding-block: var(--sleeve-pad); /* top/bottom match the sleeve's left/right gutter */
}

/* Section 1 — Logo (75px tall) */
.header-logo { flex: 0 0 auto; }
.header-logo a { display: block; line-height: 0; }
.header-logo img { display: block; height: 30px; width: auto; }

/* Section 2 — Desktop menu. flex:1 lets it fill the middle and push the
   telephone section to the far right. */
.header-menu { flex: 1 1 auto; }
.header-menu ul {
	display: flex;
	justify-content: flex-start;
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.header-menu a,
.header-menu__trigger {
	display: inline-block;
	color: var(--text);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95rem;
	letter-spacing: 0.01em;
	transition: color 0.15s ease;
	/* UCfirst — first letter uppercase, the rest lowercase */
	text-transform: lowercase;
}
.header-menu a::first-letter,
.header-menu__trigger::first-letter { text-transform: uppercase; }

.header-menu a:hover,
.header-menu__trigger:hover { color: var(--accent-hover); }

/* Active page */
.header-menu a.is-active { color: var(--accent); }

/* Group — appears like a link but is a submenu trigger (no href) */
.header-menu__group { position: relative; }
.header-menu__trigger { cursor: pointer; }

/* Caret on the trigger — points down, flips up when the group is open */
.header-menu__trigger::after {
	content: "";
	display: inline-block;
	width: 0.4em;
	height: 0.4em;
	margin-left: 0.45em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-0.15em) rotate(45deg);
	transition: transform 0.2s ease;
}
.header-menu__group.is-open .header-menu__trigger::after {
	transform: translateY(0.05em) rotate(-135deg);
}

/* Submenu — a roll-down panel. Hidden until its group gets .is-open (added by
   JS on click). Absolutely positioned so it overlays the page content. */
.header-menu__submenu {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	z-index: 20;
	min-width: 220px;
	box-sizing: border-box;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
	/* roll-down animation */
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transform: translateY(-8px);
	pointer-events: none;
	transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.2s ease;
}
.header-menu__group.is-open .header-menu__submenu {
	max-height: 70vh;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.header-menu__submenu a {
	display: block;
	padding: 9px 12px;
	border-radius: 6px;
	font-weight: 500;
	white-space: nowrap;
}
.header-menu__submenu a:hover {
	background: var(--surface-sunken);
	color: var(--accent-hover);
}

@media (prefers-reduced-motion: reduce) {
	.header-menu__submenu,
	.header-menu__trigger::after { transition: none; }
}

/* Section 3 — Mobile burger. Hidden on desktop; revealed at the breakpoint. */
.header-burger {
	flex: 0 0 auto;
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	width: 46px;
	height: 46px;
	padding: 0 9px;
	background: none;
	cursor: pointer;
}
.header-burger span {
	display: block;
	width: 100%;
	height: 3px;
	background: var(--text);
	border-radius: 2px;
}

/* Section 4 — Telephone number */
.header-phone { flex: 0 0 auto; }
.header-phone a {
	display: inline-flex;
	align-items: center;
	color: var(--text);
	text-decoration: none;
	font-weight: 600;
	font-size: 1.05rem;
	white-space: nowrap;
	transition: color 0.15s ease;
}
.header-phone a:hover { color: var(--accent-hover); }

/* Outlined receiver icon — white via currentColor, 4px gap before the number */
.header-phone__icon {
	width: 1em;
	height: 1em;
	margin-right: 4px;
	flex-shrink: 0;
}

/* ------------------------------------------------------------
   TEMPORARY layout-check borders — remove once the layout is
   approved. Outlines the header, its sleeve and each section.
   ------------------------------------------------------------ */
.site-header {
	outline: 2px solid #008537; /* header extent (outline: no effect on layout) */
}

.site-header__sleeve,
.header-logo,
.header-menu,
.header-burger,
.header-phone {
	border: 1px dashed #e20a13;
}

/* Mobile devices */
@media (max-width: 768px) {
	html,
	body {
		font-size: 15px;
		line-height: 1.5;
	}

	/* Swap desktop menu out for the mobile burger */
	.header-menu   { display: none; }
	.header-burger { display: flex; }

	/* Hide the telephone number on mobile */
	.header-phone { display: none; }

	/* With the growing menu gone, push the burger to the right */
	.header-logo { margin-right: auto; }
}
