/* looupe — сайт. Зависимостей нет: только системные шрифты и один файл стилей. */

:root {
	--paper: #fbfaf8;
	--ink: #16110c;
	--muted: #6f675f;
	--hair: #e4ded5;
	--hair-soft: #efeae2;
	--accent: #a9713a;
	--card: #ffffff;
	--serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Тёмная тема: системная настройка действует, пока не выбрано вручную. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--paper: #100e0c;
		--ink: #ece7e0;
		--muted: #948b81;
		--hair: #2b2723;
		--hair-soft: #1e1b18;
		--accent: #d5a06a;
		--card: #171412;
	}
}

/* Ручной выбор перебивает системную настройку в обе стороны. */
:root[data-theme="dark"] {
	--paper: #100e0c;
	--ink: #ece7e0;
	--muted: #948b81;
	--hair: #2b2723;
	--hair-soft: #1e1b18;
	--accent: #d5a06a;
	--card: #171412;
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

/* Переключение языка: показывается ровно одна версия текста. */
html[data-lang="ru"] [data-l="en"],
html[data-lang="en"] [data-l="ru"] { display: none !important; }

a { color: inherit; text-decoration-color: var(--hair); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---------- Шапка ---------- */

.top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 0 0;
}

.brand {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

/* В шапке — знак; надпись переехала на первый экран. Мельче ~46px линия
   рисунка сливается в кляксу — это одноконтурный рисунок, не пиктограмма. */
.brand img {
	display: block;
	width: 46px;
	height: 46px;
}

/* Название — контуры SnellRoundhand-Black, тот же знак, что на сплэше
   приложения. Шрифт есть только на устройствах Apple, поэтому не семейство,
   а вектор: рисунок одинаков везде и красится currentColor вместе с темой. */
.wordmark {
	display: block;
	height: 30px;
	width: auto;
	color: var(--ink);
	overflow: visible;
}

/* Первый экран: надпись — главный объект, знак остался только в шапке. */
.wordmark-hero {
	position: relative;
	z-index: 1;
	height: clamp(62px, 13vw, 108px);
	margin: 0 auto 34px;
}

/* Знак — чёрная линия на прозрачном фоне; в тёмной теме её выворачиваем. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .brand img { filter: invert(1); }
}

:root[data-theme="dark"] .brand img { filter: invert(1); }
:root[data-theme="light"] .brand img { filter: none; }

.controls { display: inline-flex; align-items: center; gap: 10px; }

/* Переключатель темы: показывается значок текущего состояния. */
.theme-toggle {
	appearance: none;
	border: 1px solid var(--hair);
	background: transparent;
	color: var(--muted);
	width: 34px;
	height: 34px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}

.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }

.theme-toggle .ico {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
}

.theme-toggle .ico-moon { fill: currentColor; stroke: none; }

:root[data-theme="dark"] .ico-moon,
:root[data-theme="light"] .ico-sun { display: none; }

.langs { display: inline-flex; gap: 2px; font-size: 13px; }

.langs button {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--muted);
	font: inherit;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 6px 9px;
	border-radius: 999px;
	cursor: pointer;
}

.langs button:hover { color: var(--ink); }

html[data-lang="ru"] .langs button[data-set="ru"],
html[data-lang="en"] .langs button[data-set="en"] {
	color: var(--ink);
	background: var(--hair-soft);
}

/* ---------- Первый экран ---------- */

.hero {
	position: relative;
	padding: 92px 0 64px;
	text-align: center;
}

/* Тёплое дыхание за надписью — раньше оно было за знаком, знак ушёл в шапку. */
.hero::before {
	content: "";
	position: absolute;
	top: 30px;
	left: 50%;
	width: min(620px, 96%);
	height: 260px;
	transform: translateX(-50%);
	border-radius: 50%;
	background: radial-gradient(ellipse at center,
		color-mix(in srgb, var(--accent) 17%, transparent) 0%, transparent 68%);
	animation: breathe-glow 7s ease-in-out infinite;
	pointer-events: none;
}

@keyframes breathe-glow {
	0%, 100% { opacity: 0.5; }
	50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.hero::before { animation: none; }
}

h1 {
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(33px, 7.6vw, 56px);
	line-height: 1.08;
	letter-spacing: -0.015em;
	margin: 0 0 18px;
	overflow-wrap: break-word;
}

