/* ============================================================
	 EasyAudit - base.css
	 Variables · Reset · Layout · Typography · Components · Utilities
	 ============================================================ */

/* --- Start: Variables --- */
:root {
	/* Colour palette */
	--yellow-rgb:  255 211 0;
	--yellow:      rgb(var(--yellow-rgb));
	--yellow-deep: #F2C500;
	--yellow-hover: #FFDD33;
	--ink:         #1A1A1C;
	--paper-rgb:   250 250 247;
	--paper:       #FAFAF7;
	--surface:     #FFFFFF;
	--surface-contrast: #000000;
	--line-rgb:    229 227 218;
	--line:        #E5E3DA;
	--muted-rgb:   107 107 107;
	--muted:       #6B6B6B;
	--error:       #ff3b3b;

	/* Font families */
	--ff-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--ff-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
	--ff-display: 'Space Grotesk', 'Inter', sans-serif;

	/* Heading tracking */
	--ls-heading-hero: -0.025em;
	--ls-heading:      -0.02em;
	--ls-heading-tight: -0.01em;

	/* Font-size scale */
	--fs-xsmall: 14px;
	--fs-small: 16px;
	--fs-normal: 20px;

	--fs-medium: clamp(20px, 2vw, 28px);
	--fs-large: clamp(32px, calc(20px + 2.5vw), 56px);
	--fs-xlarge: clamp(40px, 4.8vw, 72px);
	--fs-xxlarge: clamp(40px, 6.5vw, 108px);
	--fs-huge: clamp(56px, calc(24px + 7.5vw), 160px);

	--fs-dropcap: 5em;

	/* Spacing */
	--shell-max:  1320px;
	--shell-pad:  32px;
	--space-2xs:  4px;
	--space-xs:   8px;
	--space-sm:   12px;
	--space-md:   16px;
	--space-lg:   24px;
	--space-xl:   32px;
	--space-2xl:  40px;
	--space-3xl:  48px;
	--space-4xl:  56px;
	--space-5xl:  64px;
	--space-6xl:  80px;
	--space-7xl:  96px;
	--space-8xl:  120px;

	/* Shape, shadows and motion */
	--radius-xs:  4px;
	--radius-control:  6px;
	--radius-sm:  8px;
	--radius-md:  12px;
	--radius-lg:  14px;
	--radius-xl:  16px;
	--radius-pill: 999px;
	--header-height: 76px;
	--shadow-card: 0 1px 0 rgba(0,0,0,.04), 0 8px 30px -12px rgba(0,0,0,.12);
	--shadow-panel: 0 30px 60px -20px rgba(0,0,0,.4);
	--shadow: var(--shadow-card);
	--motion-fast: 0.15s ease;
	--motion-base: 0.2s ease;
	--mark-yellow: linear-gradient(180deg, transparent 0 60%, var(--yellow) 60% 96%, transparent 96%);
}
/* --- End: Variables --- */

