/* EmailFinderOnline base: tokens, reset, layout, shared components.
   Rules live in design-system/MASTER.md. Page CSS uses these tokens, never raw hex. */

/* Fonts (self-hosted, no third-party request) */
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
	--ink: #161618;
	--text: #475467;
	--muted: #5B6474;
	--brand: #4875FF;
	--brand-strong: #2D5BFF;
	--brand-soft: #EEF2FF;
	--bg: #FFFFFF;
	--surface: #F7F8FA;
	--border: #E4E7EC;
	--success: #12B76A;
	--warning: #F79009;
	--danger: #D92D20;

	--r-sm: 8px;
	--r-md: 12px;
	--r-lg: 20px;
	--r-xl: 32px;
	--r-pill: 999px;

	--shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
	--shadow-md: 0 8px 24px -6px rgba(16, 24, 40, .12);
	--shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .18);

	--s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
	--s-7: 40px; --s-8: 48px; --s-9: 64px; --s-10: 80px; --s-11: 96px; --s-12: 128px;

	--fs-hero: clamp(2.5rem, 1.6rem + 4.2vw, 4.5rem);
	--fs-h1: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);
	--fs-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
	--fs-h3: clamp(1.25rem, 1.15rem + .4vw, 1.5rem);
	--fs-body: clamp(1rem, .96rem + .2vw, 1.125rem);
	--fs-sm: .875rem;

	--pad-x: clamp(16px, 5vw, 96px);
	--pad-y: clamp(56px, 8vw, 120px);
	--header-h: 72px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	font-size: var(--fs-body);
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--brand-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.01em; }
p { text-wrap: pretty; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-soft); color: var(--ink); }

.screen-reader-text, .sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 1000; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); }
.skip-link:focus { top: 16px; }