.lede {
	font-size: clamp(18px, 3.6vw, 21px);
	line-height: 1.55;
	color: var(--muted);
	max-width: 30em;
	margin: 0 auto;
}

/* ---------- Возможности: снимок и текст рядом ---------- */

.rule { height: 1px; background: var(--hair); border: 0; margin: 0; }

/* Блокам со снимками тесно в колонке текста — выпускаем их шире, оставаясь
   по центру страницы. */
.features {
	padding: 8px 0;
	width: min(960px, calc(100vw - 48px));
	margin-left: 50%;
	transform: translateX(-50%);
}

.feature {
	display: grid;
	grid-template-columns: 210px 1fr;
	gap: 64px;
	align-items: center;
	padding: 54px 0;
	border-bottom: 1px solid var(--hair-soft);
}

.feature:last-child { border-bottom: 0; }

/* Чётные блоки — снимок справа, текст слева. */
.feature:nth-child(even) { grid-template-columns: 1fr 210px; }
.feature:nth-child(even) .shot { order: 2; }

.feature h3 {
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(24px, 4vw, 30px);
	line-height: 1.15;
	margin: 0 0 12px;
}

.feature p { margin: 0; color: var(--muted); font-size: 17px; }

.feature .aside {
	margin-top: 14px;
	font-size: 15px;
	color: var(--muted);
	opacity: 0.8;
}

/* Корпус телефона: тёмная грань с бликом по краю, «остров» сверху и кнопки
   сбоку. Скруглением и толщиной грани повторяет iPhone, чтобы снимок читался
   как экран устройства, а не как картинка, вставленная в текст. */
/* Корпус — одна сплошная чёрная рамка, без металлической грани, «острова» и
   кнопок: снимок и так читается как экран, а лишние детали на 210px только
   собирают шум. Скругления концентрические — 30 снаружи, 23 у экрана. */
.shot {
	position: relative;
	width: 210px;
	padding: 7px;
	border-radius: 30px;
	background: #0a0a0b;
	box-shadow: 0 24px 46px -26px rgba(0, 0, 0, 0.5);
}



/* «Острова» и боковых кнопок нет намеренно — по образцу, который прислал
   владелец: рамка одна, чёрная, и ничего больше. */

/* Корпус белый в обеих темах — это цвет аппарата, а не элемент интерфейса. */

@media (max-width: 720px) {
	.feature,
	.feature:nth-child(even) {
		grid-template-columns: 1fr;
		gap: 26px;
		padding: 42px 0;
	}
	.feature:nth-child(even) .shot { order: 0; }
	.shot { margin: 0 auto; }
}

/* ---------- Закрывающий абзац ---------- */

.closing {
	max-width: 34em;
	margin: 8px auto 64px;
	padding: 0 4px;
	text-align: center;
	color: var(--muted);
	font-size: 17px;
	line-height: 1.6;
}

.closing p { margin: 0; }

/* ---------- Подвал ---------- */

.foot {
	padding: 44px 0 56px;
	border-top: 1px solid var(--hair);
	font-size: 15px;
	color: var(--muted);
}

.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 18px; }
.foot .fine { font-size: 13px; line-height: 1.6; }

/* ---------- Юридические страницы ---------- */

.doc { padding: 44px 0 12px; }

.doc h1 {
	font-size: clamp(30px, 6vw, 40px);
	margin-bottom: 10px;
	text-align: left;
}

.updated { color: var(--muted); font-size: 14px; margin: 0 0 40px; }

.doc h2 {
	font-family: var(--serif);
	font-weight: 400;
	font-size: 23px;
	margin: 44px 0 12px;
	padding-top: 22px;
	border-top: 1px solid var(--hair-soft);
}

.doc h3 {
	font-size: 16px;
	font-weight: 600;
	margin: 26px 0 8px;
}

.doc p, .doc li { color: var(--ink); }
.doc a { text-decoration-color: var(--accent); }
.doc code { font-size: 0.92em; color: var(--muted); }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 16px; padding-left: 1.2em; }
.doc li { margin: 7px 0; }
.doc li::marker { color: var(--accent); }

.doc .note {
	background: var(--card);
	border: 1px solid var(--hair);
	border-radius: 14px;
	padding: 18px 20px;
	margin: 22px 0;
}

.doc .note p:last-child { margin-bottom: 0; }