/* --- Start: Reset --- */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html, body {
	color: var(--ink);
	font-family: var(--ff-sans);
	font-size: var(--fs-small);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

html {
	background: var(--ink);
	scroll-padding-top: var(--header-height);
	overflow-y: scroll;
}

body {
	background: var(--ink);
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	display: block;
	max-width: 100%;
}

ul {
	list-style: none;
}

button {
	font: inherit;
	border: none;
	background: none;
	cursor: pointer;
	color: inherit;
}
/* --- End: Reset --- */

/* --- Start: Layout --- */
.wrap {
	max-width: var(--shell-max);
	margin: 0 auto;
	padding: 0 var(--shell-pad);
}

body > :where(main, section) {
	background: var(--surface);
}

@media (max-width: 640px) {
	.wrap { padding: 0 20px; }
}
/* --- End: Layout --- */

/* --- Start: Typography --- */
.text-mark {
	font-weight: 600;
	background: var(--mark-yellow);
	padding: 0 0.12em;
}

.hero h1 .hl,
.story-hero h1 .hl {
	background: var(--mark-yellow);
	padding: 0 0.12em;
}

.price {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	color: var(--ink);
	line-height: 1;
}

.price strong {
	font-family: var(--ff-display);
	font-weight: 700;
	font-size: var(--fs-large);
	letter-spacing: 0;
	line-height: 1;
}

.price small {
	font-family: var(--ff-mono);
	font-size: var(--fs-xsmall);
	font-weight: 500;
	letter-spacing: 0.05em;
	line-height: 1;
	color: var(--ink);
	text-transform: uppercase;
}

/* --- End: Typography --- */

/* --- Start: Product badges --- */
.product-badge {
	display: inline-block;
	font-family: var(--ff-display);
	font-weight: 700;
	font-size: var(--fs-small);
	letter-spacing: 0.16em;
	line-height: 1;
	text-transform: uppercase;
	background: var(--ink);
	color: var(--yellow);
	padding: 10px 12px 8px;
	border-radius: var(--radius-sm);
}
/* --- End: Product badges --- */

/* --- Start: Buttons --- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 46px;
	padding: 0 22px;
	border-radius: var(--radius-sm);
	font-weight: 600;
	font-size: var(--fs-small);
	line-height: 1;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform var(--motion-fast), background var(--motion-fast), color var(--motion-fast);
	white-space: nowrap;
}

button .arr,
.btn .arr {
	flex: none;
}

.btn:hover {
	transform: translateY(-1px);
}

.btn-yellow {
	background: var(--yellow);
	color: var(--ink);
	border-color: var(--yellow-deep);
}

.btn-yellow:hover {
	background: var(--yellow-hover);
}

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

.btn-ghost:hover {
	background: var(--ink);
	color: var(--paper);
}

.btn-ink {
	background: var(--ink);
	color: var(--paper);
}

.btn-ink:hover {
	background: var(--ink);
}

.btn .arr {
	display: inline-block;
	transition: transform var(--motion-base);
}

.btn:hover .arr {
	transform: translateX(3px);
}
/* --- End: Buttons --- */

/* --- Start: Action links --- */
.action-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: var(--fs-small);
	font-weight: 600;
	color: var(--ink);
	border-bottom: 2px solid var(--yellow);
	align-self: flex-start;
	padding-bottom: 2px;
}
/* --- End: Action links --- */

/* --- Start: Topbar --- */
.topbar {
	background: var(--ink);
	color: var(--line);
	font-family: var(--ff-mono);
	font-size: var(--fs-xsmall);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.topbar .wrap {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 34px;
	gap: 24px;
}

.topbar a {
	color: var(--surface);
}

.topbar-right {
	display: flex;
	gap: 24px;
	align-items: center;
}

.topbar-right span {
	opacity: 0.85;
}

@media (max-width: 820px) {
	.topbar-right { display: none; }
}
/* --- End: Topbar --- */

/* --- Start: Nav --- */
.main-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgb(var(--paper-rgb) / .92);
	backdrop-filter: saturate(1.2) blur(10px);
	border-bottom: 1px solid var(--line);
}

.nav-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-height);
	gap: 24px;
}

.brand img {
	height: 44px;
	width: auto;
}

.nav-links {
	display: none;
	gap: 36px;
	align-items: center;
	flex: 1;
	justify-content: center;
}

.nav-links a,
.nav-cta-link {
	font-size: var(--fs-small);
	font-weight: 500;
	color: var(--ink);
	position: relative;
	padding: 6px 0;
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after,
.nav-cta-link:hover::after,
.nav-cta-link[aria-current="page"]::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 8px;
	background: var(--yellow);
	z-index: -1;
}

.nav-cta {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-shrink: 0;
}

.nav-cta-link {
	margin-right: 14px;
	white-space: nowrap;
}

.nav-cta .btn {
	font-size: var(--fs-small);
}

.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	width: 32px;
	padding: 4px;
}

