/* Emyat v2 — design tokens, reset and shared components. See DESIGN.md. Owned by the foundation, not by page areas. */

:root {
	--e-primary: #2563eb;
	--e-primary-700: #1d4ed8;
	--e-primary-50: #eff4ff;
	--e-ink: #0f172a;
	--e-text: #334155;
	--e-muted: #64748b;
	--e-line: #e2e8f0;
	--e-bg: #ffffff;
	--e-bg-soft: #f6f8fc;
	--e-dark: #0b1530;
	--e-success: #16a34a;
	--e-success-50: #ecfdf3;
	--e-danger: #dc2626;
	--e-danger-50: #fef2f2;
	--e-star: #f59e0b;

	--e-radius-sm: 8px;
	--e-radius-md: 12px;
	--e-radius-lg: 16px;
	--e-radius-xl: 24px;
	--e-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
	--e-shadow-md: 0 8px 24px rgba(15, 23, 42, .08), 0 2px 6px rgba(15, 23, 42, .06);

	--e-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--e-s1: 4px; --e-s2: 8px; --e-s3: 12px; --e-s4: 16px; --e-s5: 20px; --e-s6: 24px;
	--e-s8: 32px; --e-s10: 40px; --e-s12: 48px; --e-s16: 64px; --e-s20: 80px; --e-s24: 96px;
	--e-container: 1200px;
	--e-narrow: 720px;
	--e-header-h: 64px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--e-header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
	margin: 0;
	font-family: var(--e-font);
	font-size: 17px;
	line-height: 1.6;
	color: var(--e-text);
	background: var(--e-bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--e-primary); text-decoration: none; }
a:hover { color: var(--e-primary-700); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--e-primary); outline-offset: 2px; }
.e-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; }
.e-skip { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--e-ink); color: #fff; padding: 10px 16px; border-radius: var(--e-radius-sm); }
.e-skip:focus { top: 8px; color: #fff; }

/* ---------- layout ---------- */
.e-container { width: 100%; max-width: calc(var(--e-container) + 2 * var(--e-s5)); margin: 0 auto; padding: 0 var(--e-s5); }
.e-container--narrow { max-width: calc(var(--e-narrow) + 2 * var(--e-s5)); }
.e-section { padding: var(--e-s16) 0; }
.e-section--tight { padding: var(--e-s10) 0; }
.e-section--soft { background: var(--e-bg-soft); }
.e-section--dark { background: var(--e-dark); color: #cbd5e1; }
.e-section--dark .e-h2, .e-section--dark .e-h3 { color: #fff; }
@media (min-width: 960px) { .e-section { padding: var(--e-s24) 0; } }
.e-stack { display: flex; flex-direction: column; gap: var(--e-s4); }
.e-stack--lg { gap: var(--e-s8); }
.e-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-s3); }
.e-grid { display: grid; gap: var(--e-s6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
	.e-grid--2, .e-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.e-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
	.e-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.e-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
main { display: block; min-height: 50vh; }

/* ---------- type ---------- */
.e-eyebrow { display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--e-primary); text-transform: none; }
.e-h1, .e-h2, .e-h3 { color: var(--e-ink); font-weight: 750; letter-spacing: -.02em; text-wrap: balance; }
.e-h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.12; }
.e-h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; }
.e-h3 { font-size: 20px; line-height: 1.35; letter-spacing: -.01em; }
.e-lead { font-size: clamp(17px, 2vw, 20px); line-height: 1.55; color: var(--e-text); max-width: 60ch; }
.e-muted { color: var(--e-muted); }
.e-small { font-size: 14px; }
.e-section-head { display: flex; flex-direction: column; gap: var(--e-s3); margin-bottom: var(--e-s10); max-width: 760px; }
.e-section-head--center { margin-left: auto; margin-right: auto; text-align: center; align-items: center; }

/* ---------- buttons ---------- */
.e-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--e-s2);
	min-height: 44px; padding: 10px 20px; border-radius: var(--e-radius-md);
	border: 1px solid transparent; font-size: 16px; font-weight: 650; line-height: 1.2;
	text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.e-btn:active { transform: translateY(1px); }
