/* ==========================================================================
   Elingua · main stylesheet
   Cream-paper editorial base, poster-scale chapters, gamified passport.
   Written with logical properties so one stylesheet serves RTL and LTR.
   ========================================================================== */

/* ---------- Fonts (self-hosted, subset by unicode-range) ---------- */

@font-face { font-family: "Vazirmatn"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/vazirmatn-arabic-wght-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Vazirmatn"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/vazirmatn-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Vazirmatn"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/vazirmatn-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Markazi Text"; font-style: normal; font-display: swap; font-weight: 400 700; src: url(../fonts/markazi-text-arabic-wght-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Markazi Text"; font-style: normal; font-display: swap; font-weight: 400 700; src: url(../fonts/markazi-text-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Markazi Text"; font-style: normal; font-display: swap; font-weight: 400 700; src: url(../fonts/markazi-text-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Lalezar"; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/lalezar-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Lalezar"; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/lalezar-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lalezar"; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/lalezar-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Nastaliq"; font-style: normal; font-display: swap; font-weight: 400 700; src: url(../fonts/noto-nastaliq-urdu-arabic-wght-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 300 700; src: url(../fonts/cormorant-garamond-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 300 700; src: url(../fonts/cormorant-garamond-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 300 700; src: url(../fonts/cormorant-garamond-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-display: swap; font-weight: 300 700; src: url(../fonts/cormorant-garamond-latin-ext-wght-italic.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-display: swap; font-weight: 300 700; src: url(../fonts/cormorant-garamond-latin-wght-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Oswald"; font-style: normal; font-display: swap; font-weight: 200 700; src: url(../fonts/oswald-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Oswald"; font-style: normal; font-display: swap; font-weight: 200 700; src: url(../fonts/oswald-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Oswald"; font-style: normal; font-display: swap; font-weight: 200 700; src: url(../fonts/oswald-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/big-shoulders-display-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/big-shoulders-display-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../fonts/manrope-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../fonts/manrope-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../fonts/manrope-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */

:root {
	--paper: #F4EEE3;
	--paper-2: #ECE3D3;
	--paper-3: #E1D6C2;
	--ink: #1A1714;
	--ink-2: #3B3631;
	--muted: #6F675B;
	--line: rgba(26, 23, 20, .14);
	--line-strong: rgba(26, 23, 20, .32);
	--cream: #F7F1E6;
	--accent: #D33B2A;
	--accent-ink: #FFF6EC;
	--sun: #F2C744;
	--blush: #EDC7C3;
	--burgundy: #6B1E2B;
	--gold: #C8A15A;

	--c-tr: #128079;
	--c-en: #1E3F2F;
	--c-de: #E2A72E;
	--c-ru: #2D4BB0;
	--c-fa: #EDC7C3;

	--f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--f-poster: "Big Shoulders Display", "Oswald", Impact, sans-serif;
	--f-latin-poster: "Big Shoulders Display", "Oswald", Impact, sans-serif;
	--f-callig: "Cormorant Garamond", Georgia, serif;

	--lh-body: 1.7;
	--lh-tight: 1;
	--poster-case: uppercase;
	--poster-lh: .84;
	--poster-track: -.01em;

	--fs-body: clamp(1rem, .96rem + .2vw, 1.125rem);
	--fs-small: .875rem;
	--fs-lead: clamp(1.125rem, 1rem + .55vw, 1.5rem);
	--fs-h1: clamp(2.8rem, 1.6rem + 5vw, 6.5rem);
	--fs-h2: clamp(2.3rem, 1.5rem + 3.4vw, 5rem);
	--fs-h3: clamp(1.35rem, 1.1rem + 1vw, 2rem);
	--fs-poster: clamp(5.2rem, .6rem + 20vw, 27rem);

	--wrap: 1380px;
	--gutter: clamp(16px, 4.2vw, 56px);
	--radius: 22px;
	--radius-lg: 34px;
	--rail: 72px;
	--edge: 10px;
	--mast-h: 124px;
	--top-pad: 0px;
	--ease: cubic-bezier(.22, 1, .36, 1);
	--ease-in-out: cubic-bezier(.65, 0, .35, 1);
	--shadow-obj: drop-shadow(0 28px 34px rgba(36, 22, 10, .22)) drop-shadow(0 6px 10px rgba(36, 22, 10, .14));
}

:root:lang(fa) {
	--f-body: "Vazirmatn", Tahoma, system-ui, sans-serif;
	--f-serif: "Markazi Text", "Vazirmatn", serif;
	--f-poster: "Lalezar", "Oswald", "Vazirmatn", sans-serif;
	--f-callig: "Nastaliq", "Markazi Text", serif;
	--lh-body: 2;
	--poster-case: none;
	--poster-lh: 1.06;
	--poster-track: 0;
	--fs-body: clamp(1rem, .97rem + .2vw, 1.125rem);
	--fs-poster: clamp(5.6rem, 1rem + 19vw, 25rem);
	--fs-h2: clamp(2.1rem, 1.4rem + 3vw, 4.5rem);
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-pad) + 12px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--f-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
	padding-inline-start: var(--rail);
	padding-inline-end: var(--edge);
}
body::before {
	/* Paper grain */
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 90;
	opacity: .07;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.2 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.12; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
legend { padding: 0; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.icon { width: 1.2em; height: 1.2em; flex: none; }
[dir="rtl"] .icon-dir { transform: scaleX(-1); }

/* ---------- Utilities ---------- */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.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; inset-inline-start: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; transition: top .2s; }
.skip-link:focus { top: 12px; }

.kicker {
	display: inline-flex;
	align-items: center;
	gap: .6em;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
	margin-block-end: 1.1rem;
}
.kicker::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }
:lang(fa) .kicker { letter-spacing: 0; font-size: .92rem; font-weight: 600; }

.section-title {
	font-family: var(--f-serif);
	font-size: var(--fs-h2);
	font-weight: 500;
	line-height: 1.04;
	letter-spacing: -.01em;
	max-width: 18ch;
	text-wrap: balance;
}
:lang(fa) .section-title { line-height: 1.35; font-weight: 600; letter-spacing: 0; }
.section-title--sm { font-size: var(--fs-h3); max-width: none; }
.section-sub { font-size: var(--fs-lead); color: var(--ink-2); max-width: 46ch; margin-block-start: 1.2rem; }

.poster {
	font-family: var(--f-poster);
	text-transform: var(--poster-case);
	line-height: var(--poster-lh);
	letter-spacing: var(--poster-track);
	font-weight: 800;
}
:lang(fa) .poster { font-weight: 400; }

/* word-split reveals */
.w { display: inline-block; overflow: clip; vertical-align: top; padding-block: .08em .14em; margin-block: -.08em -.14em; }
.wi { display: inline-block; will-change: transform; }

/* ---------- Buttons, chips, links ---------- */

.btn {
	--b-bg: transparent;
	--b-fg: var(--ink);
	--b-bd: var(--ink);
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .6em;
	min-height: 52px;
	padding: .7em 1.5em;
	border-radius: 999px;
	border: 1.5px solid var(--b-bd);
	background: var(--b-bg);
	color: var(--b-fg);
	font-weight: 700;
	font-size: .98rem;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	isolation: isolate;
	transition: color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.btn::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--b-hover, var(--accent));
	border-radius: inherit;
	transform: translateY(101%);
	transition: transform .45s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover { color: var(--b-hover-fg, var(--accent-ink)); border-color: var(--b-hover, var(--accent)); }
.btn:active { transform: scale(.97); }
.btn--ink { --b-bg: var(--ink); --b-fg: var(--paper); --b-bd: var(--ink); }
.btn--line { --b-hover: var(--ink); --b-hover-fg: var(--paper); }
.btn--sm { min-height: 42px; padding: .5em 1.1em; font-size: .9rem; }
.btn .icon { width: 1.25em; height: 1.25em; }

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: .55em;
	font-weight: 700;
	padding-block: .3em;
	background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1.5px;
	transition: background-size .45s var(--ease), gap .3s var(--ease);
}
[dir="rtl"] .link-arrow { background-position: 100% 100%; }
.link-arrow:hover { gap: .9em; background-size: 30% 1.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .4em;
	padding: .45em 1.05em;
	border: 1.5px solid var(--line-strong);
	border-radius: 999px;
	font-weight: 600;
	font-size: .93rem;
	line-height: 1.5;
	cursor: pointer;
	user-select: none;
	transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
:lang(en) .chip { text-transform: capitalize; }
.chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.chip[aria-pressed="true"], .chip--radio:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip--radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip--radio:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Frame: rail, masthead, edge, drawer (after nyphil.org) ---------- */

/* Rail: fixed black column on the start side with menu, passport and language. */
.rail {
	position: fixed;
	z-index: 86;
	inset-block: 0;
	inset-inline-start: 0;
	width: var(--rail);
	background: var(--ink);
	color: var(--paper);
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-block: 26px 22px;
}
.rail__tools { margin-block-start: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.burger { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: inherit; transition: background-color .3s; }
.burger:hover { background: rgba(255, 255, 255, .08); }
.burger__lines { position: relative; width: 26px; height: 16px; display: block; }
.burger__lines i { position: absolute; inset-inline: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .45s var(--ease), width .45s var(--ease), top .45s var(--ease); }
.burger__lines i:nth-child(1) { top: 0; }
.burger__lines i:nth-child(2) { top: 7px; width: 70%; }
.burger__lines i:nth-child(3) { top: 14px; }
.burger:hover .burger__lines i:nth-child(2) { width: 100%; }
.burger[aria-expanded="true"] .burger__lines i:nth-child(1) { top: 7px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines i:nth-child(2) { width: 0; }
.burger[aria-expanded="true"] .burger__lines i:nth-child(3) { top: 7px; transform: rotate(-45deg); }

/* Edge: thin strip on the end side with a scroll-position pill. */
.edge { position: fixed; z-index: 86; inset-block: 0; inset-inline-end: 0; width: var(--edge); background: var(--ink); }
.edge i { position: absolute; inset-inline-start: 50%; width: 4px; margin-inline-start: -2px; height: 72px; border-radius: 4px; background: var(--sun); top: calc(var(--sp, 0) * (100% - 72px)); }

/* Masthead: black, in flow, scrolls away. */
.masthead { position: relative; z-index: 80; background: var(--ink); color: var(--paper); }
.masthead__inner { min-height: var(--mast-h); display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-inline: clamp(20px, 2.4vw, 40px); padding-block: 16px; }

.wordmark { display: inline-flex; align-items: flex-end; gap: 12px; color: inherit; }
.wordmark__name { display: flex; flex-direction: column; font-family: var(--f-latin-poster); font-weight: 800; font-size: 2.55rem; line-height: .8; letter-spacing: -.005em; text-transform: uppercase; }
:lang(fa) .wordmark__name { font-family: "Lalezar", sans-serif; font-weight: 400; font-size: 2.1rem; line-height: 1.02; text-transform: none; }
.wordmark__sub { display: flex; flex-direction: column; padding-block-end: 3px; font-size: .62rem; font-weight: 800; line-height: 1.15; letter-spacing: .08em; text-transform: uppercase; }
.wordmark__sub b { font-family: var(--f-latin-poster); font-size: .86rem; letter-spacing: .14em; color: var(--sun); }
.wordmark__sub span { opacity: .75; }
:lang(fa) .wordmark__sub { font-size: .74rem; letter-spacing: 0; padding-block-end: 6px; }
:lang(fa) .wordmark__sub b { font-family: "Lalezar", sans-serif; font-weight: 400; font-size: 1rem; letter-spacing: 0; }
.wordmark:hover .wordmark__name span:first-child { color: var(--sun); }
.wordmark__name span { transition: color .3s; }

.masthead__end { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.masthead__tools { display: flex; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 18px; border-radius: 6px; background: var(--paper); color: var(--ink); font-weight: 800; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; transition: background-color .3s, color .3s; }
:lang(fa) .pill { letter-spacing: 0; font-size: .88rem; }
.pill:hover { background: var(--sun); }
.pill--ink { background: var(--ink); color: var(--paper); }
.pill--ink:hover { background: var(--accent); color: #fff; }
.circle { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .14); color: inherit; transition: background-color .3s, color .3s, transform .3s var(--ease); }
.circle .icon { width: 19px; height: 19px; }
.circle:hover { background: var(--paper); color: var(--ink); transform: scale(1.06); }

.masthead__nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px clamp(14px, 1.7vw, 28px); }
.nav__link { position: relative; display: inline-block; padding-block: 2px; font-weight: 700; font-size: .98rem; color: inherit; }
.nav__link::after { content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 2px; background: var(--sun); transform: scaleX(0); transform-origin: var(--o-end, right); transition: transform .45s var(--ease); }
[dir="rtl"] .nav__link::after { --o-end: left; --o-start: right; }
.nav__link:hover::after, .nav__link.is-current::after { transform: scaleX(1); transform-origin: var(--o-start, left); }

.masthead__mobile { display: none; align-items: center; gap: 8px; }

/* Passport + language buttons (rail and mobile masthead). */
.passport-btn { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--burgundy); color: #F3DDB0; transition: transform .35s var(--ease); }
.passport-btn:hover { transform: rotate(-8deg) scale(1.06); }
.passport-btn__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.passport-btn__track { fill: none; stroke: rgba(243, 221, 176, .2); stroke-width: 2.5; }
.passport-btn__bar { fill: none; stroke: var(--sun); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .8s var(--ease); }
.passport-btn__lvl { font-family: var(--f-latin-poster); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
.passport-btn.is-bump { animation: bump .6s var(--ease); }
.passport-btn--sm { width: 40px; height: 40px; }
.passport-btn--sm .passport-btn__lvl { font-size: .9rem; }
@keyframes bump { 30% { transform: scale(1.22) rotate(-6deg); } 100% { transform: none; } }

.lang-switch { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid rgba(247, 241, 230, .32); color: inherit; font-weight: 800; font-size: .8rem; transition: background-color .3s, color .3s, border-color .3s; }
.lang-switch:lang(fa) { font-family: "Vazirmatn", sans-serif; font-size: .95rem; }
.lang-switch:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.lang-switch--sm { width: 38px; height: 38px; }

/* Drawer: slides from the rail side. */
.drawer { position: fixed; inset: 0; z-index: 130; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(20, 16, 12, .5); opacity: 0; transition: opacity .45s var(--ease); }
.drawer__panel {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: min(720px, 100vw);
	display: grid;
	grid-template-columns: var(--rail) minmax(0, 1fr);
	background: var(--cream);
	color: var(--ink);
	box-shadow: 30px 0 80px -30px rgba(0, 0, 0, .45);
	transform: translateX(-102%);
	transition: transform .6s var(--ease);
}
[dir="rtl"] .drawer__panel { transform: translateX(102%); box-shadow: -30px 0 80px -30px rgba(0, 0, 0, .45); }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__rail { display: flex; justify-content: center; padding-block-start: 26px; }
.drawer__close { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; transition: background-color .3s, transform .4s var(--ease); }
.drawer__close:hover { background: var(--paper-2); transform: rotate(90deg); }
.drawer__close .icon { width: 28px; height: 28px; }
.drawer__body { overflow-y: auto; overscroll-behavior: contain; padding: 30px clamp(20px, 3vw, 44px) 30px 6px; display: flex; flex-direction: column; gap: 22px; }
[dir="rtl"] .drawer__body { padding: 30px 6px 30px clamp(20px, 3vw, 44px); }
.drawer__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.wordmark--ink .wordmark__name { font-size: 2rem; }
:lang(fa) .wordmark--ink .wordmark__name { font-size: 1.7rem; }
.drawer__search .sbox { background: #fff; border-color: var(--line); }
.drawer__groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 34px; }
.dgroup { padding-block: 18px 22px; border-top: 1px solid var(--line-strong); }
.dgroup__title { font-family: var(--f-latin-poster); font-weight: 800; font-size: 1.85rem; line-height: 1.1; text-transform: uppercase; letter-spacing: .005em; margin-block-end: 10px; }
:lang(fa) .dgroup__title { font-family: "Lalezar", sans-serif; font-weight: 400; text-transform: none; font-size: 1.7rem; line-height: 1.5; }
.dgroup__title a:hover { color: var(--accent); }
.dgroup ul { display: flex; flex-direction: column; gap: 3px; }
.dgroup li a, .dgroup__btn { display: inline-flex; align-items: baseline; gap: 8px; font-size: .95rem; color: var(--ink-2); line-height: 1.6; transition: color .25s, transform .3s var(--ease); text-align: start; }
.dgroup li a:hover, .dgroup__btn:hover { color: var(--ink); transform: translateX(4px); }
[dir="rtl"] .dgroup li a:hover, [dir="rtl"] .dgroup__btn:hover { transform: translateX(-4px); }
.dgroup li a small { font-size: .78rem; color: var(--muted); }
.dgroup__btn { font-weight: 700; color: var(--burgundy); }
.drawer.is-open .dgroup { animation: dgroup-in .7s var(--ease) both; }
.drawer.is-open .dgroup:nth-child(2) { animation-delay: .06s; }
.drawer.is-open .dgroup:nth-child(3) { animation-delay: .12s; }
.drawer.is-open .dgroup:nth-child(4) { animation-delay: .18s; }
@keyframes dgroup-in { from { opacity: 0; transform: translateY(18px); } }
.drawer__foot { margin-block-start: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding-block-start: 20px; border-top: 1px solid var(--line-strong); }
.drawer__social { display: flex; gap: 8px; }
.drawer__social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: background-color .25s, color .25s, border-color .25s; }
.drawer__social a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.drawer__lang { margin-inline-start: auto; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
html.drawer-open { overflow: hidden; }

/* ---------- Intro (letter grid) ---------- */

.intro { display: none; }
.show-intro .intro {
	position: fixed;
	inset: 0;
	z-index: 150;
	display: grid;
	place-items: center;
	background: var(--paper);
}
.show-intro body { overflow: hidden; }
.intro__grid {
	display: grid;
	grid-template-columns: repeat(var(--cols, 13), 1fr);
	gap: .1em .38em;
	font-family: var(--f-serif);
	font-size: clamp(1.15rem, .9rem + 1.3vw, 2rem);
	line-height: 1.3;
	color: var(--ink);
	direction: ltr;
}
:lang(fa) .intro__grid { direction: rtl; font-family: "Vazirmatn", sans-serif; font-weight: 300; }
.intro__cell { display: block; text-align: center; opacity: 0; transition: opacity .3s, color .3s; }
.intro__cell.is-key { font-weight: 700; }
.intro__name { position: absolute; font-family: var(--f-poster); font-size: clamp(2.4rem, 1rem + 5vw, 5.5rem); line-height: 1.2; letter-spacing: .1em; text-transform: uppercase; opacity: 0; }
:lang(fa) .intro__name { letter-spacing: 0; font-weight: 700; text-transform: none; }
.intro__skip { position: absolute; bottom: 28px; inset-inline-end: 28px; font-size: .85rem; font-weight: 700; color: var(--muted); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); }

/* ---------- Hero ---------- */

.hero { position: relative; padding-block-start: var(--top-pad); overflow: clip; }
.hero__stage {
	position: relative;
	min-height: calc(100svh - var(--mast-h));
	display: grid;
	grid-template-rows: auto 1fr auto auto;
	padding-block: clamp(18px, 3vh, 40px) clamp(22px, 4vh, 44px);
}
.hero__eyebrow { font-weight: 700; font-size: .95rem; letter-spacing: .02em; display: inline-flex; align-items: center; gap: .7em; color: var(--ink-2); position: relative; z-index: 4; }
.hero__eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }

.hero__art { position: relative; align-self: center; margin-block: 3vh 4vh; }
.hero__title {
	position: relative;
	z-index: 2;
	font-family: var(--f-poster);
	font-weight: 800;
	font-size: var(--fs-poster);
	line-height: var(--poster-lh);
	letter-spacing: var(--poster-track);
	text-transform: var(--poster-case);
	pointer-events: none;
}
:lang(fa) .hero__title { font-weight: 400; }
.hero__line { display: block; overflow: clip; padding-block: .02em .06em; }
:lang(fa) .hero__line { padding-block: .14em .34em; margin-block: -.2em -.3em; }
.hero__line--2 { text-align: end; }
.hero__line-in { display: inline-block; }

.hero__objects { position: absolute; inset: 0; pointer-events: none; }
.obj { position: absolute; z-index: 1; will-change: transform; }
.obj.is-front { z-index: 3; }
.obj img { width: 100%; filter: var(--shadow-obj); }
.obj--plane { width: clamp(110px, 13vw, 240px); top: -6%; inset-inline-end: 3%; }
.obj--plane img { transform: rotate(-6deg); }
.obj--doll { width: clamp(60px, 6.4vw, 118px); top: 4%; inset-inline-start: 42%; }
.obj--booth { width: clamp(44px, 4.4vw, 82px); top: 2%; inset-inline-end: 30%; }
.obj--tea { width: clamp(100px, 11vw, 210px); top: 34%; inset-inline-start: 47%; }
.obj--pretzel { width: clamp(100px, 11vw, 200px); bottom: 2%; inset-inline-start: 5%; }
.obj--pom { width: clamp(100px, 11.5vw, 210px); bottom: -10%; inset-inline-end: 44%; }
[dir="ltr"] .obj--doll { inset-inline-start: 36%; }
[dir="ltr"] .obj--tea { inset-inline-start: 50%; }
[dir="ltr"] .obj--pom { inset-inline-end: 62%; }

.hero__bottom { position: relative; z-index: 4; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.hero__lede { font-size: var(--fs-lead); max-width: 40ch; color: var(--ink-2); line-height: 1.6; }
:lang(fa) .hero__lede { line-height: 1.95; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__hellos { position: relative; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-block-start: 26px; padding-block-start: 18px; border-top: 1px solid var(--line); }
.hero__hint { font-size: .85rem; color: var(--muted); font-weight: 600; }
.hellos { display: flex; flex-wrap: wrap; gap: 8px; }
.hello {
	display: inline-flex;
	align-items: center;
	gap: .45em;
	padding: .38em .95em .38em .75em;
	border-radius: 999px;
	background: var(--paper-2);
	font-weight: 700;
	font-size: .95rem;
	line-height: 1.5;
	transition: background-color .3s, color .3s, transform .3s var(--ease);
}
.hello .icon { width: 1.05em; height: 1.05em; opacity: .7; }
.hello:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.hello.is-playing { background: var(--accent); color: var(--accent-ink); }
.hello.is-playing .icon { animation: pulse .7s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.25); } }

.hero__scroll { position: absolute; inset-inline-end: var(--gutter); bottom: clamp(22px, 4vh, 44px); z-index: 4; display: none; }

/* ---------- Marquee ---------- */

.marquee { overflow: clip; border-block: 1px solid var(--line); padding-block: clamp(12px, 1.6vw, 22px); direction: ltr; background: var(--paper); }
.marquee__track { display: flex; width: max-content; align-items: center; gap: clamp(18px, 2.4vw, 40px); font-family: var(--f-serif); font-size: clamp(1.8rem, 1rem + 3vw, 3.8rem); line-height: 1.3; white-space: nowrap; will-change: transform; }
.marquee__track span:lang(fa) { font-family: "Markazi Text", serif; }
.marquee__track i { font-style: normal; color: var(--accent); font-size: .5em; }

/* ---------- Manifesto ---------- */

.manifesto { padding-block: clamp(90px, 14vw, 200px) clamp(70px, 10vw, 150px); }
.manifesto__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; }
.manifesto .kicker { grid-column: 1 / -1; }
.manifesto__title { grid-column: 1 / span 10; font-family: var(--f-serif); font-size: clamp(2.3rem, 1.2rem + 4.4vw, 6rem); line-height: 1.06; font-weight: 400; letter-spacing: -.015em; text-wrap: balance; }
:lang(fa) .manifesto__title { line-height: 1.45; font-weight: 500; letter-spacing: 0; font-size: clamp(2.1rem, 1.2rem + 3.6vw, 5.2rem); }
.manifesto__aside { position: relative; grid-column: 6 / span 6; margin-block-start: clamp(40px, 6vw, 80px); display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.manifesto__mic { width: clamp(90px, 10vw, 150px); }
.manifesto__mic img { filter: var(--shadow-obj); transform: rotate(-10deg); }
.manifesto__body { font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.7; }
:lang(fa) .manifesto__body { line-height: 2; }

.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); margin-block-start: clamp(60px, 8vw, 110px); border-top: 1px solid var(--line-strong); }
.stat { padding: 26px 22px 0 0; display: flex; flex-direction: column; gap: 6px; border-inline-start: 1px solid var(--line); padding-inline: 22px; }
.stat:first-child { border-inline-start: 0; padding-inline-start: 0; }
.stat__num { font-family: var(--f-latin-poster); font-size: clamp(3rem, 2rem + 4vw, 6rem); font-weight: 700; line-height: 1; letter-spacing: -.01em; }
:lang(fa) .stat__num { font-family: "Lalezar", sans-serif; font-weight: 400; line-height: 1.2; }
.stat__label { color: var(--muted); font-weight: 600; font-size: .95rem; line-height: 1.5; }
.stats--compact { margin-block-start: 40px; grid-template-columns: repeat(2, 1fr); }
.stats--compact .stat { padding-block-end: 22px; border-bottom: 1px solid var(--line); }
.stats--compact .stat:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }

/* ---------- Language chapters ---------- */

.chapters { --chapter-bg: var(--paper); --chapter-ink: var(--ink); background: var(--chapter-bg); color: var(--chapter-ink); }

.chapter { --ct: var(--ink); position: relative; background: var(--c); color: var(--ct); }
.chapter.ink-light { --ct: var(--cream); }
.chapter--tr { --c: var(--c-tr); }
.chapter--en { --c: var(--c-en); }
.chapter--de { --c: var(--c-de); }
.chapter--ru { --c: var(--c-ru); }
.chapter--fa { --c: var(--c-fa); }
.motion .chapter { background: transparent; color: inherit; }

.chapter__inner {
	position: relative;
	min-height: 100svh;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	grid-template-areas: "num media" "title media" "body media";
	grid-template-rows: auto auto 1fr;
	gap: 0 clamp(24px, 4vw, 72px);
	padding-block: clamp(70px, 10vh, 130px);
	align-items: start;
}
.chapter__num {
	font-family: "Cormorant Garamond", "Markazi Text", serif;
	font-weight: 300;
	font-size: clamp(4.5rem, 3rem + 7vw, 11rem);
	line-height: .9;
	color: transparent;
	-webkit-text-stroke: 1.2px var(--ct);
	opacity: .75;
}
:lang(fa) .chapter__num { font-family: "Markazi Text", serif; font-weight: 400; line-height: 1.2; }
.chapter__title { grid-area: title; display: flex; flex-direction: column; align-items: flex-start; gap: .2em; margin-block: .1em .5em; }
.chapter__native {
	font-family: var(--f-latin-poster);
	font-weight: 800;
	font-size: clamp(4rem, 1.4rem + 10.5vw, 13.5rem);
	line-height: .86;
	text-transform: uppercase;
	letter-spacing: -.01em;
	white-space: nowrap;
}
.chapter__native:lang(fa) { font-family: "Lalezar", sans-serif; font-weight: 400; text-transform: none; line-height: 1.2; }
.chapter__native:lang(ru) { font-family: "Oswald", sans-serif; font-weight: 700; font-size: clamp(3.4rem, 1.2rem + 8.4vw, 10.5rem); line-height: 1; }
.chapter__name { font-family: var(--f-serif); font-size: clamp(1.4rem, 1rem + 1.4vw, 2.4rem); font-style: italic; font-weight: 500; line-height: 1.3; opacity: .85; }
:lang(fa) .chapter__name { font-style: normal; font-weight: 600; }

.chapter__media { grid-area: media; align-self: center; position: relative; display: grid; place-items: center; min-height: 50vh; }
.chapter__media img { width: min(100%, 520px); filter: var(--shadow-obj); }
.chapter--en .chapter__media img, .chapter--ru .chapter__media img { width: min(62%, 330px); }

.chapter__body { grid-area: body; max-width: 560px; display: flex; flex-direction: column; gap: 22px; }
.chapter__meta { display: flex; flex-wrap: wrap; gap: 0; border-block: 1px solid color-mix(in srgb, var(--ct) 30%, transparent); }
.chapter__meta > div { flex: 1 1 140px; padding: 12px 0; display: flex; flex-direction: column; gap: 2px; }
.chapter__meta > div + div { border-inline-start: 1px solid color-mix(in srgb, var(--ct) 30%, transparent); padding-inline-start: 18px; }
.chapter__meta dt { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
:lang(fa) .chapter__meta dt { letter-spacing: 0; font-size: .85rem; }
.chapter__meta dd { font-weight: 700; font-size: 1.05rem; line-height: 1.5; }
.chapter__desc { font-size: 1.08rem; line-height: 1.75; }
:lang(fa) .chapter__desc { line-height: 2.05; }
.chapter__fact { font-size: .95rem; line-height: 1.7; padding: 14px 18px; border-radius: 16px; background: color-mix(in srgb, var(--ct) 10%, transparent); }
.chapter__fact strong { font-weight: 800; margin-inline-end: .3em; }
.chapter__ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.btn--chapter { --b-bg: var(--ct); --b-bd: var(--ct); --b-fg: var(--c); --b-hover: var(--accent); --b-hover-fg: #fff; }
.btn--chapter-line { --b-fg: var(--ct); --b-bd: var(--ct); --b-hover: var(--ct); --b-hover-fg: var(--c); }
.word-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.word-card__say {
	color: var(--ct);
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 8px 18px 8px 8px;
	border-radius: 999px;
	border: 1.5px solid var(--ct);
	transition: background-color .3s, color .3s, transform .3s var(--ease);
}
[dir="rtl"] .word-card__say { padding: 8px 8px 8px 18px; }
.word-card__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--ct); }
.word-card__icon .icon { color: var(--c); }
.word-card__word { font-family: var(--f-serif); font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.word-card__word:lang(fa) { font-family: "Markazi Text", serif; font-size: 1.7rem; }
.word-card__hint { font-size: .8rem; font-weight: 700; opacity: .7; }
.word-card__say:hover { transform: translateY(-2px); }
.word-card__say.is-playing .word-card__icon { animation: pulse .7s ease-in-out infinite; }
.word-card__flip { font-size: .9rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; opacity: .85; }
.word-card__mean { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; font-weight: 700; font-size: 1.1rem; animation: flip-in .5s var(--ease); }
.word-card__ipa { font-weight: 500; font-size: .9rem; opacity: .7; }
@keyframes flip-in { from { opacity: 0; transform: rotateX(70deg) translateY(-8px); } }

/* Language index: hover a row and the section turns into that country's flag. */
.lix { position: relative; isolation: isolate; overflow: clip; color: var(--ink); transition: color .6s var(--ease); }
.lix__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.lix__flag { position: absolute; inset: 0; opacity: 0; transform: scale(1.12); transition: opacity .8s var(--ease), transform 2.4s var(--ease); }
.lix__flag img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.15); }
.lix__flag::after, .flag-silk::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(100deg, rgba(0, 0, 0, .16) 0%, rgba(255, 255, 255, .26) 14%, rgba(0, 0, 0, .12) 28%, rgba(255, 255, 255, .2) 44%, rgba(0, 0, 0, .14) 60%, rgba(255, 255, 255, .22) 76%, rgba(0, 0, 0, .12) 90%, rgba(255, 255, 255, .18) 100%);
	background-size: 250% 100%;
	mix-blend-mode: soft-light;
	animation: silk 7s linear infinite;
}
@keyframes silk { from { background-position: 0% 0; } to { background-position: -250% 0; } }
.lix__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 14, 10, .52) 0%, rgba(18, 14, 10, .3) 45%, rgba(18, 14, 10, .5) 100%); opacity: 0; transition: opacity .7s var(--ease); }
.lix[data-active] { color: var(--cream); }
.lix[data-active] .lix__scrim { opacity: 1; }
.lix[data-active="tr"] [data-flag-bg="tr"], .lix[data-active="en"] [data-flag-bg="en"], .lix[data-active="de"] [data-flag-bg="de"], .lix[data-active="ru"] [data-flag-bg="ru"], .lix[data-active="fa"] [data-flag-bg="fa"] { opacity: 1; transform: scale(1); }
.lix[data-active] .kicker, .lix[data-active] .lix__sub { color: rgba(247, 241, 230, .82); }