.nav-toggle span {
	display: block;
	height: 2px;
	background: var(--ink);
	border-radius: 2px;
	transition: transform var(--motion-base), opacity var(--motion-base);
}

@media (max-width: 820px) {
	.nav-links {
	  display: none;
	  position: absolute;
	  top: 100%;
	  left: 0;
	  right: 0;
	  background: var(--paper);
	  border-bottom: 1px solid var(--line);
	  flex-direction: column;
	  padding: 20px;
	  gap: 16px;
	  align-items: flex-start;
	  justify-content: flex-start;
	}

	.nav-links.open {
	  display: flex;
	}

	.nav-toggle {
	  display: flex;
	}

	.nav-cta-link {
	  display: none;
	}

	.main-nav {
	  position: sticky;
	}
}

@media (max-width: 640px) {
	.nav-cta .btn-ghost { display: none; }
}
/* --- End: Nav --- */

/* --- Start: Footer --- */
.site-footer {
	background: var(--ink);
	color: var(--line);
	padding: 72px 0 32px;
}

.foot-grid {
	display: grid;
	grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(0, 1fr));
	gap: 32px;
	padding-bottom: 56px;
}

.foot-brand p {
	margin-top: 16px;
	font-size: var(--fs-normal);
	line-height: 1.45;
	color: var(--paper);
	max-width: 270px;
}

.foot-brand em {
	display: block;
	width: fit-content;
	margin-top: 4px;
	font-style: normal;
	background: var(--yellow);
	color: var(--ink);
	padding: 0 6px;
}

.foot-col h6 {
	font-family: var(--ff-mono);
	font-size: var(--fs-xsmall);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 16px;
	font-weight: 500;
}

.foot-col ul {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.foot-col ul li {
	font-size: var(--fs-normal);
	line-height: 1.45;
}

.foot-col ul li a {
	color: var(--line);
	transition: color var(--motion-fast);
}

.foot-col ul li a:hover {
	color: var(--yellow);
}

.foot-legal {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 24px;
	font-family: var(--ff-mono);
	font-size: var(--fs-xsmall);
	color: var(--muted);
	gap: 24px;
	flex-wrap: wrap;
}

.foot-legal-links {
	display: flex;
	gap: 20px;
}

.foot-legal-links a {
	color: var(--muted);
	transition: color var(--motion-fast);
}

.foot-legal-links a:hover {
	color: var(--yellow);
}

.language-switcher {
	position: relative;
	color: var(--muted);
}

.language-switcher summary {
	list-style: none;
	cursor: pointer;
	transition: color var(--motion-fast);
}

.language-switcher summary::-webkit-details-marker {
	display: none;
}

.language-switcher summary::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 8px;
	border-top: 1px solid currentColor;
	border-left: 1px solid currentColor;
	transform: translateY(2px) rotate(45deg);
	transition: transform var(--motion-fast);
}

.language-switcher summary:hover,
.language-switcher[open] summary,
.language-switcher:hover summary {
	color: var(--yellow);
}

.language-switcher[open] summary::after,
.language-switcher:hover summary::after {
	transform: translateY(5px) rotate(45deg);
}

.language-switcher ul {
	display: none;
	position: absolute;
	right: 0;
	bottom: calc(100% + 12px);
	z-index: 20;
	width: max-content;
	min-width: 240px;
	max-width: min(320px, calc(100vw - 40px));
	padding: 8px;
	background: var(--paper);
	border: 1px solid rgba(255, 255, 255, 0.18);
	box-shadow: var(--shadow-panel);
	border-radius: var(--radius-sm);
}

