/* Z.S KATZRIN LTD — katzrin-ltd.com
   Static site, no dependencies. Only transform/opacity are animated. */

:root {
  /* Strong curves — the built-in CSS easings are too weak to read as intentional. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --bg: #f7f7f8;
  --bg-raised: #ffffff;
  --ink: #101014;
  --ink-soft: #55555f;
  --ink-faint: #8a8a95;
  --line: rgba(16, 16, 20, 0.10);
  --accent: #0a6fd8;
  --chrome-bg: rgba(247, 247, 248, 0.72);
  --shadow-card: 0 1px 2px rgba(16, 16, 20, 0.04), 0 8px 24px rgba(16, 16, 20, 0.06);

  --wrap: 68rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0d;
    --bg-raised: #141418;
    --ink: #f2f2f5;
    --ink-soft: #a9a9b4;
    --ink-faint: #74747f;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #4da3ff;
    --chrome-bg: rgba(11, 11, 13, 0.66);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.32);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  /* Короткие страницы (контакты, 404) не должны оставлять подвал висеть
     посреди экрана — прижимаем его вниз. */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 100%/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main { flex: 1 0 auto; }
.foot { flex: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 0.75rem 1rem; border-radius: 0 0 0.5rem 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 0.35rem; }

/* ---------- chrome: translucent, content scrolls under ---------- */

.chrome {
  position: sticky; top: 0; z-index: 50;
  background: var(--chrome-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}
/* The edge appears only once something is actually underneath it. */
.chrome::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: var(--line); opacity: 0;
  transition: opacity 200ms var(--ease-out);
}
.chrome.is-scrolled::after { opacity: 1; }

.chrome-in { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }

.mark { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 620; letter-spacing: -0.01em; }
.mark-glyph {
  width: 1.6rem; height: 1.6rem; flex: none; border-radius: 0.45rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.mark-text { font-size: 0.95rem; }

.nav { display: none; margin-inline-start: auto; gap: 1.75rem; font-size: 0.925rem; color: var(--ink-soft); }
.nav a { text-decoration: none; transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--ink); } }
@media (min-width: 46rem) { .nav { display: flex; } }

.chrome .btn-small { margin-inline-start: auto; }
@media (min-width: 46rem) { .chrome .btn-small { margin-inline-start: 0; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem;            /* 44px — минимальная цель для пальца */
  padding: 0.75rem 1.35rem; border-radius: 0.75rem;
  background: var(--accent); color: #fff; text-decoration: none;
  font-size: 0.975rem; font-weight: 560; letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 160ms var(--ease-out), filter 160ms ease;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { filter: brightness(1.08); } }

.btn-quiet {
  background: transparent; color: var(--ink); border-color: var(--line);
}
@media (hover: hover) and (pointer: fine) { .btn-quiet:hover { filter: none; background: var(--bg-raised); } }

.btn-small { min-height: 2.25rem; padding: 0.45rem 0.9rem; border-radius: 0.6rem; font-size: 0.875rem; }
/* На тач-устройствах даже компактная кнопка в шапке должна быть достаточной целью. */
@media (pointer: coarse) { .btn-small { min-height: 2.75rem; padding-inline: 1.05rem; } }
.btn-lg { padding: 0.95rem 1.6rem; font-size: 1.05rem; border-radius: 0.85rem; }

/* ---------- hero ---------- */

.hero { position: relative; padding-block: clamp(3.5rem, 11vw, 7.5rem) clamp(3rem, 8vw, 5.5rem); overflow: hidden; }

/* Static, not looping: a slow oscillating background is a vestibular trigger. */
.aurora {
  position: absolute; inset: -30% -10% auto -10%; height: 42rem; pointer-events: none;
  background:
    radial-gradient(38% 44% at 22% 38%, rgba(10, 111, 216, 0.20), transparent 70%),
    radial-gradient(34% 40% at 78% 26%, rgba(123, 92, 255, 0.16), transparent 72%);
  filter: blur(12px);
}

.eyebrow {
  margin: 0 0 1rem; font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint);
}