.lix__inner { padding-block: clamp(70px, 9vw, 130px) clamp(60px, 7vw, 100px); }
.lix__intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 60px; margin-block-end: clamp(36px, 5vw, 64px); }
.lix__sub { margin: 0; max-width: 36ch; transition: color .6s var(--ease); }
.lix__list { border-top: 1px solid color-mix(in srgb, currentColor 28%, transparent); }
.lix__list > li { border-bottom: 1px solid color-mix(in srgb, currentColor 28%, transparent); }
.lix__row {
	display: grid;
	grid-template-columns: 48px 0px minmax(0, 1fr) auto 52px;
	align-items: center;
	gap: 0 clamp(14px, 2vw, 28px);
	padding-block: clamp(10px, 1.2vw, 18px);
	color: inherit;
	transition: opacity .5s var(--ease), grid-template-columns .6s var(--ease);
}
.lix__num { font-weight: 800; font-size: .85rem; opacity: .6; }
.lix__dot { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 10px 24px -10px rgba(0, 0, 0, .5); scale: 0; opacity: 0; transition: scale .55s var(--ease), opacity .3s; }
.lix__dot img { width: 100%; height: 100%; object-fit: cover; }
.lix__native {
	font-family: var(--f-latin-poster);
	font-weight: 800;
	font-size: clamp(3rem, 1.2rem + 6vw, 8.5rem);
	line-height: .92;
	letter-spacing: -.005em;
	text-transform: uppercase;
	white-space: nowrap;
	justify-self: start;
	transition: translate .7s var(--ease), text-shadow .6s;
}
.lix[data-active] .lix__native { text-shadow: 0 4px 30px rgba(0, 0, 0, .35); }
.lix__native:lang(fa) { font-family: "Lalezar", sans-serif; font-weight: 400; text-transform: none; line-height: 1.25; font-size: clamp(2.6rem, 1rem + 5.4vw, 7.6rem); }
.lix__native:lang(ru) { font-family: "Oswald", sans-serif; font-weight: 700; font-size: clamp(2.5rem, 1rem + 4.8vw, 7rem); line-height: 1.05; }
.lix__meta { display: flex; flex-direction: column; align-items: flex-end; text-align: end; gap: 2px; font-size: .95rem; line-height: 1.4; }
.lix__meta b { font-family: var(--f-serif); font-size: 1.35rem; font-weight: 600; }
:lang(fa) .lix__meta b { font-weight: 700; font-size: 1.15rem; }
.lix__meta span { opacity: .75; font-weight: 700; }
.lix__go { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid color-mix(in srgb, currentColor 40%, transparent); transition: background-color .4s, color .4s, rotate .6s var(--ease), border-color .4s; }

