/* ============================================================
   MGM Apple - подача классического apple.com
   Белые и светло-серые полосы на всю ширину, крупный кегль,
   синие пилюли, тонкая шапка, серый подвал. Без стекла и свечения
   ============================================================ */

:root {
	color-scheme: light;

	--ink: #1d1d1f;
	--ink-soft: #6e6e73;
	--ink-faint: #86868b;
	--paper: #ffffff;
	--paper-alt: #f5f5f7;
	--line: #d2d2d7;

	--blue: #0071e3;
	--blue-hover: #0077ed;
	--link: #0066cc;
	--link-dark: #2997ff;

	/* старые имена токенов MGM Glass: на них держатся черновики страниц */
	--glass-bg: #f5f5f7;
	--glass-bg-strong: #ffffff;
	--glass-edge: #d2d2d7;
	--glass-shade: rgba(0, 0, 0, .05);
	--glass-blur: 0px;
	--accent: #0071e3;
	--accent-2: #0071e3;
	--accent-3: #0071e3;

	--r-lg: 28px;
	--r-md: 18px;
	--r-sm: 12px;

	--shadow-soft: 2px 4px 12px rgba(0, 0, 0, .08);
	--shadow-lift: 2px 4px 16px rgba(0, 0, 0, .16);

	--wrap: 1024px;
	--gutter: 22px;

	--font: "SF Pro Text", "SF Pro Icons", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-display: "SF Pro Display", "SF Pro Icons", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

	--ease: cubic-bezier(.28, .11, .32, 1);
}

/* ---------- база ---------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.47059;
	font-weight: 400;
	letter-spacing: -.022em;
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.aurora { display: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

/* класс .glass остаётся в старой разметке: теперь это просто светло-серая плашка */
.glass {
	background: var(--paper-alt);
	border-radius: var(--r-md);
}

/* ---------- раскладка ---------- */

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 9vw, 100px); }
.section--alt { background: var(--paper-alt); }

