/* ============================================================================
   Bizaxl Hospital — public marketing site
   Direction: "Reassuring Daylight" (editorial / light)

   TOKEN CONTRACT (hard): every colour and font below is `var(--mk-*)`. The only
   place a literal value may appear is the `:root` fallback block immediately
   under this comment, and even that is overridden at render time by
   www/marketing.py from Bizaxl Hospital Settings. A raw hex anywhere else in
   this file breaks the client re-skin, which is the whole point of the theme.
   Alpha variants are built with color-mix() off the tokens for the same reason.

   ONE THEME, ONE RADIUS: this page is a single committed light world. There is
   deliberately no `prefers-color-scheme: dark` palette — a second hard-coded
   palette would silently discard the colours a client chose in Settings, which
   is the opposite of configurable. `color-scheme: light` is declared so native
   form controls render against this palette rather than the OS's.
   Corner radius is one scale (--mk-r) applied to every surface, frame, input
   and button. No pills, no mixed systems.
   ============================================================================ */

:root {
	/* Fallbacks only. www/marketing.py re-declares all of these inline from the
	   resolved theme, so these values are what renders if that ever fails. */
	--mk-primary: #16463C;
	--mk-accent: #C4643B;
	--mk-bg: #FAF8F4;
	--mk-bg-alt: #F1EDE5;
	--mk-surface: #FFFFFF;
	--mk-ink: #1A1F1D;
	--mk-muted: #6B7671;
	--mk-line: rgba(26, 31, 29, 0.12);
	--mk-on-primary: #FFFFFF;
	--mk-on-accent: #FFFFFF;
	--mk-font-heading: Georgia, 'Times New Roman', serif;
	--mk-font-body: ui-sans-serif, system-ui, sans-serif;

	--mk-r: 4px;
	--mk-nav-h: 68px;
	--mk-gutter: clamp(20px, 5vw, 48px);
	--mk-max: 1200px;
	--mk-ease: cubic-bezier(0.23, 1, 0.32, 1);

	color-scheme: light;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body.mk-body {
	margin: 0;
	background: var(--mk-bg);
	color: var(--mk-ink);
	font-family: var(--mk-font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

h1, h2, h3 {
	font-family: var(--mk-font-heading);
	font-weight: 400;
	margin: 0;
	letter-spacing: -0.02em;
	line-height: 1.08;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
	outline: 2px solid var(--mk-accent);
	outline-offset: 3px;
	border-radius: 2px;
}

.mk-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 12px 18px;
	background: var(--mk-primary);
	color: var(--mk-on-primary);
	text-decoration: none;
}
.mk-skip-link:focus { left: 12px; top: 12px; }

.mk-container {
	width: 100%;
	max-width: var(--mk-max);
	margin-inline: auto;
	padding-inline: var(--mk-gutter);
}

.mk-section { padding-block: clamp(72px, 9vw, 128px); }

.mk-section__head { max-width: 44rem; }

.mk-section__title { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }

.mk-section__subtext {
	margin-top: 14px;
	color: var(--mk-muted);
	font-size: clamp(1rem, 1.3vw, 1.075rem);
	max-width: 46ch;
}

/* ── Motion ────────────────────────────────────────────────────────────────── */

/* Gated on .mk-anim (set on <html> before first paint) so a no-JS or crawler
   view always sees fully-rendered content instead of an invisible page. */
.mk-anim .mk-reveal {
	opacity: 0;
	transform: translateY(16px);
	will-change: opacity, transform;
}
.mk-anim .mk-reveal.mk-reveal--in {
	opacity: 1;
	transform: none;
	transition: opacity 0.6s var(--mk-ease), transform 0.6s var(--mk-ease);
}

.mk-img--lazy { opacity: 0; transition: opacity 0.5s ease; }
.mk-img--lazy.mk-img--loaded { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
	.mk-anim .mk-reveal,
	.mk-anim .mk-reveal.mk-reveal--in {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	.mk-img--lazy { opacity: 1 !important; transition: none !important; }
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.mk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	white-space: nowrap;          /* a CTA label never wraps to a second line */
	padding: 14px 24px;
	border: 1px solid transparent;
	border-radius: var(--mk-r);
	font: inherit;
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.005em;
	text-decoration: none;
	cursor: pointer;
	transition: transform 160ms var(--mk-ease), background-color 200ms ease,
		border-color 200ms ease, color 200ms ease;
}

.mk-btn--sm { padding: 10px 18px; font-size: 0.875rem; }

.mk-btn--primary {
	background: var(--mk-primary);
	color: var(--mk-on-primary);
}

.mk-btn--ghost {
	background: transparent;
	color: var(--mk-ink);
	border-color: var(--mk-line);
}

@media (hover: hover) and (pointer: fine) {
	.mk-btn--primary:hover { background: color-mix(in srgb, var(--mk-primary) 88%, var(--mk-ink)); }
	.mk-btn--ghost:hover { border-color: var(--mk-ink); background: color-mix(in srgb, var(--mk-ink) 4%, transparent); }
}

.mk-btn:active { transform: scale(0.975); }

@media (prefers-reduced-motion: reduce) {
	.mk-btn { transition: background-color 200ms ease, border-color 200ms ease; }
	.mk-btn:active { transform: none; }
}

/* ── Header ────────────────────────────────────────────────────────────────── */

.mk-nav {
	position: sticky;
	top: 0;
	z-index: 40;
	background: color-mix(in srgb, var(--mk-bg) 86%, transparent);
	backdrop-filter: saturate(140%) blur(12px);
	-webkit-backdrop-filter: saturate(140%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color 250ms ease, background-color 250ms ease;
	padding-top: env(safe-area-inset-top, 0px);
}

.mk-nav--stuck {
	border-bottom-color: var(--mk-line);
	background: color-mix(in srgb, var(--mk-bg) 94%, transparent);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.mk-nav { background: var(--mk-bg); }
}

.mk-nav__inner {
	height: var(--mk-nav-h);
	max-width: var(--mk-max);
	margin-inline: auto;
	padding-inline: var(--mk-gutter);
	display: flex;
	align-items: center;
	gap: clamp(16px, 3vw, 40px);
}

.mk-nav__brand { text-decoration: none; margin-right: auto; }

.mk-nav__wordmark {
	font-family: var(--mk-font-heading);
	font-size: 1.24rem;
	letter-spacing: -0.015em;
	color: var(--mk-primary);
}

.mk-nav__logo { height: 30px; width: auto; }

.mk-nav__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }

.mk-nav__link {
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--mk-muted);
	padding-block: 6px;
	border-bottom: 1px solid transparent;
	transition: color 200ms ease, border-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
	.mk-nav__link:hover { color: var(--mk-ink); border-bottom-color: var(--mk-accent); }
}

/* Zero-height marker the header's IntersectionObserver watches. */
.mk-nav__sentinel { display: block; height: 1px; margin-bottom: -1px; }

@media (max-width: 860px) {
	.mk-nav__links { display: none; }
	.mk-nav__inner { gap: 12px; }
}

/* ── Hero: asymmetric split ────────────────────────────────────────────────── */

.mk-hero {
	padding-top: clamp(28px, 3.5vw, 52px);
	padding-bottom: clamp(56px, 7vw, 104px);
}

.mk-hero__inner {
	display: grid;
	grid-template-columns: 1.02fr 0.98fr;
	gap: clamp(32px, 5vw, 72px);
	align-items: center;
	min-height: min(62svh, 528px);
}

.mk-hero__title {
	font-size: clamp(2.5rem, 5.6vw, 4.25rem);
	line-height: 1.02;
	max-width: 12ch;
}

.mk-hero__subtext {
	margin-top: 22px;
	font-size: clamp(1.05rem, 1.5vw, 1.2rem);
	color: var(--mk-muted);
	max-width: 38ch;
}

.mk-hero__actions {
	margin-top: 34px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.mk-hero__media { margin: 0; }

.mk-hero__media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--mk-r);
	box-shadow: 0 24px 60px color-mix(in srgb, var(--mk-ink) 14%, transparent);
}

@media (max-width: 900px) {
	.mk-hero__inner {
		grid-template-columns: 1fr;
		min-height: 0;
		gap: 32px;
	}
	.mk-hero__title { max-width: 16ch; }
	.mk-hero__media img { aspect-ratio: 16 / 10; }
}

@media (max-width: 560px) {
	/* Stacked, two buttons of different widths read as ragged. Full-bleed both. */
	.mk-hero__actions .mk-btn { flex: 1 1 100%; }
}

/* ── Assurance strip ───────────────────────────────────────────────────────── */

.mk-stats {
	background: var(--mk-bg-alt);
	border-block: 1px solid var(--mk-line);
	padding-block: clamp(40px, 5vw, 64px);
}

.mk-stats__row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(24px, 4vw, 56px);
}