.language-switcher[open] ul,
.language-switcher:hover ul {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.language-switcher li {
	font-size: var(--fs-xsmall);
}

.language-switcher li a {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 12px;
	color: var(--ink);
	border-radius: var(--radius-sm);
}

.language-switcher li a:hover {
	background: var(--yellow);
	color: var(--ink);
}

.language-switcher small {
	font-family: var(--ff-sans);
	font-size: var(--fs-xsmall);
	color: var(--muted);
}

@media (max-width: 1024px) {
	.foot-grid {
	  grid-template-columns: 1fr 1fr 1fr;
	  gap: 40px;
	}
	.foot-brand {
	  grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	.foot-grid {
	  grid-template-columns: 1fr 1fr;
	}

	.foot-legal-links {
	  width: 100%;
	  justify-content: space-between;
	}

	.language-switcher ul {
	  right: auto;
	  left: 50%;
	  transform: translateX(-50%);
	}
}
/* --- End: Footer --- */


/* --- Start: Form shared styles --- */
.field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 10px;
}

.field-row > :only-child {
	grid-column: 1 / -1;
}

.field-control {
	position: relative;
}

.field-control.has-tooltip input {
	padding-right: 48px;
}

.field-info {
	position: absolute;
	right: 14px;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 1px solid rgb(var(--line-rgb) / .28);
	border-radius: 50%;
	transform: translateY(-50%);
	font-family: var(--ff-mono);
	font-size: var(--fs-xsmall);
	color: var(--paper);
	cursor: help;
}

.field-info::after {
	content: attr(aria-label);
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	width: max-content;
	max-width: 220px;
	padding: 8px 10px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink);
	font-family: var(--ff-sans);
	font-size: var(--fs-xsmall);
	line-height: 1.35;
	opacity: 0;
	pointer-events: none;
	transform: translateY(4px);
	transition: opacity var(--motion-base), transform var(--motion-base);
	z-index: 3;
}

.field-info:hover::after,
.field-info:focus::after {
	opacity: 1;
	transform: translateY(0);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input:not([type]),
select,
textarea {
	background: var(--ink);
	color: var(--paper);
	border: 1px solid rgb(var(--line-rgb) / .1);
	border-radius: var(--radius-sm);
	height: 56px;
	padding: 0 18px;
	font-family: inherit;
	font-size: var(--fs-small);
	outline: none;
	width: 100%;
	transition: background var(--motion-base), border-color var(--motion-base);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input:not([type]):focus,
select:focus,
textarea:focus {
	background: rgb(var(--yellow-rgb) / .06);
	border-color: var(--yellow);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
	border-color: var(--error);
}

input[type="checkbox"][aria-invalid="true"] {
	outline: 2px solid var(--error);
	outline-offset: 2px;
}

input[type="checkbox"] {
	width: 18px;
	height: 18px;
	flex: none;
	accent-color: var(--yellow);
	background: var(--ink);
	border: 1px solid rgb(var(--line-rgb) / .1);
	transition: background var(--motion-base), border-color var(--motion-base);
}

input[type="checkbox"]:focus {
	background: rgb(var(--yellow-rgb) / .06);
	border-color: var(--yellow);
}

input::placeholder {
	color: var(--muted);
}

textarea {
	min-height: 140px;
	padding: 16px 18px;
	resize: vertical;
}

.form-privacy {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: var(--fs-xsmall);
	color: var(--line);
	line-height: 1.5;
	margin: 14px 0 18px;
}

.form-privacy a {
	color: var(--yellow);
	border-bottom: 1px solid currentColor;
	padding-bottom: 1px;
}

.form-fallback-link {
	color: var(--yellow);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.form-privacy input[type="checkbox"] {
	margin-top: 2px;
}

.text-no-select {
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

@media (max-width: 640px) {
	.field-row { grid-template-columns: 1fr; }
}
/* --- End: Form shared styles --- */

/* --- Start: Checked pill --- */
.checked-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--ink);
	color: var(--paper);
	padding: 4px 12px 4px 6px;
	border-radius: var(--radius-pill);
	font-size: var(--fs-xsmall);
	font-weight: 600;
	vertical-align: middle;
}

.checked-pill .ck {
	width: 20px;
	height: 20px;
	background: var(--yellow);
	color: var(--ink);
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: var(--fs-xsmall);
	font-weight: 700;
}
/* --- End: Checked pill --- */