.display {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 6.2vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.028em;   /* tracking tightens as type grows */
  font-weight: 660;
  text-wrap: balance;
}

.lede {
  margin: 0; max-width: 44ch;
  font-size: clamp(1.0625rem, 1.9vw, 1.25rem);
  line-height: 1.55; color: var(--ink-soft);
  text-wrap: pretty;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Text and motif share one row on wide screens, so the grid reads as part of the
   hero instead of floating under it. */
.hero-in { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: center; }
@media (min-width: 60rem) {
  .hero-in { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Макет телефона. Экран абстрактный — это не скриншот несуществующего
   приложения, только силуэт устройства и сетка иконок. */
.phone { justify-self: center; }
@media (min-width: 60rem) { .phone { justify-self: end; } }

.phone-frame {
  position: relative;
  width: clamp(14rem, 24vw, 17rem);
  aspect-ratio: 9 / 19;
  padding: 0.5rem;
  border-radius: clamp(2rem, 3.6vw, 2.6rem);
  background: linear-gradient(160deg, #33333c, #0c0c10);
  box-shadow:
    0 2px 4px rgba(16, 16, 20, 0.12),
    0 28px 64px rgba(16, 16, 20, 0.26),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}

.phone-island {
  position: absolute; z-index: 2; top: 1rem; left: 50%; transform: translateX(-50%);
  width: 30%; height: 1.05rem; border-radius: 1rem; background: #08080a;
}

.phone-screen {
  position: relative; height: 100%; overflow: hidden;
  border-radius: calc(clamp(2rem, 3.6vw, 2.6rem) - 0.5rem);
  background: linear-gradient(170deg, #dbe6f8 0%, #eceffa 48%, #f8f4fb 100%);
  padding: 2.6rem 0.85rem 0.85rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
@media (prefers-color-scheme: dark) {
  .phone-screen { background: linear-gradient(170deg, #1a2235 0%, #171922 50%, #201a2b 100%); }
}

.phone-time {
  position: absolute; top: 1.1rem; left: 1.15rem;
  font-size: 0.6875rem; font-weight: 620; letter-spacing: 0.01em;
  color: rgba(16, 16, 20, 0.55);
}
@media (prefers-color-scheme: dark) { .phone-time { color: rgba(255, 255, 255, 0.6); } }

.app-grid, .phone-dock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.phone-dock {
  margin-top: auto; padding: 0.5rem; border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
@media (prefers-color-scheme: dark) { .phone-dock { background: rgba(255, 255, 255, 0.10); } }

.app {
  aspect-ratio: 1; border-radius: 26%;
  background: rgba(16, 16, 20, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
@media (prefers-color-scheme: dark) { .app { background: rgba(255, 255, 255, 0.12); } }
.app.g1 { background: linear-gradient(150deg, #0a84ff, #7b5cff); }
.app.g2 { background: linear-gradient(150deg, #7b5cff, #d05cff); }
.app.g3 { background: linear-gradient(150deg, #34c759, #0a84ff); }
.app.g4 { background: linear-gradient(150deg, #ff9f0a, #ff375f); }

/* Иконки въезжают по очереди — один раз, когда макет попал в кадр.
   Не из scale(0): предметы не возникают из ничего. */
.js .phone .app { opacity: 0; transform: scale(0.92); }
.js .phone.is-in .app { animation: appIn 360ms var(--ease-out) forwards; }
.js .phone.is-in .app-grid .app:nth-child(1)  { animation-delay:  40ms; }
.js .phone.is-in .app-grid .app:nth-child(2)  { animation-delay:  68ms; }
.js .phone.is-in .app-grid .app:nth-child(3)  { animation-delay:  96ms; }
.js .phone.is-in .app-grid .app:nth-child(4)  { animation-delay: 124ms; }
.js .phone.is-in .app-grid .app:nth-child(5)  { animation-delay: 152ms; }
.js .phone.is-in .app-grid .app:nth-child(6)  { animation-delay: 180ms; }
.js .phone.is-in .app-grid .app:nth-child(7)  { animation-delay: 208ms; }
.js .phone.is-in .app-grid .app:nth-child(8)  { animation-delay: 236ms; }
.js .phone.is-in .app-grid .app:nth-child(9)  { animation-delay: 264ms; }
.js .phone.is-in .app-grid .app:nth-child(10) { animation-delay: 292ms; }
.js .phone.is-in .app-grid .app:nth-child(11) { animation-delay: 320ms; }
.js .phone.is-in .app-grid .app:nth-child(12) { animation-delay: 348ms; }
.js .phone.is-in .phone-dock .app:nth-child(1) { animation-delay: 392ms; }
.js .phone.is-in .phone-dock .app:nth-child(2) { animation-delay: 416ms; }
.js .phone.is-in .phone-dock .app:nth-child(3) { animation-delay: 440ms; }
.js .phone.is-in .phone-dock .app:nth-child(4) { animation-delay: 464ms; }

@keyframes appIn { to { opacity: 1; transform: none; } }

/* ---------- bands ---------- */

.band { padding-block: clamp(3rem, 8vw, 5.5rem); }
.band-alt { background: var(--bg-raised); border-block: 1px solid var(--line); }

.section-title {
  margin: 0 0 clamp(1.75rem, 4vw, 2.75rem);
  font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  line-height: 1.15; letter-spacing: -0.022em; font-weight: 640;
}

/* Явные 2×2 вместо auto-fit: при четырёх карточках auto-fit давал 3+1, и
   четвёртая висела сиротой. */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }

.card {
  padding: 1.5rem; border-radius: 1rem;
  background: var(--bg-raised); border: 1px solid var(--line); box-shadow: var(--shadow-card);
  transition: transform 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .card:hover { transform: translateY(-2px); } }
.card h3 { margin: 0 0 0.5rem; font-size: 1.0625rem; font-weight: 620; letter-spacing: -0.012em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.step { position: relative; padding-top: 2.25rem; }
.step-num {
  position: absolute; top: 0; left: 0;
  font-variant-numeric: tabular-nums; font-size: 0.8125rem; font-weight: 620;
  letter-spacing: 0.06em; color: var(--accent);
}
.step h3 { margin: 0 0 0.5rem; font-size: 1.0625rem; font-weight: 620; letter-spacing: -0.012em; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }

.stack {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: clamp(2rem, 5vw, 3rem) 0 0; padding: 0;
}
.stack span {
  padding: 0.35rem 0.7rem; border-radius: 0.5rem;
  border: 1px solid var(--line); color: var(--ink-soft);
  font-size: 0.8125rem; letter-spacing: 0.005em;
}

.contact-in { text-align: center; display: grid; justify-items: center; gap: 1.25rem; }
.contact .lede { margin-inline: auto; }
.contact .section-title { margin-bottom: 0; }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--ink-faint); font-size: 0.875rem; }
.foot-in { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.foot p { margin: 0; }
.foot a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--ink); } }

/* ---------- reveal ---------- */

/* Прячем только при работающем JS (класс ставится инлайном в <head>). Без него
   контент виден сразу — страница не зависит от скрипта. */
.js .reveal {
  opacity: 0;
  transform: translateY(8px);   /* never from scale(0) or a big offset — it reads as teleporting */
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- user preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .phone .app { opacity: 1; transform: none; animation: none; }
  .check-box svg path { stroke-dashoffset: 0; }
  .js .check.is-in .check-box svg path { animation: none; }
  .card-icon { transition: none; }
  .nav-panel { transition: opacity 120ms ease; transform: none; }
  .nav-panel.is-open { transform: none; }
  .bars span { transition: none; }
  .card, .btn { transition: none; }
  .card:hover { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .chrome { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .aurora { display: none; }
}

@media (prefers-contrast: more) {
  :root { --line: rgba(16, 16, 20, 0.45); --ink-soft: #2c2c33; }
  .chrome { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .card, .stack span { border-width: 1px; border-color: var(--line); }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --line: rgba(255, 255, 255, 0.5); --ink-soft: #dcdce4; }
}

@media print {
  .chrome, .aurora, .grid-motif { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- текстовые страницы: контакты и юридические документы ---------- */

.page { padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(3rem, 8vw, 5rem); }

.page-head { margin-bottom: clamp(2rem, 5vw, 3rem); }
.page-head .display { font-size: clamp(1.875rem, 4.4vw, 3rem); margin-bottom: 0.75rem; }
.doc-meta { margin: 0; color: var(--ink-faint); font-size: 0.875rem; }

/* Мера строки ~68 символов: длинные юридические абзацы иначе не читаются. */
.doc { max-width: 68ch; }
.doc h2 {
  margin: clamp(2rem, 4vw, 2.75rem) 0 0.75rem;
  font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.015em; font-weight: 640;
}
.doc h3 { margin: 1.75rem 0 0.5rem; font-size: 1rem; font-weight: 620; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--ink-soft); font-size: 0.975rem; }
.doc p { margin: 0 0 0.9rem; }
.doc ul, .doc ol { margin: 0 0 0.9rem; padding-left: 1.35rem; }
.doc li { margin-bottom: 0.4rem; }
.doc a { color: var(--accent); text-underline-offset: 0.15em; }
.doc strong { color: var(--ink); font-weight: 620; }
.doc .callout {
  margin: 1.25rem 0; padding: 1rem 1.15rem; border-radius: 0.85rem;
  background: var(--bg-raised); border: 1px solid var(--line);
}
.doc .callout p:last-child { margin-bottom: 0; }

/* Карточка реквизитов — одна на все страницы, чтобы адрес не расходился. */
.entity { margin: 0; display: grid; gap: 0.15rem; font-size: 0.9375rem; color: var(--ink-soft); }
.entity dt { color: var(--ink-faint); font-size: 0.8125rem; letter-spacing: 0.02em; text-transform: uppercase; margin-top: 0.75rem; }
.entity dd { margin: 0; }
.entity dd a { color: var(--accent); }

.contact-grid { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); align-items: start; }
@media (min-width: 52rem) { .contact-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.contact-panel { padding: 1.5rem; border-radius: 1rem; background: var(--bg-raised); border: 1px solid var(--line); box-shadow: var(--shadow-card); }

.legal-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.legal-links a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .legal-links a:hover { color: var(--ink); } }

/* ---------- иконки в карточках, типы приложений ---------- */

.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; margin-bottom: 0.9rem;
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  transition: transform 220ms var(--ease-out);
}
.card-icon svg { width: 1.2rem; height: 1.2rem; }
@media (hover: hover) and (pointer: fine) { .card:hover .card-icon { transform: scale(1.06); } }

.kinds { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: clamp(1.5rem, 4vw, 2.25rem) 0 0; padding: 0; }
.kinds span {
  padding: 0.4rem 0.8rem; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--ink-soft); font-size: 0.8125rem;
}

/* ---------- таймлайн проекта ---------- */

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
@media (min-width: 56rem) { .timeline { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }

.tl { position: relative; padding-top: 1.85rem; }
.tl-dot {
  position: absolute; top: 0.1rem; left: 0; width: 0.7rem; height: 0.7rem; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}
/* Соединительная линия только там, где шаги стоят в ряд. */
@media (min-width: 56rem) {
  .tl::before {
    content: ""; position: absolute; top: 0.42rem; left: 1.1rem; right: -1.5rem; height: 1px;
    background: var(--line);
  }
  .tl:last-child::before { display: none; }
}
.tl-step { display: block; margin-bottom: 0.35rem; font-size: 0.75rem; font-weight: 620; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.tl h3 { margin: 0 0 0.4rem; font-size: 1.0625rem; font-weight: 620; letter-spacing: -0.012em; }
.tl p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }

/* ---------- чек-лист готовности к ревью ---------- */

.review-in { display: grid; gap: clamp(2rem, 5vw, 3rem); align-items: start; }
@media (min-width: 56rem) { .review-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.review-copy .section-title { margin-bottom: 1rem; }
.review-copy .lede { margin-bottom: 1rem; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.check {
  display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start;
  padding: 0.85rem 1rem; border-radius: 0.85rem;
  background: var(--bg-raised); border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 0.9375rem;
}
.check-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.4rem; height: 1.4rem; border-radius: 0.45rem;
  background: color-mix(in srgb, #34c759 16%, transparent); color: #2aa84a;
}
.check-box svg { width: 0.95rem; height: 0.95rem; }
/* Галочка прорисовывается, а не появляется — движение объясняет смысл списка. */
.check-box svg path { stroke-dasharray: 22; stroke-dashoffset: 22; }
.js .check.is-in .check-box svg path { animation: drawCheck 300ms var(--ease-out) 140ms forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

/* ---------- мобильное меню ---------- */

.chrome-in { position: relative; }

/* Кнопка-гамбургер: только там, где спрятана обычная навигация. */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  margin-inline-start: auto;
  width: 2.75rem; height: 2.75rem;            /* полноценная тач-цель */
  padding: 0; border: 1px solid var(--line); border-radius: 0.7rem;
  background: var(--bg-raised); color: var(--ink); cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.nav-toggle:active { transform: scale(0.94); }
@media (min-width: 46rem) { .nav-toggle { display: none; } }

/* Две линии превращаются в крестик — состояние кнопки читается без подписи. */
.bars { position: relative; display: block; width: 1.1rem; height: 0.7rem; }
.bars span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform 220ms var(--ease-out), opacity 140ms ease;
}
.bars span:first-child { top: 0; }
.bars span:last-child { bottom: 0; }
.nav-toggle[aria-expanded="true"] .bars span:first-child { transform: translateY(0.34rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:last-child  { transform: translateY(-0.34rem) rotate(-45deg); }

/* На мобильной ширине кнопка «Get in touch» уезжает в само меню,
   чтобы в шапке не толкались две цели рядом. */
@media (max-width: 45.999rem) { .chrome-cta { display: none; } }

.nav-panel {
  position: absolute; z-index: 60; top: calc(100% + 0.5rem);
  right: var(--pad); left: var(--pad);
  padding: 0.5rem;
  border-radius: 1rem; border: 1px solid var(--line);
  /* Непрозрачная поверхность. Полупрозрачная панель лежала бы поверх такой же
     полупрозрачной шапки — вложенные backdrop-filter гасят друг друга, и текст
     страницы просвечивал сквозь меню. */
  background: var(--bg-raised);
  box-shadow: 0 10px 34px rgba(16, 16, 20, 0.18), 0 2px 6px rgba(16, 16, 20, 0.08);

  /* Раскрывается от кнопки, а не из центра, и не из scale(0). */
  transform-origin: top right;
  opacity: 0; transform: scale(0.96) translateY(-6px);
  transition: opacity 160ms var(--ease-out), transform 180ms var(--ease-out);
}
.nav-panel.is-open { opacity: 1; transform: none; }
@media (min-width: 46rem) { .nav-panel { display: none; } }

.nav-panel-links { display: grid; }
.nav-panel-links a {
  display: flex; align-items: center; min-height: 2.75rem;
  padding: 0 0.75rem; border-radius: 0.6rem;
  text-decoration: none; color: var(--ink); font-size: 1rem;
  transition: background-color 140ms ease;
}
.nav-panel-links a:active { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.nav-panel-cta { width: 100%; margin-top: 0.5rem; }

@media (prefers-color-scheme: dark) {
  .nav-panel {
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  }
}