/* ---------- шапка: тонкая полоса во всю ширину ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: 44px;
	background: rgba(250, 250, 252, .8);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	transition: background .3s var(--ease);
}

.site-header.is-stuck { box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }

.gn__inner {
	max-width: calc(var(--wrap) + 2 * var(--gutter));
	height: 100%;
	margin-inline: auto;
	padding-inline: var(--gutter);
	display: flex;
	align-items: center;
	gap: 8px;
}

.brand {
	display: flex;
	align-items: center;
	height: 44px;
	padding-right: 12px;
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -.01em;
	white-space: nowrap;
	opacity: .88;
	transition: opacity .3s var(--ease);
}

.brand:hover { opacity: 1; text-decoration: none; }
.brand img { height: 20px; width: auto; display: block; }

.nav { flex: 1; }

.nav ul {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0 clamp(8px, 2.6vw, 30px);
	max-width: 760px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.nav a {
	display: block;
	padding: 0 8px;
	line-height: 44px;
	font-size: 12px;
	letter-spacing: -.01em;
	color: var(--ink);
	opacity: .8;
	transition: opacity .3s var(--ease);
}

.nav a:hover { opacity: 1; text-decoration: none; }
.nav .current-menu-item > a { opacity: 1; }

/* переключатель языка: две буквы, как региональный выбор на apple.com */
.lang {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.lang a, .lang span {
	display: block;
	padding: 4px 6px;
	font-size: 12px;
	letter-spacing: -.01em;
	color: var(--ink);
	opacity: .56;
}

.lang a:hover { opacity: 1; text-decoration: none; }
.lang .is-current span { opacity: 1; font-weight: 600; }

.scheme { display: none; }

/* бургер: две полоски */
.burger { display: none; }

@media (max-width: 833px) {
	.site-header { height: 48px; }
	.brand { height: 48px; }
	.gn__inner { justify-content: space-between; }
	.site-header .lang { margin-left: auto; }

	.burger {
		display: grid;
		align-content: center;
		gap: 7px;
		width: 44px;
		height: 48px;
		margin-right: -12px;
		padding: 0 12px;
		border: 0;
		background: transparent;
		cursor: pointer;
	}
	.burger span {
		display: block;
		height: 1.5px;
		background: var(--ink);
		border-radius: 1px;
		transition: transform .3s var(--ease);
	}
	.burger[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
	.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

	.nav {
		position: fixed;
		top: 48px;
		left: 0;
		right: 0;
		max-height: 0;
		overflow: hidden;
		background: #fbfbfd;
		transition: max-height .45s var(--ease);
	}
	.admin-bar .nav { top: 94px; }
	.nav.is-open { max-height: none; height: calc(100vh - 48px); overflow-y: auto; }
	.site-header:has(.nav.is-open) { background: #fbfbfd; backdrop-filter: none; -webkit-backdrop-filter: none; }
	.nav ul { flex-direction: column; align-items: stretch; padding: 12px 36px 28px; }
	.nav a { padding: 0; line-height: 1.2; padding-block: 10px; font-size: 24px; font-weight: 600; opacity: 1; }
}

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

.hero {
	padding: clamp(40px, 7vw, 76px) var(--gutter) clamp(44px, 7vw, 72px);
	text-align: center;
	background: var(--paper);
}

.hero__inner { max-width: 980px; margin-inline: auto; }

.eyebrow {
	display: block;
	margin: 0 0 10px;
	font-size: clamp(17px, 2vw, 21px);
	line-height: 1.19;
	font-weight: 600;
	letter-spacing: .011em;
	color: #bf4800;
}

h1, .h1 {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(40px, 6.2vw, 64px);
	line-height: 1.0625;
	font-weight: 600;
	letter-spacing: -.009em;
}

.hero--mnfq h1 { max-width: 19ch; margin-inline: auto; }

.hero__lead {
	margin: 18px auto 0;
	max-width: 44em;
	font-family: var(--font-display);
	font-size: clamp(19px, 2.2vw, 24px);
	line-height: 1.33;
	font-weight: 400;
	letter-spacing: .009em;
	color: var(--ink);
}

.hero--mnfq .hero__lead { font-size: clamp(17px, 1.8vw, 21px); line-height: 1.381; color: var(--ink-soft); max-width: 40em; }

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: center;
	margin-top: 30px;
}

.hero__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 28px;
	margin-top: 24px;
	font-size: 17px;
}

/* ---------- кнопки и ссылки ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 28px;
	padding: 11px 21px;
	border: 1px solid transparent;
	border-radius: 980px;
	font-size: 17px;
	line-height: 1.17648;
	font-weight: 400;
	letter-spacing: -.022em;
	text-align: center;
	cursor: pointer;
	transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}

.btn:hover { text-decoration: none; }

.btn--primary { color: #fff; background: var(--blue); }
.btn--primary:hover { background: var(--blue-hover); }

.btn--ghost { color: var(--blue); background: transparent; border-color: var(--blue); }
.btn--ghost:hover { color: #fff; background: var(--blue); }

/* «Подробнее ›» */
.more { color: var(--link); white-space: nowrap; }
.more::after {
	content: "";
	display: inline-block;
	width: .42em;
	height: .42em;
	margin-left: .32em;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: translateY(-.08em) rotate(45deg);
}
.more:hover { text-decoration: underline; }

/* ---------- плитки входов (как сетка промо на apple.com) ---------- */

.tiles {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	padding: 0 12px 12px;
}

@media (min-width: 734px) {
	.tiles { grid-template-columns: 1fr 1fr; }
	.tiles > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: clamp(300px, 36vw, 480px);
	padding: 48px 28px;
	text-align: center;
	color: var(--ink);
	background: var(--paper-alt);
	transition: background .3s var(--ease);
}

.tile { width: 100%; border: 0; font: inherit; cursor: pointer; }
.tile:hover { text-decoration: none; }
.tile[aria-expanded="true"] .more::after { transform: translateY(-.25em) rotate(135deg); }
.tile[aria-expanded="true"] { box-shadow: inset 0 -3px 0 var(--blue); }
.tile__title { display: block; margin: 0; font-family: var(--font-display); font-size: clamp(32px, 4vw, 40px); line-height: 1.1; font-weight: 600; }
.tile:hover .more { text-decoration: underline; }

.tile__eyebrow {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -.016em;
	color: var(--ink-soft);
}

.tile h2 {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(32px, 4vw, 40px);
	line-height: 1.1;
	font-weight: 600;
	letter-spacing: 0;
}

.tile__lead {
	display: block;
	margin: 8px auto 18px;
	max-width: 26em;
	font-size: clamp(17px, 1.8vw, 21px);
	line-height: 1.381;
	letter-spacing: .011em;
}

.tile--dark { color: #f5f5f7; background: #000; }
.tile--dark .tile__eyebrow { color: #86868b; }
.tile--dark .more { color: var(--link-dark); }

/* ---------- блоки главной: общий заголовок и действия ---------- */

.block__head { max-width: 820px; margin: 0 auto 44px; text-align: center; }
.block__eyebrow { margin: 0 0 8px; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.19; font-weight: 600; letter-spacing: .011em; color: #bf4800; }
.block__head h2 {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(32px, 4.6vw, 48px);
	line-height: 1.08;
	font-weight: 600;
	letter-spacing: -.003em;
}
.block__lead { margin: 14px auto 0; max-width: 40em; font-family: var(--font-display); font-size: clamp(19px, 2vw, 24px); line-height: 1.33; letter-spacing: .009em; color: var(--ink-soft); }

.block__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px; margin-top: 40px; font-size: 17px; }

/* выбор запроса: белые карточки на сером, как «Почему Apple» */
.choice { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.choice__card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 28px;
	min-height: 200px;
	padding: 30px 30px 28px;
	border-radius: var(--r-md);
	background: var(--paper);
	color: var(--ink);
	box-shadow: var(--shadow-soft);
	transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.choice__card:hover { text-decoration: none; transform: scale(1.015); box-shadow: var(--shadow-lift); }
.choice__card:hover .more { text-decoration: underline; }
.choice__card h3 { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.14; font-weight: 600; letter-spacing: .007em; }
.choice__card .more { font-size: 17px; }
@media (max-width: 733px) {
	.choice { gap: 12px; }
	.choice__card { min-height: 0; gap: 18px; padding: 24px; }
}

/* ---------- «Подробнее» раскрывается под плитками, без перехода ---------- */

.more-panel { padding: 0 12px 12px; }
.more-panel[hidden] { display: none; }
.more-panel__inner {
	padding: clamp(36px, 6vw, 72px) clamp(22px, 6vw, 80px);
	background: var(--paper-alt);
	animation: panel-in .45s var(--ease);
}
@keyframes panel-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .more-panel__inner { animation: none; } }
.more-panel__inner > * { max-width: 820px; }
.more-panel h2 { margin: 0; font-family: var(--font-display); font-size: clamp(30px, 4vw, 44px); line-height: 1.1; font-weight: 600; }
.more-panel h3 { margin: 36px 0 12px; font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.more-panel p { margin: 0 0 10px; color: var(--ink-soft); }
.more-panel .more-panel__lead { margin-top: 14px; font-size: clamp(19px, 2vw, 22px); line-height: 1.4; color: var(--ink); }
.more-panel__list { margin: 0; display: grid; gap: 14px; }
.more-panel__list > div { padding: 16px 20px; border-radius: var(--r-sm); background: var(--paper); }
.more-panel__list dt { font-weight: 600; }
.more-panel__list dd { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }
.more-panel__list--cols { max-width: none !important; margin-top: 28px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.more-panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 32px; }

/* ---------- сетка карточек ---------- */

.grid {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
	padding: 30px;
	border-radius: var(--r-md);
	background: var(--paper);
	box-shadow: var(--shadow-soft);
	transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.card:hover { transform: scale(1.01); box-shadow: var(--shadow-lift); }

.card h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 24px; line-height: 1.17; font-weight: 600; letter-spacing: .009em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 17px; }

.card--post { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.card--post .card__thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.card--post .card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card--post .card__body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card--post h3 a { color: inherit; }
.card--post .meta { font-size: 12px; font-weight: 600; letter-spacing: -.01em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- заголовки секций: «Материалы. Свежее из лаборатории» ---------- */

.section__head { max-width: 900px; margin-bottom: 36px; }
.section__head h2 {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(32px, 4.4vw, 48px);
	line-height: 1.08;
	font-weight: 600;
	letter-spacing: -.003em;
}
.section__head h2 span { color: var(--ink-soft); }
.section__head p { margin: 12px 0 0; color: var(--ink-soft); font-size: 17px; }

/* ---------- содержимое записи: колонка как в Apple Newsroom ---------- */

.entry {
	max-width: calc(692px + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section.wrap > .entry { padding-inline: 0; }

.entry__header { margin-bottom: 36px; }
.entry__header h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; }
.entry__meta { margin-top: 14px; font-size: 14px; color: var(--ink-soft); }

.entry__content { font-size: 17px; line-height: 1.58824; letter-spacing: -.022em; }
.entry__content > * + * { margin-top: 1.1em; }
.entry__content h2 { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 32px); line-height: 1.125; font-weight: 600; letter-spacing: .004em; margin-top: 1.8em; }
.entry__content h3 { font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 24px); font-weight: 600; letter-spacing: .009em; margin-top: 1.5em; }
.entry__content a { color: var(--link); }
.entry__content a:hover { text-decoration: underline; }
.entry__content img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.entry__content blockquote {
	margin: 1.6em 0;
	padding: 0;
	font-family: var(--font-display);
	font-size: clamp(22px, 3vw, 28px);
	line-height: 1.25;
	font-weight: 600;
}
.entry__content pre { padding: 20px; border-radius: var(--r-sm); overflow-x: auto; background: var(--paper-alt); font-size: 14px; }
.entry__content code { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: .92em; }
.entry__content ul, .entry__content ol { padding-left: 1.3em; }
.entry__content li + li { margin-top: .4em; }
.entry__content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry__content th, .entry__content td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }

.wp-caption-text, figcaption { font-size: 12px; color: var(--ink-soft); text-align: left; margin-top: 10px; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* ---------- страничная навигация ---------- */

.pager { display: flex; gap: 8px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.pager .page-numbers {
	display: grid; place-items: center;
	min-width: 40px; height: 40px; padding: 0 14px;
	border-radius: 980px;
	font-size: 15px;
	color: var(--link);
}
.pager .page-numbers:hover { background: var(--paper-alt); text-decoration: none; }
.pager .page-numbers.current { color: #fff; background: var(--blue); }

/* ---------- подвал: серая полоса, мелкий кегль ---------- */

.site-footer {
	margin-top: 0;
	border-top: 1px solid var(--line);
	background: var(--paper-alt);
	font-size: 12px;
	line-height: 1.33337;
	letter-spacing: -.01em;
	color: var(--ink-soft);
}

.footer__inner {
	max-width: calc(980px + 2 * var(--gutter));
	margin-inline: auto;
	padding: 18px var(--gutter) 21px;
}

.footer__nav ul { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.footer__nav a { color: #424245; }
.footer__nav a:hover { text-decoration: underline; }

.footer__legal { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding-top: 16px; }
.footer__legal .lang a, .footer__legal .lang span { font-size: 12px; color: #424245; }

/* ---------- появление при скролле: мягко, без прыжков ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
/* первый экран виден сразу, как на apple.com */
.hero .reveal, .entry.reveal { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- прочее ---------- */

.searchform { display: flex; gap: 8px; max-width: 480px; margin: 18px auto 0; }
.searchform input[type="search"] {
	flex: 1;
	padding: 11px 16px;
	border-radius: var(--r-sm);
	border: 1px solid var(--line);
	background: var(--paper);
	color: var(--ink);
	font: inherit;
	font-size: 17px;
}
.searchform input[type="search"]:focus { outline: 4px solid rgba(0, 125, 250, .6); outline-offset: 1px; border-color: transparent; }

.notice { padding: 34px; border-radius: var(--r-md); text-align: center; color: var(--ink-soft); background: var(--paper-alt); }

:focus-visible { outline: 2px solid rgba(0, 125, 250, .6); outline-offset: 2px; }

/* админ-панель WordPress не должна прятать шапку */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
