/*
 * HOMZ base: reset, layout primitives and the shared Figma components
 * (button/M, button/S, tag/small, tag/medium, text/header, accordion/FAQ,
 * segmented control, slider arrows). Section styles live in css/sections/.
 * Breakpoint: mobile is max-width 767px (Figma mobile frames are 390 wide).
 */

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

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

body {
	margin: 0;
	background: var(--c-bg-white);
	color: var(--c-text-dark);
	font: var(--f-body-s);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1 { text-wrap: balance; }

:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- Layout ---------- */
.site-main {
	display: flex;
	flex-direction: column;
	gap: var(--section-gap);
	padding-bottom: var(--section-gap);
}

.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }

.section { position: relative; }

/* Image that fills its box (cards, heroes). */
.cover { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Icons ----------
 * Monotone icons are SVG files painted with currentColor through a mask,
 * so one file serves every colour. Markup: <span class="icon" style="--i:url(...)"></span>
 */
.icon {
	display: inline-block;
	flex: none;
	width: var(--icon-size, 24px);
	height: var(--icon-size, 24px);
	background-color: currentColor;
	-webkit-mask: var(--i) center / contain no-repeat;
	mask: var(--i) center / contain no-repeat;
}

/* Multi-colour icons and illustrations stay as <img>. */
.icon-img { flex: none; width: var(--icon-size, 24px); height: var(--icon-size, 24px); object-fit: contain; }

/* ---------- Typography helpers (Figma text styles) ---------- */
.t-header-2xl { font: var(--f-header-2xl); }
.t-header-xl { font: var(--f-header-xl); }
.t-header-l { font: var(--f-header-l); }
.t-header-m { font: var(--f-header-m); }
.t-header-s { font: var(--f-header-s); }
.t-header-xs { font: var(--f-header-xs); }
.t-header-2xs { font: var(--f-header-2xs); }
.t-subtitle-xxl { font: var(--f-subtitle-xxl); }
.t-subtitle-xl { font: var(--f-subtitle-xl); }
.t-subtitle-l { font: var(--f-subtitle-l); }
.t-subtitle-m { font: var(--f-subtitle-m); }
.t-subtitle-s { font: var(--f-subtitle-s); }
.t-body-m { font: var(--f-body-m); }
.t-body-s { font: var(--f-body-s); }
.t-body-xs { font: var(--f-body-xs); }
.t-grey { color: var(--c-text-grey); }
.t-primary { color: var(--c-primary); }

/* Rich text from a WYSIWYG field. */
.rich > * + * { margin-top: 12px; }
.rich ul, .rich ol { padding-left: 1.25em; }
.rich li + li { margin-top: 6px; }
.rich a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 2px; }
.rich strong { font-weight: 700; }

/* ---------- text/header (232:2235 desktop, 666:13604 mobile) ---------- */
.section-head {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 740px;
}

.section-head__title { font: var(--f-header-xl); color: var(--c-text-dark); }
.section-head__text { font: var(--f-body-s); color: var(--c-text-grey); }

.section-head--center { margin-inline: auto; align-items: center; text-align: center; }
.section-head--wide { max-width: none; }

@media (max-width: 767px) {
	.section-head { align-items: center; text-align: center; margin-inline: auto; }
	.section-head__title { font: var(--f-header-l); }
	.section-head__text { font: var(--f-body-xs); }
	.section-head--left-mobile { align-items: flex-start; text-align: left; margin-inline: 0; }
}

/* ---------- button/M (398:7194) and button/S (398:7195) ---------- */
.btn {
	--icon-size: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 17px 19px;               /* 18/20 minus the 1px border */
	border: 1px solid var(--c-border-light);
	border-radius: var(--r-m);
	background: var(--c-bg-white);
	color: var(--c-text-dark);
	font: var(--f-subtitle-xl);
	white-space: nowrap;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn:hover { background: var(--c-border-dark); border-color: var(--c-border-dark); color: var(--c-text-white); }

.btn--filled { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-text-white); }
.btn--filled:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }

.btn--selected { border-color: var(--c-primary); color: var(--c-primary); }

.btn--passive,
.btn[aria-disabled="true"] { background: var(--c-text-grey); border-color: var(--c-text-grey); color: var(--c-text-white); pointer-events: none; }

.btn--s { padding: 15px; font: var(--f-subtitle-l); }
.btn--block { width: 100%; }

/* ---------- tag/small (229:222) ---------- */
.tag {
	--icon-size: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 7px 9px;
	border: 1px solid var(--c-border-dark);
	border-radius: var(--r-pill);
	font: var(--f-subtitle-s);
	color: var(--c-text-dark);
	white-space: nowrap;
}

.tag--filled { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-text-white); }
.tag--iconly { gap: 6px; }
.tag--iconly .icon:first-child { --icon-size: 16px; color: var(--c-secondary); }
.tag--iconly .icon:last-child { --icon-size: 14px; }

/* ---------- tag/medium (825:11259) ---------- */
.pill {
	--icon-size: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	height: 44px;
	padding: 0 15px;
	border: 1px solid var(--c-purple-soft);
	border-radius: var(--r-pill);
	background: rgba(255, 255, 255, .3);
	color: var(--c-primary);
	font: var(--f-subtitle-m);
	white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}