.lix[data-active] .lix__row { opacity: .42; }
.lix .lix__row.is-active { opacity: 1; grid-template-columns: 48px 52px minmax(0, 1fr) auto 52px; }
.lix__row.is-active .lix__dot { scale: 1; opacity: 1; }
.lix__row.is-active .lix__native { translate: 10px 0; }
[dir="rtl"] .lix__row.is-active .lix__native { translate: -10px 0; }
.lix__row.is-active .lix__go { background: var(--cream); color: var(--ink); border-color: var(--cream); rotate: -45deg; }
[dir="rtl"] .lix__row.is-active .lix__go { rotate: 45deg; }
.lix__row:focus-visible { outline-offset: -2px; }

/* Floating flag navigator while reading the chapters. */
.langnav { display: none; }
.motion .langnav {
	display: block;
	position: fixed;
	z-index: 75;
	bottom: 22px;
	left: 50%;
	translate: -50% 160%;
	opacity: 0;
	padding: 6px;
	border-radius: 999px;
	background: rgba(26, 23, 20, .92);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .6);
	transition: translate .7s var(--ease), opacity .5s var(--ease);
}
.motion .langnav.is-on { translate: -50% 0; opacity: 1; }
.langnav ul { display: flex; gap: 4px; }
.langnav a { display: flex; align-items: center; gap: 0; height: 44px; padding: 5px; border-radius: 999px; color: var(--cream); transition: background-color .4s, gap .5s var(--ease), padding .5s var(--ease); }
.langnav__flag { width: 34px; height: 34px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px rgba(255, 255, 255, .18); transition: box-shadow .3s, scale .4s var(--ease); }
.langnav__flag img { width: 100%; height: 100%; object-fit: cover; }
.langnav__label { max-width: 0; overflow: hidden; white-space: nowrap; font-family: var(--f-latin-poster); font-weight: 800; font-size: 1.05rem; letter-spacing: .03em; text-transform: uppercase; transition: max-width .55s var(--ease); }
.langnav__label:lang(fa) { font-family: "Lalezar", sans-serif; font-weight: 400; text-transform: none; font-size: 1.1rem; }
.langnav__label:lang(ru) { font-family: "Oswald", sans-serif; font-weight: 600; }
.langnav a:hover .langnav__flag { scale: 1.08; }
.langnav a.is-active { background: rgba(255, 255, 255, .12); gap: 9px; padding-inline-end: 16px; }
.langnav a.is-active .langnav__label { max-width: 160px; }
.langnav a.is-active .langnav__flag { box-shadow: 0 0 0 2px var(--sun); }
html.langnav-on .toasts { bottom: 92px; }