/* Layout */
.section { padding: var(--pad-y) var(--pad-x); }
.section--surface { background: var(--surface); }
.section--dark { background: var(--ink); color: rgba(255, 255, 255, .78); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a:not(.btn) { color: var(--brand); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section-head { display: grid; justify-items: center; text-align: center; gap: var(--s-4); margin-bottom: clamp(32px, 5vw, 64px); }
.section-head p { font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.section--dark .section-head p { color: rgba(255, 255, 255, .72); }
.grid-auto { display: grid; gap: clamp(16px, 2vw, 24px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }

/* Badge */
.badge {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 6px 14px; border-radius: var(--r-pill);
	background: var(--brand-soft); color: var(--brand-strong);
	font-size: var(--fs-sm); font-weight: 600; line-height: 1.2;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.section--dark .badge { background: rgba(72, 117, 255, .16); color: #A9BEFF; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 20px; border-radius: var(--r-pill);
	font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
	border: 1px solid transparent; cursor: pointer;
	transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--brand-strong); color: #fff; box-shadow: 0 6px 16px -6px rgba(45, 91, 255, .55); }
.btn--primary:hover { background: #1F4AE8; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2A2A2E; }
.btn--ghost { background: var(--bg); color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--ink); }
.section--dark .btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .28); }
.section--dark .btn--ghost:hover { border-color: #fff; }
.btn--lg { min-height: 52px; padding: 14px 28px; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* Cards */
.card {
	background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg);
	padding: clamp(20px, 2.5vw, 32px); box-shadow: var(--shadow-sm);
	transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
a.card, .card--hover { text-decoration: none; color: inherit; }
a.card:hover, .card--hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #D0D5DD; }
.icon-tile {
	display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-md);
	background: var(--brand-soft); color: var(--brand-strong);
	flex: none; /* never let flex rows squash the tile (About page bug) */
}
.icon-tile svg { width: 24px; height: 24px; flex: none; }
/* Inline icons keep their size next to long text in any flex or grid row. */
svg.icon { flex-shrink: 0; }

/* Forms */
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.field .hint { font-size: var(--fs-sm); color: var(--muted); }
.input, .field input, .field textarea, .field select {
	width: 100%; min-height: 48px; padding: 12px 16px;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
	color: var(--ink); font-size: 1rem; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus {
	outline: none; background: var(--bg); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(72, 117, 255, .18);
}
.form-error { color: var(--danger); font-size: var(--fs-sm); font-weight: 500; }
.form-notice { padding: 12px 16px; border-radius: var(--r-md); font-size: var(--fs-sm); }
.form-notice--error { background: #FEF3F2; color: #B42318; }
.form-notice--success { background: #ECFDF3; color: #067647; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
/* Logged-in editors see the WP admin bar (32px, 46px on small screens): sit below it. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header__inner {
	display: flex; align-items: center; gap: var(--s-5); min-height: var(--header-h); padding-inline: var(--pad-x);
}
.site-logo { display: inline-flex; flex: none; }
.site-logo img { width: 160px; height: auto; }
.site-nav { margin-inline: auto; }
.site-nav ul { display: flex; gap: clamp(4px, 1vw, 12px); list-style: none; padding: 0; }
.site-nav a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill);
	color: var(--ink); text-decoration: none; font-weight: 500; font-size: .9375rem; white-space: nowrap;
	transition: background-color .2s, color .2s;
}
.site-nav a:hover { background: var(--surface); }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a, .site-nav .current-page-ancestor > a { color: var(--brand-strong); background: var(--brand-soft); }
.site-header__actions { display: flex; align-items: center; gap: var(--s-2); }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: var(--r-md); place-items: center; color: var(--ink); }
.nav-toggle svg { width: 24px; height: 24px; }
.site-nav__mobile-actions { display: none; }

@media (max-width: 1024px) {
	.nav-toggle { display: grid; margin-left: auto; }
	.site-header__actions { display: none; }
	.site-nav {
		position: fixed; inset: var(--header-h) 0 0 0; margin: 0; padding: var(--s-5) var(--pad-x) var(--s-8);
		background: var(--bg); overflow-y: auto; display: flex; flex-direction: column; gap: var(--s-5);
		opacity: 0; visibility: hidden; transform: translateY(-8px);
		transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
	}
	.site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
	.site-nav ul { flex-direction: column; gap: 4px; }
	.site-nav a { min-height: 52px; font-size: 1.125rem; padding: 0 16px; }
	.site-nav__mobile-actions { display: grid; gap: var(--s-3); }
	body.nav-open { overflow: hidden; }
	/* backdrop-filter makes the header the containing block of the fixed menu and clips it: drop it while open. */
	body.nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
}

/* Footer */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .7); padding: clamp(56px, 7vw, 96px) var(--pad-x) var(--s-6); }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.site-footer__top { display: grid; gap: clamp(32px, 5vw, 64px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.site-footer__brand { display: grid; gap: var(--s-4); align-content: start; max-width: 36ch; }
.site-footer__brand img { width: 160px; }
.site-footer__title { color: #fff; font-size: var(--fs-sm); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: var(--s-4); }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.site-footer__bottom {
	margin-top: clamp(40px, 6vw, 72px); padding-top: var(--s-5); border-top: 1px solid rgba(255, 255, 255, .12);
	display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; font-size: var(--fs-sm);
}

/* CTA band (shared on many pages) */
.cta-band {
	display: grid; gap: var(--s-5); justify-items: center; text-align: center;
	padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 80px); border-radius: var(--r-xl);
	background: radial-gradient(120% 140% at 50% 0%, #2D5BFF 0%, #1B2B6B 55%, var(--ink) 100%); color: rgba(255, 255, 255, .8);
}
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 56ch; }
.cta-band .btn--primary { background: #fff; color: var(--ink); box-shadow: none; }
.cta-band .btn--primary:hover { background: var(--brand-soft); }

/* Page hero (inner pages) */
.page-hero { padding: clamp(56px, 8vw, 112px) var(--pad-x) clamp(32px, 5vw, 64px); text-align: center; display: grid; justify-items: center; gap: var(--s-4); }
.page-hero p { max-width: 60ch; color: var(--muted); font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); }

/* FAQ */
.faq { display: grid; gap: var(--s-3); max-width: 880px; margin-inline: auto; }
.faq details { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 0 var(--s-5); }
.faq summary {
	list-style: none; cursor: pointer; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
	font-weight: 600; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; font-weight: 400; color: var(--brand-strong); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--s-5); color: var(--text); }

/* Reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
	.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
	.reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Notifications (toasts). API: window.efoNotify(type, message, { timeout }) in scripts/main.js */
.toast-region {
	position: fixed; z-index: 1000; right: clamp(12px, 3vw, 24px); bottom: clamp(12px, 3vw, 24px);
	display: grid; gap: var(--s-3); width: min(420px, calc(100vw - 24px)); pointer-events: none;
}
.toast {
	pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-3); align-items: start;
	padding: 14px 16px; border-radius: var(--r-md); background: var(--bg); color: var(--ink);
	border: 1px solid var(--border); border-left: 4px solid var(--brand); box-shadow: var(--shadow-lg);
	font-size: .9375rem; line-height: 1.45;
	animation: toast-in .25s var(--ease);
}
.toast.is-leaving { animation: toast-out .18s ease-in forwards; }
.toast__icon { width: 20px; height: 20px; margin-top: 1px; }
.toast__title { font-weight: 700; display: block; }
.toast__close { width: 32px; height: 32px; margin: -6px -6px 0 0; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); }
.toast__close:hover { background: var(--surface); color: var(--ink); }
.toast__close svg { width: 16px; height: 16px; }
.toast--success { border-left-color: var(--success); }
.toast--success .toast__icon { color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--error .toast__icon { color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }
.toast--warning .toast__icon { color: var(--warning); }
.toast--info .toast__icon { color: var(--brand-strong); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@media (max-width: 600px) { .toast-region { left: 12px; right: 12px; width: auto; } }