.pill:hover,
.pill.is-selected,
.pill[aria-pressed="true"],
.pill[aria-selected="true"] { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-text-white); }

/* ---------- button/textlink (1429:37455) ---------- */
.textlink {
	--icon-size: 12px;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	color: var(--c-primary);
	font: var(--f-subtitle-s);
}

.textlink:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- desktop/segmentedcontrol (2016:60440) ---------- */
.segmented {
	position: relative;
	display: inline-flex;
	padding: 8px;
	gap: 0;
	border-radius: var(--r-m);
	background: var(--c-bg-segment);
	box-shadow: var(--shadow-inset);
}

.segmented__item {
	min-width: 160px;
	height: 50px;
	padding: 0 16px;
	border: 1px solid transparent;
	border-radius: var(--r-s);
	font: var(--f-body-s);
	color: var(--c-text-dark);
	white-space: nowrap;
}

.segmented__item[aria-selected="true"] {
	background: var(--c-bg-white);
	border-color: var(--c-border-light);
	box-shadow: var(--shadow-control);
	font: var(--f-subtitle-l);
}

@media (max-width: 767px) {
	.segmented { display: flex; width: 100%; }
	.segmented__item { flex: 1; min-width: 0; padding: 0 8px; }
}

/* ---------- accordion/FAQ (373:8687) ---------- */
.accordion {
	border: 1px solid var(--c-border-light);
	border-radius: var(--r-m);
	background: var(--c-bg-white);
}

.accordion__summary {
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	padding: 20px;
	font: var(--f-subtitle-l);
	text-align: left;
	list-style: none;
	cursor: pointer;
}

.accordion__summary::-webkit-details-marker { display: none; }
.accordion__question { flex: 1; min-width: 0; }
.accordion__summary .icon { transition: transform .2s ease; }
.accordion[open] .accordion__summary .icon { transform: rotate(180deg); }

/* Open: question stays subtitle/L; answer body/XS (Figma 373:8687), 16 under the question. */
.accordion__answer {
	margin-top: -4px;
	padding: 0 20px 20px;
	font: var(--f-body-xs);
	color: var(--c-text-dark);
}

.accordion__answer > * + * { margin-top: 16px; }
.accordion__answer a { color: var(--c-primary); }

.accordion__answer ul li::marker { color: var(--c-primary); }

/* ---------- button/back: round slider arrows (40x40) ---------- */
.arrows { display: flex; gap: 16px; }

.arrow {
	--icon-size: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--c-border-light);
	border-radius: var(--r-pill);
	background: var(--c-bg-white);
	color: var(--c-text-dark);
	transition: background-color .15s ease, color .15s ease;
}

.arrow:hover { background: var(--c-border-dark); color: var(--c-text-white); }
.arrow[aria-disabled="true"] { opacity: .35; pointer-events: none; }

/* Horizontal scroller shared by sliders: native scroll, arrows step it. */
.scroller {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.scroller::-webkit-scrollbar { display: none; }
.scroller > * { flex: none; scroll-snap-align: start; }

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

/* A section that continues the one above it (SCF "join_previous"): 24px instead of the section gap. */
.section--join { margin-top: calc(24px - var(--section-gap)); }

/* ---------- Drag to scroll (mouse) on horizontal strips: HOMZ.behave.dragScroll ---------- */
.is-drag-scroll { cursor: grab; }
.is-dragging { cursor: grabbing; user-select: none; scroll-snap-type: none !important; scroll-behavior: auto !important; }
.is-dragging * { pointer-events: none; }

/* ---------- Shared popup (lightbox): Figma 3006:77686 / 2373:54990, mobile 3006:78493 ---------- */
.has-lightbox { overflow: hidden; }

.lightbox {
	width: min(720px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100dvh - 32px);
	padding: 0;
	border: 0;
	border-radius: var(--r-l);
	background: var(--c-bg-white);
	color: var(--c-text-dark);
	box-shadow: 0 24px 64px rgba(9, 3, 19, .25);
}

/* "background blur" 3006:77649 / 2298:50239: #090313 at 50% with a 2px background blur. */
.lightbox::backdrop {
	background: rgba(9, 3, 19, .5);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.lightbox__box {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 24px 80px 32px;
}

.lightbox__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.lightbox__title { font: var(--f-header-s); }

.lightbox__close {
	--icon-size: 28px;
	display: inline-flex;
	margin-right: -48px;
	color: var(--c-text-dark);
}

.lightbox__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	border: 1px solid var(--c-border-light);
	background: var(--c-bg-white);
}

.lightbox__img {
	display: block;
	width: 100%;
	max-height: calc(100dvh - 240px);
	object-fit: contain;
}

.lightbox__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.lightbox__nav[hidden] { display: none; }
.lightbox__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.lightbox__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--c-border-light);
}

.lightbox__dot[aria-current="true"] { background: var(--c-secondary); }

@media (max-width: 767px) {
	.lightbox { width: calc(100vw - 24px); }
	.lightbox__box { padding: 20px 16px 24px; gap: 16px; }
	.lightbox__close { margin-right: 0; }
	.lightbox__title { font: var(--f-header-xs); }
}