/* Flag badge beside each chapter number. */
.chapter__top { grid-area: num; display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); }
.chapter__flag { position: relative; display: block; width: clamp(76px, 7.4vw, 120px); aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; border: 4px solid #fff; box-shadow: 0 18px 34px -16px rgba(0, 0, 0, .55); rotate: -6deg; }
.chapter__flag img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Method ---------- */

.method { padding-block: clamp(90px, 12vw, 170px); }
.method__head { margin-block-end: clamp(40px, 5vw, 70px); }
.method__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; counter-reset: m; }
.mcard {
	position: relative;
	padding: clamp(26px, 3vw, 44px);
	border-radius: var(--radius-lg);
	background: var(--paper-2);
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 300px;
	transform-style: preserve-3d;
	transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.mcard:hover { box-shadow: 0 30px 60px -30px rgba(40, 25, 10, .35); }
.mcard__num { font-family: var(--f-latin-poster); font-weight: 700; font-size: 1rem; color: var(--muted); }
:lang(fa) .mcard__num { font-family: "Vazirmatn", sans-serif; }
.mcard__title { font-family: var(--f-serif); font-size: var(--fs-h3); font-weight: 600; line-height: 1.2; }
:lang(fa) .mcard__title { line-height: 1.5; font-weight: 700; }
.mcard__body { color: var(--ink-2); line-height: 1.75; }
:lang(fa) .mcard__body { line-height: 2; }
.mcard--talk { background: var(--ink); color: var(--paper); }
.mcard--talk .mcard__body { color: color-mix(in srgb, var(--paper) 80%, transparent); }
.mcard--talk .mcard__num { color: color-mix(in srgb, var(--paper) 55%, transparent); }
.mcard--goal { background: var(--sun); }
.mcard--safe { background: var(--blush); }
.mcard__q { font-weight: 700; margin-block-start: auto; }

.talkbar { display: flex; margin-block-start: auto; height: 64px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .08); font-weight: 700; }
.talkbar span { display: flex; align-items: center; gap: .4em; padding-inline: 20px; white-space: nowrap; overflow: hidden; }
.talkbar__you { flex: 0 0 70%; background: var(--accent); color: var(--accent-ink); }
.talkbar__teacher { flex: 1; color: color-mix(in srgb, var(--paper) 75%, transparent); }
.talkbar b { font-weight: 800; }

/* ---------- Story (about Elham) ---------- */

.story { padding-block: clamp(90px, 12vw, 170px); background: var(--paper-2); overflow: clip; }
.story__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(30px, 5vw, 90px); align-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }

.story__text { display: flex; flex-direction: column; gap: 22px; }
.story__text .section-title { margin-block-end: 8px; }
.story__p { font-size: 1.1rem; line-height: 1.8; color: var(--ink-2); }
:lang(fa) .story__p { line-height: 2.1; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); margin-block-start: 14px; }
.fact { display: flex; flex-direction: column; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--line); padding-inline-end: 16px; }
.fact__k { font-weight: 800; font-size: 1.02rem; }
.fact__v { color: var(--muted); font-size: .93rem; line-height: 1.6; }
.story__speaks-title { font-weight: 700; margin-block-start: 12px; }
.speaks { display: flex; flex-wrap: wrap; gap: 10px; }
.speak { display: inline-flex; flex-direction: column; padding: 10px 18px; border-radius: 18px; background: var(--paper); border: 1.5px solid var(--line); line-height: 1.3; }
.speak__native { font-family: var(--f-serif); font-size: 1.35rem; font-weight: 600; }
.speak__native:lang(fa) { font-family: "Markazi Text", serif; }
.speak__tag { font-size: .75rem; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
:lang(fa) .speak__tag { letter-spacing: 0; }
.speak--fa { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.speak--fa .speak__tag { color: var(--sun); }

/* Elham's language passport (data page) */
.idcard-wrap { position: relative; padding: 56px 34px 84px; perspective: 1200px; }
.idcard {
	--rx: 0deg;
	--ry: 0deg;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border-radius: 20px;
	color: var(--ink);
	background:
		repeating-radial-gradient(circle at 12% 118%, transparent 0 10px, rgba(107, 30, 43, .055) 10px 11px),
		repeating-radial-gradient(circle at 112% -14%, transparent 0 14px, rgba(18, 128, 121, .05) 14px 15px),
		repeating-linear-gradient(115deg, transparent 0 22px, rgba(45, 75, 176, .025) 22px 23px),
		linear-gradient(135deg, #FCF7EE 0%, #F7EFE7 45%, #EEF1EA 100%);
	box-shadow: 0 60px 100px -46px rgba(40, 22, 10, .5), 0 0 0 1px rgba(26, 23, 20, .08), inset 0 1px 0 rgba(255, 255, 255, .8);
	rotate: -2.5deg;
	transform: rotateX(var(--rx)) rotateY(var(--ry));
	transition: rotate .9s var(--ease), transform .5s var(--ease);
}
.idcard-wrap:hover .idcard { rotate: 0deg; }
.idcard::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background:
		radial-gradient(circle at var(--mx, 25%) var(--my, 15%), rgba(255, 255, 255, .5), transparent 38%),
		conic-gradient(from 90deg at var(--mx, 25%) var(--my, 15%), rgba(255, 64, 160, .14), rgba(64, 200, 255, .14), rgba(255, 220, 64, .14), rgba(64, 255, 170, .14), rgba(255, 64, 160, .14));
	mix-blend-mode: soft-light;
	opacity: .55;
	transition: opacity .5s;
}
.idcard-wrap:hover .idcard::after { opacity: 1; }

.idcard__head { display: flex; align-items: center; gap: 14px; padding: 14px 22px; background: var(--burgundy); color: #F3DDB0; }
.idcard__emblem { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(243, 221, 176, .55); font-family: var(--f-latin-poster); font-weight: 800; font-size: 1.3rem; box-shadow: inset 0 0 0 4px var(--burgundy), inset 0 0 0 5px rgba(243, 221, 176, .35); }
.idcard__titles { display: flex; flex-direction: column; line-height: 1.15; }
.idcard__titles b[lang="fa"] { font-family: "Lalezar", sans-serif; font-weight: 400; font-size: 1.15rem; }
.idcard__titles b[lang="en"] { font-family: var(--f-latin-poster); font-weight: 700; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; opacity: .8; }
.idcard__no { margin-inline-start: auto; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .74rem; letter-spacing: .12em; opacity: .8; }

.idcard__body { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 22px; padding: 22px 22px 6px; }
.idcard__seal { position: relative; width: 148px; aspect-ratio: 1; display: grid; place-items: center; align-self: start; }
.idcard__seal-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 48s linear infinite; }
.idcard__seal-edge { fill: none; stroke: rgba(107, 30, 43, .4); stroke-width: 1.2; stroke-dasharray: 2 4; }
.idcard__seal-core { fill: var(--burgundy); }
.idcard__seal text { direction: ltr; unicode-bidi: isolate; font-family: "Manrope", "Vazirmatn", sans-serif; font-weight: 800; font-size: 12.5px; letter-spacing: 2.4px; fill: var(--burgundy); }
.idcard__seal-n { position: relative; margin-top: -10px; font-family: var(--f-latin-poster); font-weight: 800; font-size: 3.7rem; line-height: 1; color: var(--sun); }
.idcard__seal-l { position: absolute; top: 61%; font-size: .6rem; font-weight: 800; letter-spacing: .22em; color: #F3DDB0; }
:lang(fa) .idcard__seal-l { letter-spacing: 0; font-size: .72rem; }

.idcard__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; align-content: start; }
.idcard__field { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.idcard__field dt { font-size: .6rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.idcard__field dd { font-weight: 800; font-size: .92rem; line-height: 1.45; }
:lang(fa) .idcard__field dd { line-height: 1.7; }
.idcard__field.is-name dd { font-family: var(--f-latin-poster); font-size: 1.75rem; line-height: 1.05; letter-spacing: .01em; }
:lang(fa) .idcard__field.is-name dd { font-family: "Lalezar", sans-serif; font-weight: 400; font-size: 1.7rem; line-height: 1.35; }
.idcard__field.is-name small { display: block; margin-top: 2px; font-family: var(--f-body); font-weight: 700; font-size: .7rem; letter-spacing: .08em; color: var(--muted); }
.idcard__field--langs { grid-column: 1 / -1; }
.idcard__langs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.idcard__langs li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: rgba(255, 255, 255, .8); box-shadow: 0 0 0 1px var(--line); font-weight: 700; font-size: .8rem; line-height: 1.4; }
[dir="rtl"] .idcard__langs li { padding: 3px 3px 3px 10px; }
.idcard__flag { width: 22px; height: 22px; flex: none; border-radius: 50%; overflow: hidden; }
.idcard__flag img { width: 100%; height: 100%; object-fit: cover; }

.idcard__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 4px 22px 8px; }
.idcard__issuer, .idcard__sign { display: flex; flex-direction: column; }
.idcard__issuer span, .idcard__sign span { font-size: .6rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.idcard__issuer b { font-weight: 800; font-size: .9rem; }
.idcard__sign { align-items: flex-end; }
.idcard__sign b { font-family: "Nastaliq", "Markazi Text", serif; font-weight: 400; font-size: 1.9rem; line-height: 1.6; color: #22306E; rotate: -5deg; margin-block: -10px -6px; }
.idcard__mrz { display: flex; flex-direction: column; padding: 10px 22px 16px; border-top: 1px dashed var(--line-strong); background: linear-gradient(180deg, transparent, rgba(26, 23, 20, .035)); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: clamp(.56rem, .42rem + .38vw, .8rem); letter-spacing: .13em; line-height: 1.6; color: rgba(26, 23, 20, .7); white-space: nowrap; overflow: hidden; }

.idstamps { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.idstamp { position: absolute; width: var(--s, 104px); aspect-ratio: 1; rotate: var(--r, 0deg); }
.idstamp__ink {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 3px double var(--sc);
	color: var(--sc);
	mix-blend-mode: multiply;
	opacity: .88;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.idstamp__in { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 76%; aspect-ratio: 1; border-radius: 50%; border: 1.2px solid currentColor; text-align: center; line-height: 1.05; }
.idstamp b { font-family: var(--f-latin-poster); font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .02em; }
.idstamp b:lang(fa) { font-family: "Lalezar", sans-serif; font-weight: 400; font-size: 1.15rem; text-transform: none; line-height: 1.3; }
.idstamp b:lang(ru) { font-family: "Oswald", sans-serif; font-weight: 700; font-size: .85rem; }
.idstamp i { margin-top: 3px; font-style: normal; font-size: .52rem; font-weight: 800; letter-spacing: .18em; }
.idstamp--tr { --sc: #0F6E68; --r: 12deg; top: 18px; inset-inline-end: 7%; }
.idstamp--en { --sc: #1E3F2F; --r: -14deg; bottom: 34px; inset-inline-start: 4%; --s: 96px; }
.idstamp--de { --sc: #A9740C; --r: 20deg; top: 47%; inset-inline-end: -22px; --s: 90px; }
.idstamp--ru { --sc: #2D4BB0; --r: -7deg; bottom: 12px; inset-inline-end: 30%; --s: 98px; }
.idstamp--fa { --sc: #B8322A; --r: -20deg; top: 30%; inset-inline-start: 0; --s: 90px; }

.idcard__pen { position: absolute; z-index: 4; width: clamp(140px, 13vw, 230px); bottom: -46px; inset-inline-end: -64px; rotate: -24deg; pointer-events: none; }
[dir="rtl"] .idcard__pen { rotate: 24deg; scale: -1 1; }
.idcard__pen img { filter: var(--shadow-obj); }

.story__text { gap: 24px; }

/* ---------- App ---------- */

.app { padding-block: clamp(90px, 12vw, 170px); }
.app__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.app__text { display: flex; flex-direction: column; gap: 22px; }
.app__body { font-size: 1.1rem; line-height: 1.8; color: var(--ink-2); max-width: 58ch; }
:lang(fa) .app__body { line-height: 2.05; }
.app__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.app__facts li { padding: .35em .95em; border-radius: 999px; background: var(--sun); font-weight: 700; font-size: .9rem; }
.app__features { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 22px; }
.app__features li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.app__features .icon { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--c-tr); color: var(--cream); }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 16px; background: var(--ink); color: var(--paper); font-weight: 700; transition: transform .35s var(--ease), background-color .3s; }
.store:hover { transform: translateY(-3px); background: var(--c-tr); }
.store .icon { color: #A4D65E; }
.app__ios { font-size: .9rem; color: var(--muted); margin-block-start: -10px; }
.roadmap { padding: 20px 22px; border-radius: var(--radius); border: 1.5px solid var(--line); }
.roadmap__title { font-weight: 700; font-size: .9rem; color: var(--muted); margin-block-end: 12px; }
.roadmap__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: r; }
.roadmap__list li { position: relative; display: flex; flex-direction: column; gap: 2px; padding-block-start: 18px; }
.roadmap__list li::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 6px; border-radius: 99px; background: var(--paper-3); }
.roadmap__list li.is-ready::before { background: var(--c-tr); }
.roadmap__list li.is-soon::before { background: linear-gradient(90deg, var(--c-tr) 0 40%, var(--paper-3) 40%); }
[dir="rtl"] .roadmap__list li.is-soon::before { background: linear-gradient(-90deg, var(--c-tr) 0 40%, var(--paper-3) 40%); }
.roadmap__list b { font-family: var(--f-latin-poster); font-size: 1.5rem; line-height: 1.1; }
:lang(fa) .roadmap__list li:last-child b { font-family: var(--f-body); font-size: 1rem; line-height: 1.6; }
.roadmap__list span { font-size: .85rem; color: var(--muted); font-weight: 600; }

.app__device { position: relative; display: grid; place-items: center; }
.app__tea { position: absolute; width: clamp(110px, 12vw, 190px); bottom: -4%; inset-inline-start: -2%; z-index: 2; }
.app__tea img { filter: var(--shadow-obj); }

.phone { position: relative; width: min(330px, 86vw); }
.phone__frame { position: relative; aspect-ratio: 9 / 18.6; border-radius: 52px; padding: 12px; background: #141210; box-shadow: 0 0 0 2px #3a342e inset, 0 50px 90px -30px rgba(30, 18, 8, .5), 0 20px 30px -20px rgba(30, 18, 8, .4); transform: rotate(3deg); transition: transform .8s var(--ease); }
[dir="rtl"] .phone__frame { transform: rotate(-3deg); }
.phone:hover .phone__frame { transform: none; }
.phone__island { position: absolute; top: 22px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 99px; background: #000; z-index: 2; }
.phone__screen { position: relative; height: 100%; border-radius: 41px; background: var(--cream); overflow: hidden; display: flex; flex-direction: column; padding: 58px 20px 22px; gap: 12px; direction: inherit; }
.phone__bar { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; font-weight: 800; }
.phone__brand { color: var(--c-tr); font-family: var(--f-latin-poster); font-size: 1.15rem; letter-spacing: .02em; }
.phone__lesson { color: var(--muted); font-family: "Manrope", "Vazirmatn", sans-serif; }
.phone__progress { height: 8px; border-radius: 99px; background: var(--paper-3); overflow: hidden; }
.phone__progress i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--c-tr); border-radius: inherit; transition: width .6s var(--ease); }
.phone__label { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-block-start: 8px; }
:lang(fa) .phone__label { letter-spacing: 0; font-size: .85rem; }
.phone__mean { font-family: var(--f-serif); font-size: 1.45rem; font-weight: 600; line-height: 1.4; min-height: 2.8em; }
.phone__slots { display: flex; flex-wrap: wrap; gap: 8px; min-height: 104px; align-content: flex-start; padding: 12px; border-radius: 18px; border: 1.5px dashed var(--line-strong); background: var(--paper); }
.phone__tiles { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; }
.tile { padding: 8px 14px; border-radius: 12px; background: #fff; box-shadow: 0 2px 0 var(--paper-3), 0 0 0 1.5px var(--line) inset; font-family: "Manrope", "Vazirmatn", sans-serif; font-weight: 700; font-size: 1rem; line-height: 1.3; transition: transform .25s var(--ease), opacity .25s; }
.tile:hover { transform: translateY(-2px); }
.tile:active { transform: translateY(1px); }
.tile.is-placed { background: var(--c-tr); color: #fff; box-shadow: 0 2px 0 #0a4d49; }
.phone__hint { font-size: .78rem; color: var(--muted); margin-block-start: auto; }
.phone__feedback { min-height: 1.5em; font-weight: 800; font-size: .95rem; }
.phone__feedback.is-good { color: var(--c-tr); }
.phone__feedback.is-bad { color: var(--accent); }
.phone__check { min-height: 50px; border-radius: 16px; background: var(--c-tr); color: #fff; font-weight: 800; box-shadow: 0 4px 0 #0a4d49; transition: transform .15s, box-shadow .15s, opacity .2s; }
.phone__check:active { transform: translateY(3px); box-shadow: 0 1px 0 #0a4d49; }
.phone__check:disabled { opacity: .45; cursor: not-allowed; }
.phone.is-shake .phone__frame { animation: shake .45s; }
@keyframes shake { 20%, 60% { translate: -8px 0; } 40%, 80% { translate: 8px 0; } }

/* ---------- Play ---------- */

.play { padding-block: clamp(90px, 12vw, 170px); background: var(--ink); color: var(--paper); overflow: clip; }
.play .kicker { color: color-mix(in srgb, var(--paper) 60%, transparent); }
.play .section-sub { color: color-mix(in srgb, var(--paper) 78%, transparent); }
.play__head { position: relative; margin-block-end: clamp(40px, 5vw, 70px); }
.play__passport { position: absolute; top: -10px; inset-inline-end: 0; width: clamp(120px, 15vw, 240px); transform: rotate(9deg); }
.play__passport img { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .5)); }

.play__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.game { position: relative; border-radius: var(--radius-lg); padding: clamp(22px, 2.6vw, 38px); display: flex; flex-direction: column; gap: 20px; background: #26221E; color: var(--paper); }
.game__title { font-family: var(--f-serif); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.4rem); font-weight: 600; line-height: 1.2; }
:lang(fa) .game__title { line-height: 1.5; font-weight: 700; }
.game__body { color: color-mix(in srgb, currentColor 75%, transparent); line-height: 1.7; margin-block-start: 6px; }
:lang(fa) .game__body { line-height: 1.95; }
.game--ws { grid-column: span 7; background: var(--paper); color: var(--ink); }
.game--quiz { grid-column: span 5; background: var(--c-tr); }
.game--daily { grid-column: span 6; background: var(--sun); color: var(--ink); }
.game--hunt { grid-column: span 6; background: var(--blush); color: var(--ink); }

/* word search */
.ws { display: grid; grid-template-columns: repeat(var(--n, 10), 1fr); gap: 3px; user-select: none; touch-action: none; max-width: 560px; }
.ws__cell {
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	border-radius: 8px;
	font-family: var(--f-latin-poster);
	font-weight: 800;
	font-size: clamp(1rem, .7rem + 1.2vw, 1.5rem);
	line-height: 1;
	background: var(--paper-2);
	transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.ws__cell:hover { background: var(--paper-3); }
.ws__cell.is-sel { background: var(--ink); color: var(--paper); transform: scale(.94); }
.ws__cell.is-anchor { box-shadow: 0 0 0 2px var(--accent) inset; }
.ws__cell.is-found { color: #fff; }
.ws__cell.is-found[data-c="tr"] { background: var(--c-tr); }
.ws__cell.is-found[data-c="en"] { background: var(--c-en); }
.ws__cell.is-found[data-c="de"] { background: var(--c-de); color: var(--ink); }
.ws__cell.is-found[data-c="ru"] { background: var(--c-ru); }
.ws__cell.is-found[data-c="fa"] { background: var(--accent); }
.ws__cell.is-pop { animation: cell-pop .5s var(--ease); }
@keyframes cell-pop { 40% { transform: scale(1.2); } }
.ws__words { display: flex; flex-wrap: wrap; gap: 8px; }
.ws__words li { display: inline-flex; align-items: baseline; gap: 8px; padding: .3em .9em; border-radius: 999px; border: 1.5px solid var(--line-strong); font-size: .9rem; }
.ws__words b { font-family: var(--f-latin-poster); font-weight: 800; letter-spacing: .04em; font-size: 1.05rem; }
.ws__words span { color: var(--muted); font-weight: 600; }
.ws__words li.is-found { background: var(--ink); color: var(--paper); border-color: var(--ink); text-decoration: line-through; text-decoration-thickness: 2px; }
.ws__words li.is-found span { color: color-mix(in srgb, var(--paper) 70%, transparent); }

/* quiz */
.quiz { display: flex; flex-direction: column; gap: 16px; min-height: 300px; flex: 1; justify-content: center; }
.quiz__top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .9rem; }
.quiz__dots { display: flex; gap: 5px; }
.quiz__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .25); transition: background-color .3s; }
.quiz__dots i.is-good { background: var(--sun); }
.quiz__dots i.is-bad { background: var(--accent); }
.quiz__dots i.is-now { background: #fff; transform: scale(1.3); }
.quiz__word { font-family: var(--f-serif); font-size: clamp(2.6rem, 1.6rem + 3vw, 4.2rem); font-weight: 600; line-height: 1.2; text-align: center; padding-block: 8px 0; }
.quiz__word:lang(fa) { font-family: "Markazi Text", serif; }
.quiz__translit { text-align: center; opacity: .7; font-size: .95rem; margin-block-start: -8px; }
.quiz__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiz__opt { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .12); font-weight: 700; font-size: 1.05rem; line-height: 1.4; transition: background-color .25s, transform .25s var(--ease), color .25s; }
.quiz__opt:hover:not(:disabled) { background: rgba(255, 255, 255, .22); transform: translateY(-2px); }
.quiz__opt.is-good { background: var(--sun); color: var(--ink); }
.quiz__opt.is-bad { background: var(--accent); color: #fff; animation: shake-x .4s; }
.quiz__opt:disabled { cursor: default; }
@keyframes shake-x { 25%, 75% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
.quiz__result { text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; padding-block: 20px; }
.quiz__big { font-family: var(--f-latin-poster); font-size: 5rem; font-weight: 800; line-height: 1; }
:lang(fa) .quiz__big { font-family: "Lalezar", sans-serif; font-weight: 400; }
.quiz__result .btn { --b-fg: var(--paper); --b-bd: var(--paper); --b-hover: var(--paper); --b-hover-fg: var(--ink); }

/* daily */
.daily { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.daily__main { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-block-end: 12px; border-bottom: 1.5px solid rgba(26, 23, 20, .2); }
.daily__main b { font-family: var(--f-serif); font-size: clamp(2.4rem, 1.6rem + 2.6vw, 3.8rem); line-height: 1.1; }
.daily__main b:lang(fa) { font-family: "Markazi Text", serif; }
.daily__main span { font-weight: 700; color: rgba(26, 23, 20, .65); }
.daily__item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .4); text-align: start; transition: background-color .25s, transform .25s var(--ease); }
.daily__item:hover { background: rgba(255, 255, 255, .75); transform: translateY(-2px); }
.daily__item b { font-family: var(--f-serif); font-size: 1.4rem; font-weight: 600; line-height: 1.2; }
.daily__item span { font-size: .75rem; font-weight: 700; color: rgba(26, 23, 20, .6); display: inline-flex; gap: 4px; align-items: center; }
.daily__item .icon { width: 1em; height: 1em; }
.daily__streak { margin-block-start: auto; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.daily__streak b { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding-inline: 8px; border-radius: 99px; background: var(--ink); color: var(--sun); font-family: var(--f-latin-poster); font-size: 1.3rem; }

/* letter hunt */
.hunt { display: flex; gap: 8px; flex-wrap: wrap; }
.hunt li { width: clamp(44px, 5vw, 62px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px; border: 2px dashed rgba(26, 23, 20, .3); font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 600; font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem); color: rgba(26, 23, 20, .2); transition: all .4s var(--ease); }
.hunt li.is-found { border: 2px solid var(--ink); background: var(--ink); color: var(--sun); transform: rotate(-4deg); }
.hunt li.is-found:nth-child(even) { transform: rotate(4deg); }
.hunt--mini li { width: 38px; border-radius: 10px; font-size: 1.25rem; }
.hunt__done { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-weight: 700; }

.hunt-letter {
	position: absolute;
	z-index: 5;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	font-family: "Cormorant Garamond", serif;
	font-style: italic;
	font-weight: 600;
	font-size: 1.35rem;
	line-height: 1;
	color: currentColor;
	opacity: .38;
	transition: opacity .3s, transform .4s var(--ease), background-color .3s;
	animation: bob 5s ease-in-out infinite;
}
.hunt-letter:hover, .hunt-letter:focus-visible { opacity: 1; transform: scale(1.3) rotate(-10deg); background: var(--sun); color: var(--ink); }
.hunt-letter.is-found { display: none; }
@keyframes bob { 50% { translate: 0 -6px; } }
.hunt-letter--hero { top: 52%; inset-inline-start: 30%; }
.hunt-letter--manifesto { bottom: -46px; inset-inline-end: 10%; }
.hunt-letter--chapter { bottom: 8%; inset-inline-start: 46%; }
.hunt-letter--method { bottom: 18px; inset-inline-end: 22px; }
.hunt-letter--phone { top: 46%; inset-inline-end: -36px; }
.hunt-letter--journal { position: relative; display: inline-grid; margin-block-start: 18px; }
.hunt-letter--footer { position: relative; display: inline-grid; margin-block-start: 14px; }

/* ---------- Journal & cards ---------- */

.journal { padding-block: clamp(90px, 12vw, 170px) clamp(60px, 8vw, 110px); }
.journal__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; margin-block-end: clamp(32px, 4vw, 56px); }
.journal__empty { font-size: var(--fs-lead); color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.card { --tone: var(--c-tr); }
.card--en { --tone: var(--c-en); }
.card--de { --tone: var(--c-de); }
.card--ru { --tone: var(--c-ru); }
.card--fa { --tone: var(--c-fa); }
.card__link { display: flex; flex-direction: column; height: 100%; gap: 16px; }
.card__media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--tone); display: grid; place-items: center; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card__placeholder { width: 58%; display: block; transition: transform .8s var(--ease); }
.card__placeholder img { object-fit: contain; filter: var(--shadow-obj); }
.card__link:hover .card__media > img, .card__link:hover .card__placeholder { transform: scale(1.06) rotate(-1.5deg); }
.card__body { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.card__cat { color: var(--accent); }
.card__title { font-family: var(--f-serif); font-size: clamp(1.35rem, 1.1rem + .8vw, 1.8rem); font-weight: 600; line-height: 1.25; text-wrap: balance; }
:lang(fa) .card__title { line-height: 1.6; font-weight: 700; }
.card__excerpt { color: var(--ink-2); line-height: 1.7; font-size: .97rem; }
:lang(fa) .card__excerpt { line-height: 1.95; }
.card__more { margin-block-start: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .92rem; transition: gap .3s var(--ease); }
.card__link:hover .card__more { gap: 14px; color: var(--accent); }

/* A lone post gets a wide, horizontal card */
.cards > .card:only-child { grid-column: 1 / -1; }
.cards > .card:only-child .card__link { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.cards > .card:only-child .card__title { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.8rem); }
.cards > .card:only-child .card__excerpt { font-size: 1.05rem; max-width: 52ch; }
@media (max-width: 700px) { .cards > .card:only-child .card__link { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq { padding-block: clamp(70px, 9vw, 130px); border-top: 1px solid var(--line); }
.faq__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(30px, 5vw, 80px); align-items: start; }
.faq__head { position: sticky; top: calc(var(--top-pad) + 30px); }
.faq__compass { width: clamp(100px, 11vw, 170px); margin-block-start: 30px; }
.faq__compass img { filter: var(--shadow-obj); transform: rotate(-12deg); }
.faq__list { border-top: 1px solid var(--line-strong); }
.faq__item { border-bottom: 1px solid var(--line-strong); }
.faq__item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 22px; cursor: pointer; font-family: var(--f-serif); font-size: clamp(1.2rem, 1rem + .7vw, 1.6rem); font-weight: 600; line-height: 1.35; }
:lang(fa) .faq__item summary { line-height: 1.7; font-weight: 700; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary i { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: transform .45s var(--ease), background-color .3s; }
.faq__item summary i::before, .faq__item summary i::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 1.6px; margin: -.8px 0 0 -6px; background: currentColor; transition: transform .45s var(--ease); }
.faq__item summary i::after { transform: rotate(90deg); }
.faq__item[open] summary i { transform: rotate(180deg); background: var(--ink); color: var(--paper); }
.faq__item[open] summary i::after { transform: rotate(0); }
.faq__a { overflow: hidden; }
.faq__a p { padding-block-end: 24px; color: var(--ink-2); line-height: 1.8; max-width: 62ch; }
:lang(fa) .faq__a p { line-height: 2.05; }

/* ---------- Contact ---------- */

.contact { padding-block: clamp(90px, 12vw, 170px); background: var(--paper-2); overflow: clip; }
.contact__title { font-size: clamp(4.4rem, 1.4rem + 13vw, 17rem); margin-block: .05em .15em; }
.contact__sub { font-size: var(--fs-lead); color: var(--ink-2); max-width: 46ch; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 20px; margin-block-start: clamp(40px, 5vw, 70px); align-items: start; }
.composer { padding: clamp(22px, 3vw, 40px); border-radius: var(--radius-lg); background: var(--paper); display: flex; flex-direction: column; gap: 22px; box-shadow: 0 1px 0 var(--line); }
.composer__title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.composer__title .icon { color: var(--accent); }
.composer__set legend { font-weight: 700; font-size: .9rem; color: var(--muted); margin-block-end: 10px; }
.composer__preview { display: block; padding: 18px 20px; border-radius: 18px; background: var(--ink); color: var(--paper); font-size: 1.05rem; line-height: 1.75; position: relative; }
:lang(fa) .composer__preview { line-height: 2; }
.composer__preview::after { content: ""; position: absolute; bottom: -9px; inset-inline-start: 28px; width: 18px; height: 18px; background: inherit; transform: rotate(45deg); border-radius: 3px; }
.composer__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 6px; }
.composer__note { font-size: .82rem; color: var(--muted); }
.channels { display: flex; flex-direction: column; gap: 12px; }
.channel { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon name" "icon value"; gap: 0 16px; align-items: center; padding: 20px 22px; border-radius: var(--radius); background: var(--paper); transition: transform .4s var(--ease), background-color .3s, color .3s; }
.channel:hover { transform: translateY(-3px); }
.channel__icon { grid-area: icon; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.channel__icon .icon { width: 26px; height: 26px; }
.channel--wa .channel__icon { background: #1FA855; }
.channel--tg .channel__icon { background: #2A9BD8; }
.channel--em .channel__icon { background: var(--accent); }
.channel--wa:hover { background: #1FA855; color: #fff; }
.channel--tg:hover { background: #2A9BD8; color: #fff; }
.channel--em:hover { background: var(--accent); color: #fff; }
.channel:hover .channel__icon { background: rgba(255, 255, 255, .2); }
.channel__name { grid-area: name; font-weight: 800; font-size: 1.1rem; }
.channel__value { grid-area: value; font-size: .9rem; opacity: .75; text-align: start; }
[dir="rtl"] .channel__value { text-align: end; }
.contact-page .contact { padding-block-start: calc(var(--top-pad) + clamp(40px, 6vw, 90px)); }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--paper); padding-block: clamp(60px, 8vw, 110px) 28px; overflow: clip; }
.footer__mark { display: flex; justify-content: space-between; align-items: baseline; gap: 4vw; font-family: var(--f-latin-poster); font-weight: 800; font-size: clamp(3.6rem, 1rem + 12vw, 15rem); line-height: .9; letter-spacing: -.01em; text-transform: uppercase; color: var(--paper); padding-block-end: clamp(30px, 4vw, 60px); border-bottom: 1px solid rgba(255, 255, 255, .15); white-space: nowrap; }
.footer__mark span:lang(fa) { font-family: "Lalezar", sans-serif; font-weight: 400; text-transform: none; line-height: 1.25; color: var(--sun); }
.footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: clamp(36px, 5vw, 60px); }
.footer__brand { font-family: var(--f-serif); font-size: 1.6rem; font-weight: 600; margin-block-end: 10px; }
.footer__about p:last-child { color: rgba(247, 241, 230, .68); line-height: 1.8; max-width: 44ch; }
.footer__label { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(247, 241, 230, .5); margin-block-end: 14px; }
:lang(fa) .footer__label { letter-spacing: 0; font-size: .88rem; }
.footer__nav ul, .footer__talk ul { display: flex; flex-direction: column; gap: 8px; }
.footer__nav a, .footer__talk a { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; opacity: .9; transition: opacity .25s, transform .3s var(--ease); }
.footer__nav a:hover, .footer__talk a:hover { opacity: 1; transform: translateX(4px); color: var(--sun); }
[dir="rtl"] .footer__nav a:hover, [dir="rtl"] .footer__talk a:hover { transform: translateX(-4px); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block-start: 22px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .85rem; color: rgba(247, 241, 230, .6); }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer__links a:hover { color: var(--paper); }

/* ---------- Passport dialog ---------- */

.passport { padding: 0; border: 0; background: transparent; max-width: min(560px, calc(100vw - 24px)); width: 100%; max-height: min(92vh, 900px); color: var(--ink); overflow: visible; }
.passport::backdrop { background: rgba(20, 16, 12, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.passport[open] { animation: passport-in .55s var(--ease); }
.passport[open]::backdrop { animation: fade-in .4s; }
@keyframes passport-in { from { opacity: 0; transform: translateY(30px) rotateX(18deg) scale(.96); } }
@keyframes fade-in { from { opacity: 0; } }
.passport__book { border-radius: 26px; overflow: hidden; max-height: min(92vh, 900px); display: flex; flex-direction: column; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .55); }
.passport__cover { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--burgundy); color: #F3DDB0; }
.passport__cover-img { width: 58px; flex: none; }
.passport__cover-img img { transform: rotate(-8deg); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.passport__kicker { font-size: .72rem; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; opacity: .7; }
:lang(fa) .passport__kicker { letter-spacing: 0; font-size: .82rem; }
.passport__title { font-family: var(--f-serif); font-size: 1.6rem; font-weight: 600; line-height: 1.3; }
.passport__close { margin-inline-start: auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .1); transition: background-color .25s, transform .3s var(--ease); }
.passport__close:hover { background: rgba(255, 255, 255, .2); transform: rotate(90deg); }
.passport__page {
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 22px 22px 18px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	background:
		repeating-radial-gradient(circle at 100% 0, transparent 0 14px, rgba(107, 30, 43, .045) 14px 15px),
		repeating-radial-gradient(circle at 0 100%, transparent 0 18px, rgba(18, 128, 121, .04) 18px 19px),
		var(--cream);
}
.passport__id { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center; padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .65); border: 1px solid var(--line); }
.passport__level { grid-row: span 3; width: 88px; height: 104px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: var(--sun); font-family: var(--f-latin-poster); font-weight: 800; font-size: 2.6rem; }
.passport__data { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 16px; justify-content: start; }
.passport__data div { display: flex; flex-direction: column; }
.passport__data dt { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
:lang(fa) .passport__data dt { text-transform: none; letter-spacing: 0; font-size: .78rem; }
.passport__data dd { font-weight: 800; }
.xpbar { height: 10px; border-radius: 99px; background: var(--paper-3); overflow: hidden; }
.xpbar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--sun), var(--accent)); border-radius: inherit; transition: width .9s var(--ease); }
[dir="rtl"] .xpbar i { background: linear-gradient(-90deg, var(--sun), var(--accent)); }
.passport__next { font-size: .82rem; color: var(--muted); font-weight: 600; }
.passport__h { font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-block-start: 6px; }
:lang(fa) .passport__h { letter-spacing: 0; font-size: .9rem; }
.passport__empty { font-size: .9rem; color: var(--muted); }

.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stamp { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.stamp__ring { --sc: var(--c-tr); width: 100%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 0; border: 2px dashed var(--line-strong); color: var(--line-strong); font-size: .78rem; line-height: 1.2; filter: grayscale(1); opacity: .5; }
.stamp--en .stamp__ring { --sc: var(--c-en); }
.stamp--de .stamp__ring { --sc: #B07C10; }
.stamp--ru .stamp__ring { --sc: var(--c-ru); }
.stamp--fa .stamp__ring { --sc: var(--accent); }
.stamp__native { font-family: var(--f-latin-poster); font-weight: 800; font-size: .95rem; text-transform: uppercase; }
.stamp__native:lang(fa) { font-family: "Lalezar", sans-serif; font-weight: 400; font-size: 1.05rem; }
.stamp__native:lang(ru) { font-family: "Oswald", sans-serif; font-weight: 600; font-size: .8rem; }
.stamp__date { font-size: .6rem; font-weight: 700; opacity: .8; }
.stamp__name { font-size: .72rem; font-weight: 700; color: var(--muted); }
.stamp.is-on .stamp__ring { border: 3px double var(--sc); color: var(--sc); filter: none; opacity: 1; transform: rotate(var(--r, -10deg)); background: radial-gradient(circle, transparent 55%, color-mix(in srgb, var(--sc) 8%, transparent)); }
.stamp.is-on:nth-child(2) .stamp__ring { --r: 8deg; }
.stamp.is-on:nth-child(3) .stamp__ring { --r: -4deg; }
.stamp.is-on:nth-child(4) .stamp__ring { --r: 12deg; }
.stamp.is-new .stamp__ring { animation: stamp-in .7s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes stamp-in { from { transform: scale(2.4) rotate(-30deg); opacity: 0; } 60% { opacity: 1; } }

.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.badge { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i n" "i d"; gap: 0 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); opacity: .45; filter: grayscale(1); }
.badge__icon { grid-area: i; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-3); }
.badge__name { grid-area: n; font-weight: 800; font-size: .9rem; line-height: 1.3; }
.badge__desc { grid-area: d; font-size: .74rem; color: var(--muted); line-height: 1.4; }
.badge.is-on { opacity: 1; filter: none; background: #fff; }
.badge.is-on .badge__icon { background: var(--sun); color: var(--ink); }
.passport__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block-start: 10px; border-top: 1px dashed var(--line-strong); font-size: .8rem; color: var(--muted); }
.passport__reset { font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Toasts ---------- */

.toasts { position: fixed; z-index: 140; bottom: 20px; inset-inline-start: 50%; translate: -50% 0; display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; pointer-events: none; }
[dir="rtl"] .toasts { translate: 50% 0; }
.toast { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: .92rem; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .45); animation: toast-in .5s var(--ease); white-space: nowrap; }
[dir="rtl"] .toast { padding: 10px 12px 10px 18px; }
.toast__i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); color: var(--ink); flex: none; }
.toast__i .icon { width: 16px; height: 16px; }
.toast--level .toast__i { background: var(--accent); color: #fff; }
.toast.is-out { animation: toast-out .4s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(18px) scale(.9); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.95); } }

.xp-fly { position: fixed; z-index: 141; pointer-events: none; font-family: var(--f-latin-poster); font-weight: 800; font-size: 1.3rem; color: var(--accent); text-shadow: 0 2px 0 var(--paper); }

/* ---------- Cursor ---------- */

.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
	.motion .cursor { display: block; position: fixed; top: 0; left: 0; z-index: 160; pointer-events: none; }
	.cursor span { display: block; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--ink); mix-blend-mode: difference; filter: invert(1); transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), opacity .3s; }
	.cursor.is-hover span { width: 54px; height: 54px; margin: -27px 0 0 -27px; opacity: .9; }
	.cursor.is-hidden span { opacity: 0; }
}

/* ---------- Generic page hero ---------- */

.page-hero { position: relative; padding-block: calc(var(--top-pad) + clamp(50px, 8vw, 120px)) clamp(50px, 6vw, 90px); overflow: clip; }
.page-hero__title { font-family: var(--f-serif); font-size: var(--fs-h1); font-weight: 500; line-height: 1.02; letter-spacing: -.015em; max-width: 16ch; text-wrap: balance; }
:lang(fa) .page-hero__title { line-height: 1.4; font-weight: 600; letter-spacing: 0; }
.page-hero__lede { font-size: var(--fs-lead); color: var(--ink-2); max-width: 52ch; margin-block-start: 1.4rem; line-height: 1.7; }
:lang(fa) .page-hero__lede { line-height: 2; }
.page-hero__obj { position: absolute; width: clamp(140px, 20vw, 320px); top: calc(var(--top-pad) + 30px); inset-inline-end: var(--gutter); }
.page-hero__obj img { filter: var(--shadow-obj); }
.page-hero__search { margin-block-start: 30px; max-width: 520px; }
.page-hero--plain { padding-block-end: 30px; }

.sbox { display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 999px; padding-inline: 20px 6px; background: var(--paper); transition: border-color .3s, box-shadow .3s; }
.sbox:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sun) 60%, transparent); }
.sbox__input { flex: 1; min-width: 0; height: 52px; border: 0; background: transparent; outline: 0; }
.sbox__btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); }

.archive-list { padding-block: 20px clamp(80px, 10vw, 140px); }
.cards--archive { row-gap: clamp(40px, 5vw, 64px); }
.archive-list__empty { font-size: var(--fs-lead); color: var(--muted); }
.pagination { margin-block-start: 60px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { min-width: 46px; height: 46px; display: grid; place-items: center; padding-inline: 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); font-weight: 700; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* about page */
.company { padding-block: clamp(40px, 6vw, 90px) clamp(80px, 10vw, 140px); }
.company__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(30px, 6vw, 100px); }
.company__text { display: flex; flex-direction: column; gap: 20px; font-size: 1.1rem; line-height: 1.85; color: var(--ink-2); }
:lang(fa) .company__text { line-height: 2.1; }
.lang-table { padding-block: clamp(80px, 10vw, 140px) 20px; }
.lang-rows { margin-block-start: 34px; border-top: 1px solid var(--line-strong); }
.lang-row { position: relative; display: grid; grid-template-columns: 60px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.5fr) 90px; gap: 16px; align-items: center; padding-block: 18px; border-bottom: 1px solid var(--line); isolation: isolate; transition: color .4s; }
.lang-row::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1; background: var(--c); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); }
.lang-row:hover::before { transform: scaleY(1); }
.lang-row:hover { color: var(--cream); }
.lang-row:nth-child(3):hover, .lang-row:nth-child(5):hover { color: var(--ink); }
.lang-row__num { font-weight: 700; opacity: .5; }
.lang-row__native { font-family: var(--f-latin-poster); font-weight: 800; font-size: clamp(1.8rem, 1rem + 2.4vw, 3.2rem); text-transform: uppercase; line-height: 1; }
.lang-row__native:lang(fa) { font-family: "Lalezar", sans-serif; font-weight: 400; line-height: 1.4; }
.lang-row__native:lang(ru) { font-family: "Oswald", sans-serif; font-weight: 700; }
.lang-row__name { font-family: var(--f-serif); font-size: 1.3rem; font-weight: 600; }
.lang-row__level b { font-family: var(--f-latin-poster); font-size: 1.3rem; }
:lang(fa) .lang-row__level b { font-family: var(--f-body); font-size: 1rem; }
.lang-row__for { font-size: .92rem; opacity: .8; line-height: 1.6; }
.lang-row__img img { width: 72px; margin-inline: auto; filter: var(--shadow-obj); transition: transform .5s var(--ease); }
.lang-row:hover .lang-row__img img { transform: scale(1.25) rotate(-8deg); }
.why { padding-block: clamp(80px, 10vw, 140px); background: var(--c-en); color: var(--cream); }
.why .kicker { color: color-mix(in srgb, var(--cream) 65%, transparent); }
.why__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-block-start: 50px; }
.why__item { display: flex; flex-direction: column; gap: 10px; padding-block-start: 20px; border-top: 1px solid rgba(255, 255, 255, .25); }
.why__num { font-family: "Cormorant Garamond", "Markazi Text", serif; font-size: 3rem; line-height: 1; color: var(--sun); }
.why__item h3 { font-family: var(--f-serif); font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
.why__item p { opacity: .8; line-height: 1.75; }
:lang(fa) .why__item p { line-height: 2; }
.page-extra, .page-body { padding-block: 20px clamp(80px, 10vw, 140px); }

/* 404 */
.lost { padding-block: calc(var(--top-pad) + clamp(40px, 6vw, 90px)) clamp(80px, 10vw, 140px); min-height: 90svh; }
.lost__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 90px); align-items: center; }
.lost__compass img { filter: var(--shadow-obj); }
.lost__code { font-family: var(--f-latin-poster); font-weight: 800; font-size: clamp(4rem, 2rem + 6vw, 8rem); line-height: 1; color: var(--accent); }
:lang(fa) .lost__code { font-family: "Lalezar", sans-serif; font-weight: 400; }
.lost__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.lost__body { font-size: var(--fs-lead); color: var(--ink-2); max-width: 44ch; }
.lost__label { font-weight: 700; color: var(--muted); }

