/*
 * Ada base: reset, typography, buttons, header (mega menu), footer, utilities.
 */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* scroll-padding: anchor links (#demo-form etc.) land below the sticky header. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
	margin: 0;
	font-family: 'Urbanist', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: var(--fs-body);
	line-height: 1.6;
	color: var(--ada-ink);
	background: var(--ada-bg);
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ada-red); outline-offset: 3px; border-radius: 2px; }

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

/* ---------- Typography ---------- */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5 { margin: 0 0 0.5em; }
h1, .h1 { font-size: var(--fs-h1); font-weight: var(--fw-h1); line-height: var(--lh-h1); letter-spacing: 0.01em; }
h2, .h2 { font-size: var(--fs-h2); font-weight: var(--fw-h2); line-height: var(--lh-h2); letter-spacing: 0.01em; }
h3, .h3 { font-size: var(--fs-h3); font-weight: var(--fw-h3); line-height: var(--lh-h3); letter-spacing: 0.01em; }
h4, .h4 { font-size: var(--fs-h4); font-weight: var(--fw-h4); line-height: var(--lh-h4); }
h5, .h5 { font-size: var(--fs-h5); font-weight: var(--fw-h5); line-height: var(--lh-h5); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.lead { font-size: var(--fs-body-lg); }
.small { font-size: var(--fs-body-sm); }
strong { font-weight: 600; }

.eyebrow {
	display: inline-block;
	color: var(--ada-eyebrow);
	font-size: var(--fs-body-sm);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 0 0 14px;
}
.eyebrow--bracket { letter-spacing: 0.08em; }

.muted { color: var(--ada-muted); }

/* ---------- Layout ---------- */
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.container--wide { width: min(var(--container-wide), 100% - 2 * var(--gutter)); }
.section { padding-block: var(--section-pad); position: relative; }
.section--tight { padding-block: calc(var(--section-pad) * 0.6); }
.section--flush-top { padding-top: 0; }

/* Page settings → Section spacing: Compact (landing pages). */
.ada-spacing-compact { --section-pad: clamp(36px, 5vw, 64px); }
.ada-spacing-compact .module--hero-page { padding-block: clamp(48px, 6vw, 84px); }

/* Page settings → Landing page: no link columns, so the legal bar stands alone. */
.ada-landing .site-footer__bottom { border-top: 0; }

/* Section surfaces. */
.surface-white { background: var(--ada-white); }
.surface-tint { background: linear-gradient(135deg, #FFFFFF 0%, var(--ada-warm-tint) 60%, #F9E9E4 100%); }
.surface-grey { background: var(--ada-grey-lightest); }
.surface-dark { background: var(--ada-dark-bg); color: var(--ada-dark-ink); }
.surface-dark .muted { color: var(--ada-dark-muted); }

/* Decorative brand shapes — soft neumorphic slash + circle, as the design's
 * page heroes (large, light, shadowed; cropped by the section). */
.deco-slashes {
	position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.deco-slashes::before, .deco-slashes::after { content: ''; position: absolute; }
.deco-slashes::before {
	width: clamp(280px, 26vw, 460px); height: 160%; top: -30%; right: 6%;
	background: linear-gradient(128deg, #FFFFFF 20%, #EEF1F2 100%);
	border-radius: clamp(32px, 4vw, 56px);
	transform: skewX(-24deg);
	box-shadow: -36px 40px 80px rgba(17, 17, 17, 0.07), inset 2px 2px 0 rgba(255, 255, 255, 0.9);
}
.deco-slashes::after {
	width: clamp(200px, 19vw, 320px); aspect-ratio: 1; height: auto;
	top: 38%; right: max(-90px, -7vw);
	background: linear-gradient(135deg, #FFFFFF 24%, #EDF0F1 100%);
	border-radius: 50%;
	box-shadow: -28px 32px 64px rgba(17, 17, 17, 0.06), inset 2px 2px 0 rgba(255, 255, 255, 0.9);
}
.section > .container { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 13px 26px; border-radius: 6px;
	font-size: var(--fs-body); font-weight: 500; line-height: 1.2;
	text-decoration: none; border: 1px solid transparent;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn--sm { padding: 10px 20px; font-size: var(--fs-body-sm); }
.btn--primary { background: var(--ada-btn); color: var(--ada-btn-ink); border-color: var(--ada-btn); }
.btn--primary:hover { background: var(--ada-red); border-color: var(--ada-red); }
.btn--outline { background: transparent; color: var(--ada-red-dark); border-color: var(--ada-red-dark); }
.btn--outline:hover { background: var(--ada-red-dark); color: var(--ada-white); }
.surface-dark .btn--outline, .btn--ghost-light { color: var(--ada-white); border-color: rgba(255, 255, 255, 0.55); background: transparent; }
.surface-dark .btn--outline:hover, .btn--ghost-light:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--ada-white); }

.link-more {
	display: inline-flex; align-items: center; gap: 8px;
	color: var(--ada-red); font-weight: 600; font-size: var(--fs-body-sm);
	letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.link-more .arrow { transition: transform 0.2s ease; }
.link-more:hover .arrow { transform: translateX(4px); }
.link-more--plain { text-transform: none; letter-spacing: 0; font-size: var(--fs-body); }

.arrow { display: inline-block; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 60;
	background: var(--ada-white);
	border-bottom: 1px solid transparent;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled { border-color: var(--ada-line); box-shadow: 0 6px 24px rgba(17, 17, 17, 0.05); }
.site-header__bar {
	display: flex; align-items: center; gap: 32px;
	min-height: 78px;
}
.site-header__logo { display: inline-flex; align-items: center; text-decoration: none; }
.site-header__logo svg, .site-header__logo img { height: 30px; width: auto; }

.nav-primary { display: flex; align-items: center; gap: 6px; margin-right: auto; }
.nav-primary > ul { display: flex; list-style: none; gap: 4px; align-items: center; }
.nav-primary a, .nav-primary .menu-trigger {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 10px 14px; text-decoration: none;
	font-size: var(--fs-body); font-weight: 500; line-height: 1.6; letter-spacing: 0.01em;
	color: var(--ada-ink); border-radius: 6px;
}
.nav-primary a:hover, .nav-primary .menu-trigger:hover { color: var(--ada-red); }
.nav-primary .caret { transition: transform 0.2s ease; }
.nav-item--open > .menu-trigger .caret, .menu-item--open > .menu-trigger .caret { transform: rotate(180deg); }

.site-header__actions { display: flex; align-items: center; gap: 12px; }

/* Dropdown / mega panels — floating keyline cards, never full-width. */
.nav-panel {
	position: absolute; top: calc(100% + 14px);
	background: var(--ada-white);
	border: 1px solid var(--ada-line);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: 0 24px 48px rgba(17, 17, 17, 0.08);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
	z-index: 55;
}
.nav-panel.is-open { opacity: 1; visibility: visible; transform: none; }
/* Mega (Product): card at content width, centred. */
.nav-panel--mega {
	left: 50%;
	width: min(var(--container-wide), 100% - 2 * var(--gutter));
	transform: translateX(-50%) translateY(8px);
}
.nav-panel--mega.is-open { transform: translateX(-50%); }
.nav-panel__inner { display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.nav-panel__copy { padding: 28px 24px 34px 40px; }
.nav-panel__title { color: var(--ada-red); font-size: var(--fs-body-sm); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 18px; }
/* Column-major so the design's columns hold: 1-3 left, 4-5 right. */
/* Two columns filling row-by-row: 4 items = 2×2, and it stays balanced as items are added. */
.nav-panel__links { list-style: none; display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row; align-items: start; gap: 6px 40px; }
/* Compact dropdown (Company / Resources): sits under its trigger — JS sets --panel-left. */
.nav-panel--compact {
	left: var(--panel-left, 50%); right: auto;
	width: min(520px, 92vw);
}
.nav-panel--compact .nav-panel__inner { grid-template-columns: 1fr 200px; }
.nav-panel--compact .nav-panel__copy { padding: 24px 12px 28px 28px; }
/* Photos bleed to the card edge; the card's radius clips them. */
.nav-panel__photo { display: block; }
.nav-panel__photo img { width: 100%; height: 100%; object-fit: cover; min-height: 230px; display: block; }
.nav-panel__links--single { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
.nav-panel__link {
	display: flex; gap: 14px; align-items: flex-start;
	padding: 12px; margin: -2px -12px; border-radius: 8px; text-decoration: none;
}
.nav-panel__link:hover { background: var(--ada-grey-lightest); }
.nav-panel__link .ico { flex: 0 0 auto; width: 22px; height: 22px; color: var(--ada-ink); margin-top: 2px; }
.nav-panel__link-title { display: block; font-weight: 500; font-size: var(--fs-body); line-height: 1.4; }
.nav-panel__link-desc { display: block; color: var(--ada-muted); font-size: var(--fs-body-sm); line-height: 1.45; margin-top: 2px; }
.nav-panel__promo { position: relative; overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; text-decoration: none; }
.nav-panel__promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nav-panel__promo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 17, 17, 0) 20%, rgba(17, 17, 17, 0.82) 100%); }
.nav-panel__promo-copy { position: relative; z-index: 1; color: var(--ada-white); padding: 22px; }
.nav-panel__promo-copy .link-more { color: var(--ada-white); margin-top: 8px; }

/* Mobile nav. */
.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span {
	position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ada-ink);
	transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease; border-radius: 2px;
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 26px; }
.nav-toggle[aria-expanded='true'] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.nav-mobile {
	display: none; position: fixed; inset: 78px 0 0; z-index: 58;
	background: var(--ada-white); overflow-y: auto;
	padding: 16px var(--gutter) 40px;
}
.nav-mobile.is-open { display: block; }
/* Keyline card, inset from the screen edges (menu design). */
.nav-mobile__card {
	background: var(--ada-white);
	border: 1px solid var(--ada-line);
	border-radius: var(--radius-lg);
	box-shadow: 0 12px 32px rgba(17, 17, 17, 0.05);
	padding: 4px 20px 20px;
}
.nav-mobile__list { list-style: none; }
.nav-mobile__list > li { border-bottom: 1px solid var(--ada-line); }
.nav-mobile__row {
	display: flex; align-items: center; justify-content: space-between; width: 100%;
	padding: 18px 2px; font-size: var(--fs-h5); font-weight: 500; text-decoration: none; text-align: left;
}
.nav-mobile__row .arrow { color: var(--ada-grey); transition: transform 0.25s ease; }
.nav-mobile__row[aria-expanded='true'] .arrow { transform: rotate(90deg); }
.nav-mobile__sub { list-style: none; overflow: hidden; max-height: 0; transition: max-height 0.3s var(--ease-out); }
.nav-mobile__sub.is-open { max-height: 600px; padding-bottom: 12px; }
.nav-mobile__sub a { display: flex; gap: 12px; align-items: center; padding: 10px 2px; text-decoration: none; color: var(--ada-grey-dark); }
.nav-mobile__sub .ico { width: 20px; height: 20px; }
.nav-mobile__ctas { display: grid; gap: 12px; padding-top: 24px; }
.nav-mobile__ctas .btn { width: 100%; }

@media (max-width: 1023px) {
	.nav-primary, .site-header__actions { display: none; }
	.nav-toggle { display: block; margin-left: auto; }
}

body.nav-locked { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ada-black); color: var(--ada-white); }
.site-footer a { text-decoration: none; }
.site-footer__main {
	display: grid; grid-template-columns: 1.4fr repeat(4, 1fr);
	gap: 40px; padding-block: 64px 48px;
}
.site-footer__brand svg, .site-footer__brand img { height: 30px; width: auto; }
.site-footer__brand .btn { margin-top: 22px; }
.site-footer__col-title { color: var(--ada-red); font-size: var(--fs-body-sm); font-weight: 600; letter-spacing: 0.08em; margin-bottom: 16px; }
.site-footer__col ul { list-style: none; display: grid; gap: 10px; }
.site-footer__col a { color: var(--ada-grey-light); font-size: var(--fs-body-sm); line-height: 1.55; }
.site-footer__col a:hover { color: var(--ada-white); }
.site-footer__bottom {
	display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	padding-block: 22px; font-size: var(--fs-caption); color: var(--ada-grey);
}
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; }
.site-footer__legal a { color: var(--ada-grey); }
.site-footer__legal a:hover { color: var(--ada-white); }
.site-footer__social { display: flex; gap: 14px; margin-left: auto; }
.site-footer__social a { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; color: var(--ada-white); }
.site-footer__social svg { width: 18px; height: 18px; }
.site-footer__credit { flex-basis: 100%; padding-bottom: 20px; color: var(--ada-grey); }
.site-footer__lang select {
	background: transparent; color: var(--ada-white); border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 5px; padding: 6px 10px; font-size: var(--fs-caption);
}

@media (max-width: 1023px) {
	.site-footer__main { grid-template-columns: 1fr 1fr; }
	.site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.site-footer__main { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(22px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
	.reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ---------- Utilities ---------- */
/* The hidden attribute must always win, even over classes that set display. */
[hidden] { display: none !important; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px;
	clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link { left: 8px; top: 8px; z-index: 100; background: var(--ada-white); padding: 10px 16px; border-radius: 6px; }
.skip-link:focus { position: fixed !important; width: auto; height: auto; clip-path: none; }
.text-center { text-align: center; }
