:root {
  --bg: #EDE6D8;
  --card: #F6F1E7;
  --card-2: #FBF8F2;
  --ink: #0E0E0E;
  --ink-2: rgba(14, 14, 14, .68);
  --ink-3: rgba(14, 14, 14, .46);
  --line: rgba(14, 14, 14, .10);
  --amber: #E8B54D;
  --amber-d: #C98F2B;
  --amber-ink: #2A1B05;
  --denim: #46546B;
  --screen: #C9D3E6;
  --screen-2: #B7C2D9;
  --font: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Onest", "Segoe UI", sans-serif;

  /* Три скорости, те же, что в приложении (fluidfunctionalism.com/docs/motion): наведение — fast,
     раскрытие и вкладки — moderate, крупные поверхности — slow. Выход всегда на тир быстрее входа. */
  --m-fast: 80ms;
  --m-moderate: 160ms;
  --m-slow: 240ms;
  --m-ease: cubic-bezier(.32, .72, 0, 1);
  --m-ease-bounce: cubic-bezier(.34, 1.26, .64, 1);
}

* { box-sizing: border-box; }
.nw { white-space: nowrap; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: 58px; line-height: 1.04; font-weight: 700; letter-spacing: -.035em; }
h2 { font-size: 38px; line-height: 1.1; }
h3 { font-size: 18px; line-height: 1.3; }
p { margin: 0; }
svg.ic { width: 16px; height: 16px; flex: none; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 740px; }
.center { text-align: center; }
section { padding: 92px 0; position: relative; }
.sub { color: var(--ink-2); margin-top: 14px; max-width: 620px; }
.sub.center { margin: 28px auto 0; }

/* Показ по устройству: наведение мышью или касание */
.touch-only, .mobile-only { display: none !important; }
html.no-hover .hover-only, html.no-hover .desktop-only { display: none !important; }
html.no-hover .touch-only { display: inline !important; }
html.no-hover .mobile-only { display: block !important; }
html.no-hover .btn.mobile-only, html.no-hover .share-row.mobile-only { display: inline-flex !important; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform var(--m-fast) var(--m-ease), background-color var(--m-fast) var(--m-ease),
              box-shadow var(--m-fast) var(--m-ease);
  font-variation-settings: "wght" 600;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible, .chip:focus-visible, summary:focus-visible { outline: 3px solid var(--amber-d); outline-offset: 3px; }
.btn-amber { background: var(--amber); color: var(--amber-ink); }
.btn-amber:hover { background: #EDC064; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #262626; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-lg { height: 56px; padding: 0 30px; font-size: 17px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px;
  border: 0; border-radius: 999px; background: var(--card); color: var(--ink);
  font: 500 15px var(--font); text-decoration: none; cursor: pointer;
}

/* Верхняя полоса: логотип слева, ссылка справа, чёлка между ними */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: 56px; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
  transition: background-color .25s ease, box-shadow .25s ease;
}
.topbar.scrolled { background: rgba(237, 230, 216, .88); backdrop-filter: saturate(1.3) blur(10px); -webkit-backdrop-filter: saturate(1.3) blur(10px); box-shadow: 0 1px 0 var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.02em; text-decoration: none; transition: opacity .25s ease; }
.topbar.yield .logo, .topbar.yield .top-link { opacity: 0; pointer-events: none; }
p, li, figcaption, summary { text-wrap: pretty; }
.logo-mark { display: block; width: 32px; height: 32px; margin: -4px -2px -4px -4px; }   /* иконка приложения, по краям прозрачный запас сетки macOS */
.top-link { font-weight: 600; font-size: 15px; text-decoration: none; padding: 8px 16px; border-radius: 999px; background: var(--ink); color: #fff; }

/* Первый экран */
.hero { padding: 172px 0 40px; text-align: center; }
.hero-in { display: flex; flex-direction: column; align-items: center; }
.hero-pointer { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); color: var(--ink-3); pointer-events: none; }
.hero-pointer svg { display: block; }
.hero-pointer span { position: absolute; left: 70px; top: 44px; white-space: nowrap; font: 500 italic 15px var(--font); color: var(--ink-2); transform: rotate(-4deg); }
.eyebrow { display: inline-block; font: 600 13px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--amber-d); margin-bottom: 20px; }
.hero h1 { max-width: 820px; }
.lead { font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 640px; margin-top: 22px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 34px; }
.mobile-note { color: var(--ink-2); font-size: 15px; margin-top: 14px; }