.e-btn--primary { background: var(--e-primary); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .25); }
.e-btn--primary:hover { background: var(--e-primary-700); color: #fff; }
.e-btn--secondary { background: var(--e-primary-50); color: var(--e-primary-700); }
.e-btn--secondary:hover { background: #dbe7ff; color: var(--e-primary-700); }
.e-btn--ghost { background: transparent; color: var(--e-ink); border-color: var(--e-line); }
.e-btn--ghost:hover { border-color: #cbd5e1; background: var(--e-bg-soft); color: var(--e-ink); }
.e-btn--light { background: #fff; color: var(--e-ink); }
.e-btn--light:hover { background: #eef2f7; color: var(--e-ink); }
.e-btn--lg { min-height: 54px; padding: 14px 28px; font-size: 17px; border-radius: var(--e-radius-lg); }
.e-btn--block { display: flex; width: 100%; }
.e-btn svg { flex: none; }

/* ---------- cards, chips ---------- */
.e-card { background: #fff; border: 1px solid var(--e-line); border-radius: var(--e-radius-lg); padding: var(--e-s6); }
.e-card--soft { background: var(--e-bg-soft); border-color: transparent; }
.e-card--link { display: block; color: inherit; transition: box-shadow .15s, border-color .15s, transform .15s; }
.e-card--link:hover { color: inherit; border-color: #cbd5e1; box-shadow: var(--e-shadow-md); transform: translateY(-2px); }
.e-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--e-primary-50); color: var(--e-primary-700); font-size: 14px; font-weight: 600; line-height: 1.5; }
.e-chip--success { background: var(--e-success-50); color: #15803d; }
.e-chip--danger { background: var(--e-danger-50); color: #b91c1c; }
.e-chip--neutral { background: var(--e-bg-soft); color: var(--e-text); }
.e-badge-num { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--e-primary); color: #fff; font-weight: 750; font-size: 18px; }

/* ---------- store badges (emy_store_buttons): official App Store / Google Play badges ---------- */
.e-stores { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-s3); }
.e-store { display: inline-block; border-radius: 10px; line-height: 0; transition: transform .15s, box-shadow .15s; }
.e-store:hover { transform: translateY(-1px); box-shadow: var(--e-shadow-sm); }
.e-store img { width: 150px; height: auto; }
@media (max-width: 380px) { .e-store img { width: 136px; } }

/* ---------- rating (emy_stars) ---------- */
.e-stars { position: relative; display: inline-block; font-size: 0; line-height: 0; color: #e2e8f0; }
.e-stars__fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--e-star); white-space: nowrap; }
.e-stars svg { display: inline-block; }

/* ---------- forms (CF7 and others) ---------- */
.e-form label { display: block; font-size: 15px; font-weight: 600; color: var(--e-ink); margin-bottom: 6px; }
.e-form input[type=text], .e-form input[type=email], .e-form input[type=tel], .e-form textarea, .e-form select {
	width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: var(--e-radius-md); background: #fff;
}
.e-form textarea { min-height: 140px; resize: vertical; }
.e-form input:focus, .e-form textarea:focus, .e-form select:focus { outline: none; border-color: var(--e-primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.e-form input[type=submit], .e-form button[type=submit] { min-height: 48px; padding: 12px 24px; border: 0; border-radius: var(--e-radius-md); background: var(--e-primary); color: #fff; font-weight: 650; }
.e-form .wpcf7-not-valid-tip { color: var(--e-danger); font-size: 14px; }
.e-form .wpcf7-response-output { border-radius: var(--e-radius-md); margin: var(--e-s4) 0 0 !important; padding: 12px 14px !important; }

/* ---------- prose: article and page text from the editor ---------- */
.e-prose { color: var(--e-text); font-size: 18px; line-height: 1.7; }
.e-prose > * + * { margin-top: 1em; }
.e-prose h2 { margin-top: 1.8em; font-size: clamp(22px, 3vw, 28px); line-height: 1.25; color: var(--e-ink); font-weight: 750; letter-spacing: -.01em; }
.e-prose h3 { margin-top: 1.5em; font-size: 20px; line-height: 1.35; color: var(--e-ink); font-weight: 700; }
.e-prose h4 { margin-top: 1.3em; font-size: 18px; color: var(--e-ink); font-weight: 700; }
.e-prose ul, .e-prose ol { padding-left: 1.3em; }
.e-prose ul { list-style: disc; }
.e-prose ol { list-style: decimal; }
.e-prose li + li { margin-top: .4em; }
.e-prose a { text-decoration: underline; text-underline-offset: 2px; }
.e-prose b, .e-prose strong { color: var(--e-ink); font-weight: 700; }
.e-prose img { border-radius: var(--e-radius-md); }
.e-prose blockquote { padding: var(--e-s4) var(--e-s5); border-left: 4px solid var(--e-primary); background: var(--e-bg-soft); border-radius: 0 var(--e-radius-md) var(--e-radius-md) 0; }
.e-prose .table_wrap { overflow-x: auto; }
.e-prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.e-prose th, .e-prose td { border: 1px solid var(--e-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.e-prose th { background: var(--e-bg-soft); color: var(--e-ink); font-weight: 650; }
.e-prose .emy_facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.e-prose .emy_fact { background: var(--e-primary-50); border-radius: var(--e-radius-lg); padding: 16px 18px; }
.e-prose .emy_fact b { display: block; font-size: 28px; line-height: 1.15; color: var(--e-primary-700); }
.e-prose .emy_fact span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.4; color: var(--e-text); }
.e-prose .emy_source { font-size: 14px; color: var(--e-muted); }
.e-prose > :first-child { margin-top: 0; }