.mk-stat {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-left: clamp(18px, 2.5vw, 32px);
	border-left: 1px solid var(--mk-line);
}

.mk-stat__value {
	font-family: var(--mk-font-heading);
	font-size: clamp(1.8rem, 3vw, 2.5rem);
	line-height: 1;
	color: var(--mk-primary);
}

.mk-stat__label {
	color: var(--mk-muted);
	font-size: 0.95rem;
	max-width: 26ch;
}

@media (max-width: 760px) {
	.mk-stats__row { grid-template-columns: 1fr; gap: 22px; }
}

/* ── Departments: asymmetric editorial grid ────────────────────────────────── */

.mk-depts__grid {
	margin-top: clamp(40px, 5vw, 64px);
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: clamp(16px, 2vw, 28px);
}

/* Rhythm, not repetition: 7/5, then 5/7, then 6/6. Six items, six cells, none
   empty — the spans below are the whole reason this is not three equal cards. */
.mk-dept { grid-column: span 6; }
.mk-dept:nth-child(1) { grid-column: span 7; }
.mk-dept:nth-child(2) { grid-column: span 5; }
.mk-dept:nth-child(3) { grid-column: span 5; }
.mk-dept:nth-child(4) { grid-column: span 7; }

.mk-dept {
	display: flex;
	flex-direction: column;
	background: var(--mk-bg-alt);
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-r);
	overflow: hidden;
}