/* ---------- Single post ---------- */

.progress { position: fixed; top: 0; inset-inline: var(--rail) var(--edge); height: 3px; z-index: 85; }
.progress i { display: block; height: 100%; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: left; }
[dir="rtl"] .progress i { transform-origin: right; }
.post__head { padding-block: calc(var(--top-pad) + clamp(40px, 6vw, 90px)) clamp(30px, 4vw, 50px); max-width: calc(980px + var(--gutter) * 2); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--muted); margin-block-end: 22px; }
.crumbs a:hover { color: var(--ink); }
.post__title { font-family: var(--f-serif); font-size: clamp(2.3rem, 1.4rem + 3.6vw, 5rem); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
:lang(fa) .post__title { line-height: 1.5; font-weight: 700; letter-spacing: 0; font-size: clamp(2rem, 1.3rem + 2.8vw, 4rem); }
.post__lede { font-size: var(--fs-lead); color: var(--ink-2); margin-block-start: 18px; line-height: 1.7; max-width: 60ch; }
:lang(fa) .post__lede { line-height: 2; }
.post__meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-block-start: 22px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.post__meta a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.post__cover img { width: 100%; border-radius: var(--radius-lg); }
.post__layout { display: grid; grid-template-columns: 260px minmax(0, 720px); gap: clamp(30px, 5vw, 80px); justify-content: center; padding-block: clamp(30px, 4vw, 60px); }
.post__aside { position: sticky; top: calc(var(--top-pad) + 24px); align-self: start; display: flex; flex-direction: column; gap: 28px; max-height: calc(100vh - var(--top-pad) - 48px); overflow: auto; }
.toc__title, .share__title { font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-block-end: 12px; }
:lang(fa) .toc__title, :lang(fa) .share__title { letter-spacing: 0; font-size: .88rem; }
.toc__list { display: flex; flex-direction: column; gap: 2px; border-inline-start: 1.5px solid var(--line); }
.toc__list a { display: block; padding: 5px 14px; margin-inline-start: -1.5px; border-inline-start: 1.5px solid transparent; font-size: .9rem; line-height: 1.55; color: var(--muted); transition: color .25s, border-color .25s; }
.toc__list a:hover { color: var(--ink); }
.toc__list a.is-active { color: var(--ink); border-color: var(--accent); font-weight: 700; }
.share__list { display: flex; gap: 8px; }
.share__list a, .share__list button { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: background-color .25s, color .25s, border-color .25s; }
.share__list a:hover, .share__list button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.post__foot { max-width: calc(980px + var(--gutter) * 2); padding-block-end: clamp(50px, 6vw, 90px); display: flex; flex-direction: column; gap: 30px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { display: inline-block; padding: .3em .9em; border-radius: 999px; background: var(--paper-2); font-weight: 600; font-size: .9rem; transition: background-color .25s, color .25s; }
.tags a:hover { background: var(--ink); color: var(--paper); }
.author-box { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 24px; border-radius: var(--radius-lg); background: var(--paper-2); }
.author-box__sig { font-family: "Nastaliq", serif; font-size: 2.6rem; line-height: 1.6; width: 96px; height: 96px; display: grid; place-items: center; border-radius: 50%; background: var(--blush); }
.author-box > div { flex: 1; min-width: 200px; }
.author-box__name { font-family: var(--f-serif); font-size: 1.5rem; font-weight: 700; }
.author-box__bio { color: var(--muted); }
.related { padding-block: clamp(60px, 8vw, 110px); background: var(--paper-2); }
.related .section-title { margin-block-end: 34px; }
.comments { padding-block: clamp(60px, 8vw, 110px); }
.comment-list { display: flex; flex-direction: column; gap: 16px; margin-block: 24px 40px; }
.comment-list .children { margin-inline-start: 28px; margin-block-start: 16px; display: flex; flex-direction: column; gap: 16px; }
.comment-body { padding: 20px; border-radius: var(--radius); background: var(--paper-2); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .9rem; margin-block-end: 8px; }
.comment-meta img { border-radius: 50%; }
.comment-metadata { color: var(--muted); font-size: .82rem; }
.reply a { font-weight: 700; font-size: .88rem; color: var(--accent); }
.comment-respond { margin-block-start: 30px; }
.comment-form { display: grid; gap: 14px; margin-block-start: 20px; }
.comment-form label { display: block; font-weight: 700; font-size: .9rem; margin-block-end: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: var(--paper); outline: 0; transition: border-color .25s, box-shadow .25s; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sun) 60%, transparent); }
.comment-form .form-submit { margin: 0; }
.comment-notes, .logged-in-as { font-size: .9rem; color: var(--muted); }

