/* ==========================================================================
   CPAP Central — brand layer
   Tokens + the design-system behaviour Elementor controls can't express.
   Kit globals (colors, fonts, heading ladder, buttons) live in Site Settings.
   Reference: docs/design/DESIGN-SYSTEM-PLAN.md
   ========================================================================== */

:root {
	/* Brand core */
	--cci-green: #90c741;
	--cci-blue: #24a6de;
	--cci-navy: #074689;
	--cci-baby: #dff3fb;
	--cci-page: #f8fcfe;

	/* Ramps / semantic */
	--cci-blue-200: #bce6f6;
	--cci-blue-600: #1a88bb;
	--cci-blue-700: #156c96;
	--cci-blue-950: #063356;
	--cci-green-800: #476620;
	--cci-ink: #2a3e4c;
	--cci-muted: #5c7488;
	--cci-border: rgba(7, 70, 137, .12);
	--cci-border-strong: rgba(7, 70, 137, .2);
	--cci-ring: rgba(36, 166, 222, .45);

	/* Gradients */
	--cci-gradient-page: radial-gradient(120% 90% at 50% 0%, #fff 0%, var(--cci-page) 38%, var(--cci-baby) 74%, #cfeaf7 100%);
	--cci-gradient-brand: linear-gradient(135deg, #3fb7ea 0%, var(--cci-blue) 52%, var(--cci-navy) 100%);
	--cci-gradient-accent: linear-gradient(135deg, #a9da5f 0%, var(--cci-green) 52%, #5d8628 100%);

	/* Radii */
	--cci-r-sm: 10px;
	--cci-r-md: 14px;
	--cci-r-lg: 20px;
	--cci-r-xl: 28px;
	--cci-r-2xl: 36px;
	--cci-r-pill: 999px;

	/* Elevation — navy-tinted, never gray-black */
	--cci-shadow-sm: 0 2px 8px rgba(7, 70, 137, .08);
	--cci-shadow-md: 0 10px 28px rgba(7, 70, 137, .12);
	--cci-shadow-lg: 0 30px 80px rgba(7, 70, 137, .18);
	--cci-glow-brand: 0 8px 24px rgba(36, 166, 222, .35);

	/* Motion */
	--cci-fast: 140ms;
	--cci-base: 220ms;
	--cci-slow: 380ms;
	--cci-ease: cubic-bezier(.2, .7, .3, 1);
}

/* --------------------------------------------------------------------------
   1. Page canvas — the signature light-blue wash
   -------------------------------------------------------------------------- */

body {
	background-color: var(--cci-page);
}

/* Utility: apply the full radial wash to a section/container. */
.cci-bg-air {
	background-image: var(--cci-gradient-page);
	background-repeat: no-repeat;
	background-size: cover;
}

/* --------------------------------------------------------------------------
   2. Typography polish
   -------------------------------------------------------------------------- */

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Headline balance keeps two-line headings from orphaning a word. */
h1, h2, h3,
.elementor-widget-heading .elementor-heading-title {
	text-wrap: balance;
}

/* Body copy measure — long paragraphs stay readable. */
.elementor-widget-text-editor p {
	max-width: 68ch;
}

/* Uppercase display headline with a tracked, green accent word:
   wrap the accent word in <span class="cci-accent"> in the editor. */
.cci-display {
	font-family: "Big Shoulders Display", "Montserrat", sans-serif;
	font-weight: 900;
	line-height: .92;
	letter-spacing: -.005em;
	text-transform: uppercase;
}

.cci-accent {
	color: var(--cci-green);
}

/* Overline kicker. */
.cci-overline {
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--cci-blue-700);
}

/* --------------------------------------------------------------------------
   3. Links
   -------------------------------------------------------------------------- */

.elementor-widget-text-editor a,
.elementor-widget-theme-post-content a {
	color: var(--cci-blue-700);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
	transition: color var(--cci-fast) var(--cci-ease);
}

.elementor-widget-text-editor a:hover,
.elementor-widget-theme-post-content a:hover {
	color: var(--cci-navy);
}

/* --------------------------------------------------------------------------
   4. Buttons — kit sets colour/typography/pill; this adds presence
   -------------------------------------------------------------------------- */

.elementor-button {
	transition: transform var(--cci-fast) var(--cci-ease),
		box-shadow var(--cci-base) var(--cci-ease),
		background-color var(--cci-base) var(--cci-ease);
	box-shadow: var(--cci-shadow-sm);
}

.elementor-button:hover,
.elementor-button:focus-visible {
	transform: translateY(-1px);
	box-shadow: var(--cci-glow-brand);
}

.elementor-button:active {
	transform: translateY(1px) scale(.99);
}

/* Primary gradient variant — add the CSS class in the editor. */
.cci-btn-gradient .elementor-button,
.elementor-button.cci-btn-gradient {
	background-image: var(--cci-gradient-brand);
	background-color: transparent;
	color: #fff;
}

/* Secondary / frosted variant. */
.cci-btn-ghost .elementor-button,
.elementor-button.cci-btn-ghost {
	background-color: rgba(255, 255, 255, .55);
	color: var(--cci-navy);
	border: 1px solid rgba(255, 255, 255, .7);
	box-shadow: var(--cci-shadow-sm);
	backdrop-filter: blur(18px) saturate(150%);
	-webkit-backdrop-filter: blur(18px) saturate(150%);
}

/* --------------------------------------------------------------------------
   5. Glass surfaces
   -------------------------------------------------------------------------- */

.cci-glass,
.cci-glass-strong,
.cci-glass-tint {
	border-radius: var(--cci-r-xl);
	border: 1px solid rgba(255, 255, 255, .55);
	box-shadow: var(--cci-shadow-md);
	backdrop-filter: blur(18px) saturate(150%);
	-webkit-backdrop-filter: blur(18px) saturate(150%);
}

.cci-glass {
	background-color: rgba(255, 255, 255, .32);
}

.cci-glass-strong {
	background-color: rgba(255, 255, 255, .72);
}

.cci-glass-tint {
	background-color: rgba(223, 243, 251, .48);
}

/* Browsers without backdrop-filter get a solid, still-on-brand surface. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.cci-glass,
	.cci-glass-strong { background-color: #fff; }
	.cci-glass-tint { background-color: var(--cci-baby); }
}

/* Interactive cards lift on hover. */
.cci-card-hover {
	transition: transform var(--cci-base) var(--cci-ease), box-shadow var(--cci-base) var(--cci-ease);
}

.cci-card-hover:hover {
	transform: translateY(-4px);
	box-shadow: var(--cci-shadow-lg);
}

/* --------------------------------------------------------------------------
   6. Half-circle motif (the signature shape)
   -------------------------------------------------------------------------- */

.cci-halfcircle-top {
	border-top-left-radius: 50% 12vw;
	border-top-right-radius: 50% 12vw;
	overflow: hidden;
}

.cci-halfcircle-bottom {
	border-bottom-left-radius: 50% 12vw;
	border-bottom-right-radius: 50% 12vw;
	overflow: hidden;
}

/* Image framed by a half-circle mask. */
.cci-halfcircle-img img {
	border-top-left-radius: 999px;
	border-top-right-radius: 999px;
	object-fit: cover;
}

/* --------------------------------------------------------------------------
   7. Icon lists — the NAP / services pattern
   -------------------------------------------------------------------------- */

.elementor-widget-icon-list .elementor-icon-list-item {
	align-items: flex-start;
}

.elementor-widget-icon-list .elementor-icon-list-icon {
	margin-top: .18em;
}

.elementor-widget-icon-list .elementor-icon-list-text {
	color: var(--cci-ink);
}

.elementor-widget-icon-list .elementor-icon-list-item > a {
	color: inherit;
	text-decoration: none;
	transition: color var(--cci-fast) var(--cci-ease);
}

.elementor-widget-icon-list .elementor-icon-list-item > a:hover {
	color: var(--cci-blue-700);
}

/* --------------------------------------------------------------------------
   8. Accordions (FAQ)
   -------------------------------------------------------------------------- */

.elementor-accordion .elementor-accordion-item {
	border: 1px solid var(--cci-border);
	border-radius: var(--cci-r-md);
	margin-bottom: 10px;
	background-color: #fff;
	overflow: hidden;
}

.elementor-accordion .elementor-tab-title {
	transition: background-color var(--cci-fast) var(--cci-ease);
}

.elementor-accordion .elementor-tab-title:hover,
.elementor-accordion .elementor-tab-title.elementor-active {
	background-color: var(--cci-page);
}

.elementor-accordion .elementor-tab-title a,
.elementor-accordion .elementor-tab-title .elementor-accordion-title {
	color: var(--cci-navy);
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
}

.elementor-accordion .elementor-accordion-icon {
	color: var(--cci-blue);
}

.elementor-accordion .elementor-tab-content {
	border-top: 1px solid var(--cci-border);
	color: var(--cci-ink);
}

/* --------------------------------------------------------------------------
   9. Maps + media
   -------------------------------------------------------------------------- */

.elementor-widget-google_maps .elementor-widget-container {
	border-radius: var(--cci-r-lg);
	overflow: hidden;
	box-shadow: var(--cci-shadow-md);
	border: 1px solid var(--cci-border);
}

/* --------------------------------------------------------------------------
   10. Sticky header — glass recipe (replaces the legacy opaque rules)
   -------------------------------------------------------------------------- */

.elementor-sticky--effects[data-settings*="sticky"],
header.elementor-sticky--effects {
	background-color: rgba(255, 255, 255, .78) !important;
	backdrop-filter: blur(18px) saturate(150%);
	-webkit-backdrop-filter: blur(18px) saturate(150%);
	border-bottom: 1px solid var(--cci-border);
	box-shadow: var(--cci-shadow-sm);
}

/* --------------------------------------------------------------------------
   11. Focus + selection (accessibility)
   -------------------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
.elementor-button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	/* Outline, not box-shadow: any element that sets its own box-shadow
	   later in the cascade at equal specificity would otherwise erase the
	   ring entirely. Navy is 9.06:1 on the page, the old ring was 1.55:1. */
	outline: 3px solid var(--cci-navy);
	outline-offset: 2px;
	border-radius: var(--cci-r-sm);
}

::selection {
	background-color: var(--cci-blue-200);
	color: var(--cci-navy);
}

/* --------------------------------------------------------------------------
   12. Forms (CF7 / WPForms skin to match the kit)
   -------------------------------------------------------------------------- */

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea,
.wpforms-field input[type="text"],
.wpforms-field input[type="email"],
.wpforms-field input[type="tel"],
.wpforms-field select,
.wpforms-field textarea {
	font-family: "Nunito Sans", sans-serif;
	font-size: 15px;
	color: var(--cci-ink);
	background-color: #fff;
	border: 1px solid var(--cci-border-strong);
	border-radius: var(--cci-r-md);
	padding: 12px 16px;
	transition: border-color var(--cci-fast) var(--cci-ease), box-shadow var(--cci-fast) var(--cci-ease);
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus,
.wpforms-field input:focus,
.wpforms-field select:focus,
.wpforms-field textarea:focus {
	border-color: var(--cci-blue);
	outline: 3px solid var(--cci-navy);
	outline-offset: 2px;
}

.wpcf7 input[type="submit"],
.wpforms-submit {
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	font-size: 15px;
	color: #fff;
	background-image: var(--cci-gradient-brand);
	border: 0;
	border-radius: var(--cci-r-pill);
	padding: 15px 30px;
	cursor: pointer;
	box-shadow: var(--cci-shadow-sm);
	transition: transform var(--cci-fast) var(--cci-ease), box-shadow var(--cci-base) var(--cci-ease);
}

.wpcf7 input[type="submit"]:hover,
.wpforms-submit:hover {
	transform: translateY(-1px);
	box-shadow: var(--cci-glow-brand);
}

/* --------------------------------------------------------------------------
   13. Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}

	.elementor-button:hover,
	.cci-card-hover:hover {
		transform: none;
	}
}