.back {
	display: inline-block;
	margin-top: 8px;
	font-size: 15px;
	color: var(--muted);
	text-decoration: none;
}

.back:hover { color: var(--ink); }

@media (max-width: 520px) {
	body { font-size: 16px; }
	.hero { padding: 52px 0 44px; }
}

/* ---------- Снимки: вариант под язык и тему ---------- */

.shot .screen {
	display: block;
	width: 100%;
	aspect-ratio: 1320 / 2868;
	border-radius: 23px;
	background: var(--card) center / cover no-repeat;
	/* Запасной вариант, если тема ещё не проставлена (JS выключен). */
	background-image: url("/assets/shots/map-ru-light.webp");
}
html[data-lang="ru"][data-theme="light"] .screen[data-shot="map"] { background-image: url("/assets/shots/map-ru-light.webp"); }
html[data-lang="ru"][data-theme="dark"] .screen[data-shot="map"] { background-image: url("/assets/shots/map-ru-dark.webp"); }
html[data-lang="en"][data-theme="light"] .screen[data-shot="map"] { background-image: url("/assets/shots/map-en-light.webp"); }
html[data-lang="en"][data-theme="dark"] .screen[data-shot="map"] { background-image: url("/assets/shots/map-en-dark.webp"); }
html[data-lang="ru"][data-theme="light"] .screen[data-shot="drawings"] { background-image: url("/assets/shots/drawings-ru-light.webp"); }
html[data-lang="ru"][data-theme="dark"] .screen[data-shot="drawings"] { background-image: url("/assets/shots/drawings-ru-dark.webp"); }
html[data-lang="en"][data-theme="light"] .screen[data-shot="drawings"] { background-image: url("/assets/shots/drawings-en-light.webp"); }
html[data-lang="en"][data-theme="dark"] .screen[data-shot="drawings"] { background-image: url("/assets/shots/drawings-en-dark.webp"); }
html[data-lang="ru"][data-theme="light"] .screen[data-shot="emotions"] { background-image: url("/assets/shots/emotions-ru-light.webp"); }
html[data-lang="ru"][data-theme="dark"] .screen[data-shot="emotions"] { background-image: url("/assets/shots/emotions-ru-dark.webp"); }
html[data-lang="en"][data-theme="light"] .screen[data-shot="emotions"] { background-image: url("/assets/shots/emotions-en-light.webp"); }
html[data-lang="en"][data-theme="dark"] .screen[data-shot="emotions"] { background-image: url("/assets/shots/emotions-en-dark.webp"); }
html[data-lang="ru"][data-theme="light"] .screen[data-shot="knock"] { background-image: url("/assets/shots/knock-ru-light.webp"); }
html[data-lang="ru"][data-theme="dark"] .screen[data-shot="knock"] { background-image: url("/assets/shots/knock-ru-dark.webp"); }
html[data-lang="en"][data-theme="light"] .screen[data-shot="knock"] { background-image: url("/assets/shots/knock-en-light.webp"); }
html[data-lang="en"][data-theme="dark"] .screen[data-shot="knock"] { background-image: url("/assets/shots/knock-en-dark.webp"); }
html[data-lang="ru"][data-theme="light"] .screen[data-shot="friend"] { background-image: url("/assets/shots/friend-ru-light.webp"); }
html[data-lang="ru"][data-theme="dark"] .screen[data-shot="friend"] { background-image: url("/assets/shots/friend-ru-dark.webp"); }
html[data-lang="en"][data-theme="light"] .screen[data-shot="friend"] { background-image: url("/assets/shots/friend-en-light.webp"); }
html[data-lang="en"][data-theme="dark"] .screen[data-shot="friend"] { background-image: url("/assets/shots/friend-en-dark.webp"); }
html[data-lang="ru"][data-theme="light"] .screen[data-shot="note"] { background-image: url("/assets/shots/note-ru-light.webp"); }
html[data-lang="ru"][data-theme="dark"] .screen[data-shot="note"] { background-image: url("/assets/shots/note-ru-dark.webp"); }
html[data-lang="en"][data-theme="light"] .screen[data-shot="note"] { background-image: url("/assets/shots/note-en-light.webp"); }
html[data-lang="en"][data-theme="dark"] .screen[data-shot="note"] { background-image: url("/assets/shots/note-en-dark.webp"); }