/* ---------- Prose (post & page content) ---------- */

.prose { font-size: 1.125rem; line-height: 1.85; color: var(--ink-2); }
:lang(fa) .prose { line-height: 2.15; }
.prose--narrow { max-width: calc(760px + var(--gutter) * 2); }
.prose > * + * { margin-block-start: 1.15em; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); font-family: var(--f-serif); font-weight: 600; text-wrap: balance; }
.prose h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.25; margin-block-start: 2.2em; }
.prose h3 { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.7rem); line-height: 1.35; margin-block-start: 1.8em; }
:lang(fa) .prose h2, :lang(fa) .prose h3 { line-height: 1.6; font-weight: 700; }
.prose h2 + *, .prose h3 + * { margin-block-start: .7em; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color .25s; }
.prose a:hover { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 800; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: ""; position: absolute; inset-inline-start: -1.05em; top: .85em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.prose ol { list-style: decimal; }
:lang(fa) .prose ol { list-style: persian; }
.prose li + li { margin-block-start: .4em; }
.prose blockquote { margin-inline: 0; padding: 22px 26px; border-inline-start: 4px solid var(--accent); background: var(--paper-2); border-radius: 0 18px 18px 0; font-family: var(--f-serif); font-size: 1.25em; line-height: 1.6; color: var(--ink); }
[dir="rtl"] .prose blockquote { border-radius: 18px 0 0 18px; }
.prose img, .prose figure img { border-radius: 18px; }
.prose figure { margin-inline: 0; }
.prose figcaption { font-size: .85rem; color: var(--muted); margin-block-start: 8px; text-align: center; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; }
.prose th { color: var(--ink); font-weight: 800; }
.prose code { font-size: .9em; padding: .15em .4em; border-radius: 6px; background: var(--paper-2); }
.prose hr { border: 0; height: 1px; background: var(--line-strong); margin-block: 2.4em; }
.prose details { padding: 14px 18px; border-radius: 16px; background: var(--paper-2); }
.prose details summary { font-weight: 800; cursor: pointer; color: var(--ink); }
.prose .wp-block-button__link, .prose .elx-btn, .prose a.elx-cta { display: inline-flex; align-items: center; gap: .5em; padding: .7em 1.4em; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 700; }
.prose .wp-block-button__link:hover, .prose .elx-btn:hover { background: var(--accent); color: #fff; }

/* Callouts and blocks used in migrated content */
.prose .callout { padding: 20px 24px; border-radius: 20px; background: var(--paper-2); color: var(--ink); }
.prose .callout > * + * { margin-block-start: .6em; }
.prose .callout--lead { background: var(--ink); color: var(--paper); font-family: var(--f-serif); font-size: 1.2em; line-height: 1.6; }
.prose .callout--lead strong { color: inherit; font-weight: 600; }
:lang(fa) .prose .callout--lead { line-height: 1.95; }
.prose .facts-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; }
.prose .facts-list > li { margin: 0; padding: 10px 16px; border-radius: 16px; background: var(--paper-2); font-size: .95em; }
.prose .facts-list > li::before { display: none; }
.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.prose .wp-block-details { margin-block-start: 10px; }
.prose .wp-block-details + .wp-block-details { margin-block-start: 8px; }
.prose .wp-block-details > *:not(summary) { margin-block-start: .6em; }

/* Legacy markup pasted from the previous site (elx-*). Readable defaults until it is cleaned up. */
.prose .elx-wrap { max-width: none; font-family: inherit; }
.prose .elx-hero, .prose .elx-summary, .prose .elx-note, .prose .elx-box, .prose .elx-tip { padding: 20px 22px; border-radius: 18px; background: var(--paper-2); color: var(--ink); }
.prose .elx-hero { background: var(--ink); color: var(--paper); font-family: var(--f-serif); font-size: 1.2em; }
.prose .elx-stats, .prose .elx-grid, .prose .elx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.prose .elx-stat, .prose .elx-card, .prose .elx-feature { padding: 18px; border-radius: 18px; background: var(--paper-2); }
.prose .elx-stat strong, .prose .elx-stat b { display: block; font-family: "Lalezar", var(--f-poster); font-weight: 400; font-size: 2rem; line-height: 1.3; }

/* ---------- Motion states (only when JS + GSAP are running) ---------- */

.motion [data-reveal] { opacity: 0; transform: translateY(26px); }
.motion [data-words] .wi { transform: translateY(105%); }
.motion .hero__line-in { transform: translateY(105%); }
.motion [data-hero-in] { opacity: 0; transform: translateY(18px); }
.motion .hero .obj { opacity: 0; }
.motion .is-in[data-reveal] { opacity: 1; transform: none; }

/* ---------- View transitions between pages ---------- */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .35s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-in .55s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
	.masthead__nav .nav__link { font-size: .9rem; }
	.lang-row { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) 80px; }
	.lang-row__for, .lang-row__name { display: none; }
	.why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
	:root { --rail: 0px; --edge: 0px; --mast-h: 66px; --top-pad: 66px; }
	.rail, .edge { display: none; }
	.masthead { position: fixed; inset: 0 0 auto; transition: transform .5s var(--ease), box-shadow .4s; }
	.masthead.is-hidden { transform: translateY(-110%); }
	.masthead.is-solid { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .5); }
	.masthead__inner { min-height: var(--mast-h); padding-block: 8px; }
	.masthead__end { display: none; }
	.masthead__mobile { display: flex; }
	.wordmark__name { font-size: 1.55rem; }
	:lang(fa) .wordmark__name { font-size: 1.3rem; }
	.wordmark__sub { display: none; }
	.drawer__panel { grid-template-columns: 56px minmax(0, 1fr); }
	.drawer__groups { grid-template-columns: 1fr; }
	.hero__bottom { grid-template-columns: 1fr; }
	.manifesto__title { grid-column: 1 / -1; }
	.manifesto__aside { grid-column: 1 / -1; }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.stat { padding-block-end: 22px; border-bottom: 1px solid var(--line); }
	.stat:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
	.chapter__inner { grid-template-columns: 1fr; grid-template-areas: "num" "title" "media" "body"; grid-template-rows: none; }
	.lix__row, .lix .lix__row.is-active { grid-template-columns: 34px 40px minmax(0, 1fr) 40px; }
	.lix__dot { width: 40px; height: 40px; scale: 1; opacity: 1; }
	.lix__meta { display: none; }
	.lix__go { width: 40px; height: 40px; }
	.chapter__media { min-height: 0; margin-block: 10px 30px; }
	.chapter__media img { width: min(72%, 380px); }
	.chapter--en .chapter__media img, .chapter--ru .chapter__media img { width: min(42%, 220px); }
	.story__grid, .app__grid, .faq__grid, .company__grid, .lost__grid { grid-template-columns: 1fr; }
	.idcard-wrap { max-width: 620px; margin-inline: auto; }
		.faq__head { position: static; }
	.faq__compass { display: none; }
	.app__device { order: -1; margin-block-end: 20px; }
	.play__grid > .game { grid-column: 1 / -1; }
	.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.contact__grid { grid-template-columns: 1fr; }
	.footer__cols { grid-template-columns: 1fr 1fr; }
	.footer__about { grid-column: 1 / -1; }
	.post__layout { grid-template-columns: minmax(0, 1fr); }
	.post__aside { position: static; max-height: none; order: 2; }
	.toc { display: none; }
	.page-hero__obj { position: relative; top: 0; inset-inline-end: auto; width: 150px; margin-block-start: 30px; margin-inline-start: auto; }
}