.mk-dept--media { background: var(--mk-surface); }

/* Grid rows stretch, so a text-only cell is as tall as the photo cell beside it. Centre its
   copy rather than leaving it stranded at the top of a tall block of flat colour. */
.mk-dept:not(.mk-dept--media) { justify-content: center; }

.mk-dept__frame { display: block; }

.mk-dept__frame img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.mk-dept__body { padding: clamp(20px, 2.4vw, 30px); }

.mk-dept__title {
	font-size: clamp(1.25rem, 1.9vw, 1.6rem);
	color: var(--mk-primary);
}

.mk-dept__text {
	margin-top: 10px;
	color: var(--mk-muted);
	font-size: 0.975rem;
	max-width: 40ch;
}

@media (max-width: 900px) {
	.mk-dept,
	.mk-dept:nth-child(1),
	.mk-dept:nth-child(2),
	.mk-dept:nth-child(3),
	.mk-dept:nth-child(4) { grid-column: span 12; }
}

/* ── How it works: head + numbered rail ────────────────────────────────────── */

.mk-steps { background: var(--mk-surface); border-block: 1px solid var(--mk-line); }

.mk-steps__inner {
	display: grid;
	grid-template-columns: 0.85fr 1.15fr;
	gap: clamp(32px, 5vw, 80px);
	align-items: start;
}

.mk-steps__head { position: sticky; top: calc(var(--mk-nav-h) + 32px); }

.mk-steps__cta { margin-top: 28px; }

.mk-steps__list { counter-reset: mk-step; }

.mk-step {
	counter-increment: mk-step;
	display: grid;
	grid-template-columns: 3.2rem 1fr;
	gap: clamp(12px, 2vw, 24px);
	padding-block: clamp(22px, 3vw, 34px);
	border-top: 1px solid var(--mk-line);
}

.mk-step:last-child { border-bottom: 1px solid var(--mk-line); }

.mk-step::before {
	content: counter(mk-step, decimal-leading-zero);
	font-family: var(--mk-font-heading);
	font-size: 1.1rem;
	color: var(--mk-accent);
	line-height: 1.5;
}

.mk-step__title { font-size: clamp(1.3rem, 2vw, 1.7rem); color: var(--mk-primary); }

.mk-step__text {
	/* Column 2 explicitly: ::before, the title and this text are three children of a
	   two-column grid, so without this the paragraph auto-places into row 2 of the
	   3.2rem numeral column and wraps one word per line. */
	grid-column: 2;
	margin-top: 8px;
	color: var(--mk-muted);
	max-width: 46ch;
}