/* Демо: задания слева, статичная копия островка справа */
.demo-grid { display: grid; grid-template-columns: 330px 1fr; gap: 48px; align-items: center; }
.tries { list-style: none; padding: 0; margin: 28px 0 30px; display: flex; flex-direction: column; gap: 14px; }
.tries li { display: flex; gap: 14px; align-items: flex-start; }
.tries b { display: block; font-weight: 600; }
.tries span:not(.tick) { color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.tick { flex: none; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink-3); display: grid; place-items: center; margin-top: 1px; transition: background-color .25s, box-shadow .25s; }
.tick svg { width: 15px; height: 15px; color: var(--amber-ink); opacity: 0; transform: scale(.4); transition: .25s cubic-bezier(.34, 1.5, .6, 1); }
.tries li.done .tick { background: var(--amber); box-shadow: none; }
.tries li.done .tick svg { opacity: 1; transform: none; }
.tries-done { margin-top: 18px; font-weight: 500; }

.preview { min-width: 0; }
.preview-screen { position: relative; background: var(--screen); border-radius: 22px; overflow: hidden; height: var(--ph, 330px); }
.preview-screen::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 14px; background: var(--screen-2); }

/* Карточки фич */
.features h2, .events h2, .perms h2 { max-width: 720px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.card { background: var(--card); border-radius: 22px; padding: 24px 24px 26px;
  transition: transform var(--m-moderate) var(--m-ease), background-color var(--m-moderate) var(--m-ease), box-shadow var(--m-moderate) var(--m-ease); }
html:not(.no-hover) .card:hover { transform: translateY(-3px); background: var(--card-2); box-shadow: 0 10px 26px rgba(60, 40, 10, .08); }
.card-ic { width: 42px; height: 42px; border-radius: 50%; background: var(--amber); color: var(--amber-ink); display: grid; place-items: center; }
.card-ic svg { width: 19px; height: 19px; }
.card h3 { margin-top: 18px; }
.card p { color: var(--ink-2); font-size: 15px; line-height: 1.45; margin-top: 8px; }
.aside { display: flex; align-items: center; gap: 10px; margin-top: 24px; color: var(--ink-2); }

/* Маленькие чёлки */
.minis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.mini { margin: 0; }
.mini-screen { position: relative; height: 118px; background: var(--screen); border-radius: 18px; overflow: hidden; }
.mini-screen::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: var(--screen-2); }
.mini figcaption { text-align: center; margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.nonotch { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 44px; font-weight: 500; text-align: left; }
.menubar-mini { flex: none; width: 92px; height: 20px; border-radius: 6px; background: var(--screen); position: relative; }
.menubar-mini::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 7px; border-radius: 6px 6px 0 0; background: var(--screen-2); }
.menubar-mini i { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 30px; height: 9px; background: #000; border-radius: 0 0 5px 5px; }

/* Разрешения */
.perm-head, .perm { display: grid; grid-template-columns: 44px 1fr 1.35fr 1.35fr; gap: 18px; align-items: center; }
.perm-head { margin-top: 38px; padding: 0 22px 10px; font: 600 12px var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.perm-list { display: flex; flex-direction: column; gap: 8px; }
.perm { background: var(--card); border-radius: 18px; padding: 16px 22px; }
.perm h3 { font-size: 17px; }
.perm p { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.perm .data { color: var(--ink); font-weight: 500; }
.perm-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: var(--amber); display: grid; place-items: center; }
.perm-ic svg { width: 20px; height: 20px; }
.note { margin-top: 24px; color: var(--ink-2); max-width: 760px; }

/* Автор */
.author-card { display: flex; gap: 28px; align-items: flex-start; background: var(--card); border-radius: 26px; padding: 40px; }
.avatar { flex: none; display: block; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--amber); }
.quote { font-size: 23px; line-height: 1.4; font-weight: 500; letter-spacing: -.01em; margin-bottom: 14px; }
.author-text > p:not(.quote) { color: var(--ink-2); }
.author .cta { justify-content: flex-start; margin-top: 24px; }

/* Скачать */
.dl-mark { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 22px; background: var(--amber); display: grid; place-items: center; }
.dl-mark svg { width: 58px; height: 22px; color: var(--ink); }
.download .meta { color: var(--ink-2); margin: 14px 0 28px; }
.share { flex-direction: column; align-items: center; gap: 14px; }
.share .mobile-note { margin: 0 0 4px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.share .btn { margin-top: 6px; }
.next-steps { list-style: none; counter-reset: s; padding: 0; margin: 40px auto 0; max-width: 900px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: left; }
/* Как открыть неподписанное приложение: всегда на виду в блоке скачивания, с рисунками окон macOS. */
.gk { max-width: 980px; margin: 44px auto 0; text-align: left; background: var(--card-2); border-radius: 26px; padding: 28px; box-shadow: inset 0 0 0 1.5px var(--amber); scroll-margin-top: 80px; }
.gk h3 { font-size: 22px; letter-spacing: -.01em; }
.gk-why { color: var(--ink-2); margin: 8px 0 20px; max-width: 760px; }
.gk-steps { list-style: none; counter-reset: g; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gk-steps > li { counter-increment: g; background: var(--card); border-radius: 18px; padding: 12px 14px 16px; }
.gk-steps > li > b { display: block; font-weight: 600; margin-top: 12px; }
.gk-steps > li > b::before { content: counter(g) ". "; color: var(--amber-d); }
.gk-steps > li > span { display: block; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; margin-top: 4px; }
.gk-steps > li > span.gk-en { display: inline-block; margin-top: 4px; font: 500 11.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-3); background: var(--card-2); padding: 1px 6px; border-radius: 5px; }
.gk-open { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--ink); }
.gk-alt { margin-top: 16px; color: var(--ink-3); font-size: 14px; }
.gk-alt code { font: 500 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card); color: var(--ink); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
/* Рисунки: условные окна macOS, светлые, кнопка, которую жать, — янтарная. */
.gk-art { height: 128px; border-radius: 12px; background: #DDE3EE; display: grid; place-items: center; overflow: hidden; font: 500 10px/1.3 -apple-system, system-ui, sans-serif; color: #1d1d1f; }
.gk-dialog { width: 86%; background: #F4F4F6; border-radius: 10px; padding: 9px 10px; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.gk-dialog b { display: block; font-size: 10.5px; font-weight: 700; margin: 4px 0 2px; }
.gk-dialog span { display: block; color: #6e6e73; font-size: 9px; }
.gk-warn, .gk-lock { display: block; width: 18px; height: 18px; margin: 0 auto; border-radius: 5px; background: #E8B54D; }
.gk-lock { border-radius: 50%; background: #8e8e93; }
.gk-btns { display: flex; gap: 5px; justify-content: center; margin-top: 7px; }
.gk-btns em, .gk-row em { font-style: normal; font-size: 9px; padding: 3px 8px; border-radius: 6px; background: #E5E5EA; }
.gk-btns em.on, .gk-row em.on, .gk-side em.on { background: #E8B54D; color: #1A1205; font-weight: 700; box-shadow: 0 0 0 2px rgba(232,181,77,.45); }
.gk-field { margin-top: 5px; background: #fff; border-radius: 5px; padding: 2px 0; letter-spacing: 2px; }
.gk-side { width: 82%; background: #F4F4F6; border-radius: 10px; padding: 6px; display: grid; gap: 3px; box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.gk-side em { font-style: normal; font-size: 9.5px; padding: 4px 6px; border-radius: 5px; color: #3a3a3c; }
.gk-row { width: 84%; background: #F4F4F6; border-radius: 10px; padding: 8px 10px; box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.gk-row small { display: block; font-size: 9px; font-weight: 700; color: #6e6e73; text-transform: uppercase; letter-spacing: .04em; }
.gk-row p { font-size: 9.5px; margin: 4px 0 6px; }
.gk-row em { display: inline-block; }
.next-steps li { counter-increment: s; background: var(--card); border-radius: 18px; padding: 18px 18px 20px; animation: rise .35s ease backwards; }
.next-steps li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 14px var(--font); margin-bottom: 12px; }
.next-steps b { display: block; font-weight: 600; }
.next-steps span { display: block; color: var(--ink-2); font-size: 15px; line-height: 1.45; margin-top: 4px; }
.next-steps li:nth-child(2) { animation-delay: .06s; } .next-steps li:nth-child(3) { animation-delay: .12s; } .next-steps li:nth-child(4) { animation-delay: .18s; }

/* Вопросы */
.faq h2 { margin-bottom: 26px; }
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 20px 36px 20px 0; font-weight: 600; font-size: 18px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p { color: var(--ink-2); padding: 0 36px 22px 0; }
.faq-steps { margin: 0; padding: 0 36px 22px 22px; color: var(--ink-2); display: grid; gap: 8px; }
.faq-steps code { font: 500 .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card); color: var(--ink); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }

/* Подвал */
.foot { padding: 34px 0 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); position: relative; }
.foot-in { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.foot a { color: var(--ink-2); text-decoration: none; cursor: pointer; }
.foot a:hover { color: var(--ink); }
.foot-copy { margin-left: auto; }

/* Места под персонажа. Скрыты, пока нет картинок; показать: ?slots в адресе */
/* Маскот: усы с глазами (mascot.js / mascot.css). Слот виден, только когда в нём смонтирован маскот. */
.char { display: none; --mascot-bg: var(--bg); }
.char.is-on { display: block; }
.char .barba-m { display: block; width: 100%; height: auto; }
.hero > .char { width: 210px; margin: 26px auto 0; animation: rise .8s cubic-bezier(.25, .46, .45, .94) .6s backwards; }
.demo-cta { display: flex; align-items: flex-end; gap: 14px; }
.demo-cta .char { width: 118px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.sec-head > .char { flex: none; width: 150px; margin-bottom: 4px; }
.dl-mark.char { display: grid; --mascot-bg: var(--amber); }
.dl-mark .barba-m { width: 62px; }
.foot-name { display: inline-flex; align-items: center; gap: 8px; }
.foot-name .char { width: 54px; color: var(--ink); }
html.show-slots .char:not(.is-on) { display: grid; place-items: center; width: 220px; min-height: 120px; margin: 28px auto 0; border: 2px dashed rgba(14, 14, 14, .28); border-radius: 18px; font: 500 13px var(--font); color: var(--ink-3); }
html.show-slots .char::after { content: "персонаж, сцена " attr(data-scene); }
.char img { display: block; max-width: 100%; height: auto; }

/* Узкие экраны */
@media (max-width: 900px) {
  .gk-steps { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }
  .demo-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .minis { grid-template-columns: 1fr 1fr; }
  .perm-head { display: none; }
  .perm { grid-template-columns: 44px 1fr; row-gap: 6px; }
  .perm p { grid-column: 2; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  section { padding: 76px 0; }
  .hero { padding: 132px 0 64px; }
  h1 { font-size: 35px; letter-spacing: -.03em; }
  h2 { font-size: 27px; }
  .lead { font-size: 17px; }
  .topbar { padding: 0 16px; }
  .logo span, .top-link { display: none; }
  .hero-pointer span { left: 64px; font-size: 13px; }
  /* На телефоне карточки — горизонтальная галерея с примагничиванием: иначе восемь карточек растягивают страницу.
     Край следующей карточки выглядывает справа, точки под галереей показывают, где ты. */
  .cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
           margin: 28px -24px 0; padding: 4px 24px 6px; scroll-padding: 0 24px; scrollbar-width: none; }
  .cards::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 80%; scroll-snap-align: start; }
  /* Края галереи растворяются: видно, что карточки продолжаются вбок. */
  .cards { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%); }
  .cards-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
  .cards-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--ink-3); opacity: .35;
    transition: width var(--m-moderate) var(--m-ease), opacity var(--m-moderate) var(--m-ease); }
  .cards-dots i.on { width: 18px; opacity: .9; background: var(--ink); }
  .next-steps { grid-template-columns: 1fr; }
  .gk { padding: 20px 16px; border-radius: 22px; }
  .gk-steps { grid-template-columns: 1fr; }
  .author-card { flex-direction: column; padding: 26px; }
  .quote { font-size: 19px; }
  .btn { height: 46px; }
  .foot-copy { margin-left: 0; }
  .hero > .char { width: 132px; margin-top: 24px; }
  .sec-head { flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
  .sec-head > .char { width: 104px; margin: 0 0 0 -8px; }
  .demo-cta .char { width: 96px; }
}

@media (max-width: 520px) {
  .minis { grid-template-columns: 1fr; }
}

/* Появление, как у Memento: из лёгкого размытия и сдвига вниз, по очереди. Первый экран — чистым CSS с первого кадра. */
@keyframes rise { from { opacity: 0; filter: blur(8px); transform: translateY(10px); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes rise-fade { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: blur(0); } }
/* backwards, а не both: после появления на элементе не должно оставаться filter: blur(0) — иначе браузер держит его
   отдельной растровой картинкой, и маскот мылится, когда меняет позу. Так же сделано у Memento. */
.hero .eyebrow, .hero h1, .hero .lead, .hero .cta, .hero .mobile-note { animation: rise .8s cubic-bezier(.25, .46, .45, .94) var(--d, 0s) backwards; }
.hero h1 { --d: .08s; }
.hero .lead { --d: .28s; }
.hero .cta { --d: .42s; }
.hero .mobile-note { --d: .52s; }
.hero-pointer { animation: rise-fade .8s cubic-bezier(.25, .46, .45, .94) .9s backwards; }   /* свой transform для центровки, поэтому без сдвига */
/* Ниже первого экрана класс .rv ставит main.js только тем блокам, которых ещё не видно, и снимает после появления. */
.rv { opacity: 0; filter: blur(6px); transform: translateY(14px); transition: opacity .7s cubic-bezier(.25, .46, .45, .94) var(--d, 0s), filter .7s ease var(--d, 0s), transform .7s cubic-bezier(.25, .46, .45, .94) var(--d, 0s); }
.rv.in { opacity: 1; filter: blur(0); transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .hero .eyebrow, .hero h1, .hero .lead, .hero .cta, .hero .mobile-note, .hero-pointer, .hero > .char { animation: none; }
  .rv { opacity: 1; filter: none; transform: none; }
  html { scroll-behavior: auto; }
}