@media (max-width: 700px) {
	.btn { min-height: 48px; padding-inline: 1.2em; font-size: .93rem; }
	.hero__stage { min-height: calc(100svh - var(--mast-h)); }
	.hero__art { margin-block: 14vh 10vh; }
	:root { --fs-poster: calc((100vw - 2 * var(--gutter)) / 3.35); }
	:root:lang(fa) { --fs-poster: calc((100vw - 2 * var(--gutter)) / 2.42); }
	.obj--plane { width: 21vw; top: -26%; inset-inline-end: 0; }
	.obj--doll { width: 9vw; top: -20%; inset-inline-start: 46%; }
	.obj--tea { width: 18vw; top: 4%; inset-inline-start: auto; inset-inline-end: 3%; }
	[dir="ltr"] .obj--tea { inset-inline-start: auto; }
	.obj--pretzel { width: 16vw; bottom: -22%; inset-inline-start: 2%; }
	.obj--booth { display: none; }
	.obj--pom { width: 18vw; bottom: -24%; inset-inline-end: 34%; }
	[dir="ltr"] .obj--pom { inset-inline-end: 34%; }
		.hero__hellos { margin-block-start: 18px; }
	.hero__hint { flex-basis: 100%; }
	.method__grid { grid-template-columns: 1fr; }
	.mcard { min-height: 0; }
	.talkbar { height: 54px; font-size: .9rem; }
	.cards { grid-template-columns: 1fr; }
	.quiz__opts { grid-template-columns: 1fr; }
	.stamps { grid-template-columns: repeat(5, 1fr); gap: 4px; }
	.stamp__native { font-size: .72rem; }
	.badges { grid-template-columns: 1fr; }
	.passport__level { width: 70px; height: 84px; font-size: 2rem; }
	.passport__data { grid-template-columns: 1fr 1fr; }
	.footer__cols { grid-template-columns: 1fr; }
	.footer__mark { flex-direction: column; gap: 0; }
	.lang-row { grid-template-columns: 34px minmax(0, 1fr) 64px; }
	.lang-row__level { display: none; }
	.lang-row__img img { width: 54px; }
	.why__grid { grid-template-columns: 1fr; }
	.hunt-letter--phone { inset-inline-end: -8px; }
	.idcard-wrap { padding: 46px 8px 70px; }
	.idcard__body { grid-template-columns: 1fr; gap: 14px; }
	.idcard__seal { width: 104px; position: absolute; inset-inline-end: 14px; top: 76px; opacity: .9; }
	.idcard__seal-n { font-size: 2.6rem; }
	.idcard__fields { grid-template-columns: 1fr; }
	.idcard__field.is-name { padding-inline-end: 110px; }
	.idstamp { --s: 72px !important; }
	.idstamp b { font-size: .8rem; }
	.idstamp i { display: none; }
	.idcard__pen { width: 120px; bottom: -40px; inset-inline-end: -10px; }
	.idstamp--tr { top: 4px; inset-inline-end: auto; inset-inline-start: 40%; }
	.idstamp--fa { top: auto; bottom: 150px; inset-inline-start: auto; inset-inline-end: -6px; }
	.idstamp--de { top: 30%; inset-inline-start: auto; inset-inline-end: -8px; }
	.langnav a { height: 38px; padding: 4px; }
	.langnav__flag { width: 30px; height: 30px; }
	.langnav a.is-active { padding-inline-end: 12px; }
	.play__passport { position: relative; top: 0; margin-block-start: 20px; width: 140px; }
}

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

/* ==========================================================================
   English hero on wide screens (961px and up).
   The decorative objects sit in the empty space around the name, and every
   object stays behind the letters. Persian and mobile are not affected.
   ========================================================================== */
@media (min-width: 961px) {
	:lang(en) .hero .obj { z-index: 1; }
	:lang(en) .hero .obj--plane { width: clamp(110px, 12vw, 210px); top: -12%; inset-inline-end: 1%; }
	:lang(en) .hero .obj--booth { width: clamp(44px, 4vw, 74px); top: 4%; inset-inline-start: auto; inset-inline-end: 27%; }
	:lang(en) .hero .obj--doll { width: clamp(60px, 5.6vw, 100px); top: -10%; inset-inline-start: 57%; inset-inline-end: auto; }
	:lang(en) .hero .obj--tea { width: clamp(90px, 8vw, 140px); top: 27%; inset-inline-start: auto; inset-inline-end: 6%; }
	:lang(en) .hero .obj--pretzel { width: clamp(90px, 9vw, 150px); top: 50%; bottom: auto; inset-inline-start: 0; }
	:lang(en) .hero .obj--pom { width: clamp(84px, 8vw, 135px); top: 66%; bottom: auto; inset-inline-start: 13%; inset-inline-end: auto; }
}