@media (max-width: 900px) {
	.mk-steps__inner { grid-template-columns: 1fr; gap: 32px; }
	.mk-steps__head { position: static; }
	.mk-step { grid-template-columns: 2.6rem 1fr; }
}

/* ── Gallery: full-bleed scroll-snap strip ─────────────────────────────────── */

.mk-gallery { padding-block: clamp(72px, 9vw, 128px); }

.mk-gallery__head { max-width: 44rem; }

.mk-gallery__strip {
	margin-top: clamp(32px, 4vw, 52px);
	display: flex;
	gap: clamp(14px, 1.8vw, 24px);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-left: var(--mk-gutter);
	padding-inline: var(--mk-gutter);
	padding-bottom: 12px;
	scrollbar-width: thin;
	scrollbar-color: var(--mk-line) transparent;
	/* Centred like the containers above it, but allowed to run off the right
	   edge so the strip reads as continuing rather than ending. */
	max-width: var(--mk-max);
	margin-inline: auto;
}

.mk-gallery__cell {
	flex: 0 0 auto;
	width: min(76vw, 420px);
	scroll-snap-align: start;
}

.mk-gallery__cell figure { margin: 0; }

.mk-gallery__cell img,
.mk-gallery__ph {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--mk-r);
	background: var(--mk-bg-alt);
}

.mk-gallery__cap {
	margin-top: 12px;
	font-size: 0.9rem;
	color: var(--mk-muted);
}

/* ── Book: reassurance + form ──────────────────────────────────────────────── */

.mk-book { background: var(--mk-bg-alt); border-top: 1px solid var(--mk-line); }

.mk-book__inner {
	display: grid;
	grid-template-columns: 0.85fr 1.15fr;
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
}

.mk-book__points {
	margin-top: 26px;
	display: grid;
	gap: 14px;
}

.mk-book__points li {
	position: relative;
	padding-left: 22px;
	color: var(--mk-muted);
	font-size: 0.975rem;
	max-width: 34ch;
}

.mk-book__points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 10px;
	height: 1px;
	background: var(--mk-accent);
}

.mk-form {
	background: var(--mk-surface);
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-r);
	padding: clamp(22px, 3vw, 36px);
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.mk-field { display: grid; gap: 7px; min-width: 0; }
.mk-field--wide { grid-column: 1 / -1; }

.mk-field label {
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--mk-ink);
}

.mk-field input,
.mk-field select,
.mk-field textarea {
	font: inherit;
	font-size: 0.975rem;
	color: var(--mk-ink);
	background: var(--mk-bg);
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-r);
	padding: 12px 13px;
	width: 100%;
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

.mk-field textarea { resize: vertical; min-height: 92px; }

.mk-field input::placeholder,
.mk-field textarea::placeholder { color: var(--mk-muted); }

.mk-field input:focus,
.mk-field select:focus,
.mk-field textarea:focus {
	outline: none;
	border-color: var(--mk-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--mk-primary) 18%, transparent);
}

.mk-form__foot {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-top: 4px;
}

.mk-form__status { font-size: 0.925rem; }
.mk-form__status--ok { color: var(--mk-primary); }
.mk-form__status--err { color: var(--mk-accent); }

.mk-btn[disabled] { opacity: 0.6; cursor: progress; }

@media (max-width: 900px) {
	.mk-book__inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 560px) {
	.mk-form { grid-template-columns: 1fr; }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */

.mk-footer {
	background: var(--mk-bg-alt);
	border-top: 1px solid var(--mk-line);
	padding-block: clamp(48px, 6vw, 80px);
	padding-bottom: calc(clamp(48px, 6vw, 80px) + env(safe-area-inset-bottom, 0px));
}

.mk-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(24px, 4vw, 56px);
	justify-content: space-between;
	align-items: start;
}

.mk-footer__brand {
	font-family: var(--mk-font-heading);
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	color: var(--mk-primary);
}

.mk-footer__text {
	margin-top: 12px;
	color: var(--mk-muted);
	font-size: 0.95rem;
	max-width: 40ch;
}

.mk-footer__links { display: grid; gap: 10px; }

.mk-footer__links a {
	text-decoration: none;
	font-size: 0.95rem;
	color: var(--mk-muted);
	border-bottom: 1px solid transparent;
	transition: color 200ms ease, border-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
	.mk-footer__links a:hover { color: var(--mk-ink); border-bottom-color: var(--mk-accent); }
}
