/* Chronometer Studio — сайт. Тема «Студия»: эмаль и циферблат; золото — только на тёмном, один элемент на экран.
   Значения — brand/tokens.json; вид — site/макеты/главная-v4-анимация.html (утверждён 03.10.2026). */
@font-face { font-family: 'Commissioner'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/commissioner-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Commissioner'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/commissioner-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Commissioner'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/commissioner-latin-ext.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: 'Commissioner'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/commissioner-latin.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: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/plex-mono-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/plex-mono-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/plex-mono-latin-ext.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: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/plex-mono-latin.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; }

:root {
  --ink: #111315; --enamel: #EEF0EF; --gold: #D8A03A;
  --dim-tick: #3E454A; --rule: #8D9399; --quiet: #5C6268; --dim-text: #A3AAAE; --hair: #D3D7D8;
  --pad: clamp(20px, 4.4vw, 64px);
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* под подвалом и при оттяжке страницы — тёмное: короткая страница не обрывается светлой полосой */
html { background: var(--ink); }
body { margin: 0; background: var(--enamel); color: var(--ink); font-family: 'Commissioner', system-ui, sans-serif; }
dl, time, .reading { font-variant-numeric: tabular-nums; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
/* выделение текста — в цветах студии: чернила по эмали на светлом, эмаль по чернилам на тёмном */
::selection { background: var(--ink); color: var(--enamel); }
.hero ::selection, footer ::selection { background: var(--enamel); color: var(--ink); }
/* Safari заливает выделение между строками до краёв страницы; блок с position: relative ставит заливке границу */
p, li, dt, dd, h1, h2, h3 { position: relative; }
img, svg { display: block; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: var(--pad); top: -60px; background: var(--enamel); color: var(--ink); padding: 8px 12px; border-radius: 6px; font-weight: 500; z-index: 2; }
.skip:focus { top: 12px; }

/* первый экран — тёмный, как циферблат */
.hero { background: var(--ink); color: var(--enamel); }
.hero.short { padding-bottom: 56px; }
.hero.tall { padding-bottom: 72px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 28px; }
.bar nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 44px); font-weight: 500; font-size: 16px; }
.bar nav .links { display: contents; }
.bar nav a { text-decoration: none; }
.bar nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .32em; }
/* «вы здесь» — подчёркнуто, и у раздела, и у языка (Р-студия-062) */
.bar nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .32em; }
.bar nav .lang { display: flex; gap: 14px; margin-left: clamp(0px, 1.2vw, 12px); }
.bar nav .lang [aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .32em; }
.bar nav .lang a { color: var(--dim-text); }
.bar nav .lang a:hover { color: var(--enamel); text-decoration: none; }
.wordmark img { height: 26px; width: auto; }
.crumb { margin-top: clamp(48px, 7vw, 96px); color: var(--dim-text); font-size: 15px; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* главная */
.ruler { width: 100%; height: auto; margin-top: clamp(56px, 9vw, 120px); overflow: hidden; }
h1 { font-weight: 600; font-size: clamp(44px, 6.4vw, 92px); line-height: 1; letter-spacing: -0.025em; margin: 40px 0 0; text-wrap: balance; }
h2, h3, .entries .title { text-wrap: balance; }
/* длинное слово («Конфиденциальность») на узком телефоне переносится по слогам, а не вылезает за край */
h1, h2 { overflow-wrap: break-word; }
.page-hero h1 { hyphens: auto; }  /* переносы — только у заголовков служебных страниц, где одно длинное слово */
/* абзацы без одинокого слова в последней строке */
p, li, dd { text-wrap: pretty; }
/* русский заголовок главной мельче: кириллица Commissioner на глаз крупнее латиницы (Ярослав, 04.10.2026) */
html[lang="ru"] .home-hero h1 { font-size: clamp(36px, 5vw, 72px); }
.lede { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 36px 0 72px; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; }
.lede p { margin: 0; max-width: 34em; }
.lede .quiet { color: var(--dim-text); }

/* страница игры */
.fc { margin-top: 20px; width: min(620px, 100%); }
.fc img, .fc svg { display: block; width: 100%; height: auto; }
.page-hero .rss { margin: 14px 0 0; font-size: 15px; font-weight: 500; }
.game h1 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -.022em; margin-top: 48px; max-width: 15em; }
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 44px; border-top: 1px solid var(--dim-tick); padding-top: 28px; }
.promises p { margin: 0; font-size: 18px; line-height: 1.5; font-weight: 600; }

/* запись девлога и служебные страницы */
.col { max-width: 720px; }
.entry-hero .fc { width: min(380px, 80%); }
.entry-hero h1, .page-hero h1 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.06; letter-spacing: -.022em; margin-top: 44px; }
.page-hero h1 { margin-top: clamp(48px, 7vw, 96px); }
.meta { margin-top: 18px; color: var(--dim-text); font-size: 15px; }
.reading { font-family: var(--mono); font-weight: 500; font-size: 14px; }
.meta .reading { display: block; margin-top: 8px; }
article { padding: 56px 0 8px; }
article p { font-size: clamp(18px, 1.4vw, 20px); line-height: 1.65; margin: 0 0 1.15em; }
article .end { border-top: 1px solid var(--rule); margin-top: 28px; padding-top: 18px; color: var(--quiet); font-size: 14px; line-height: 1.5; }
.after { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 28px; font-weight: 500; }
.page-hero .sub { margin: 20px 0 0; color: var(--dim-text); font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; max-width: 34em; }

/* разделы — светлые, для чтения */
section { padding: 72px 0 0; }
h2 { font-weight: 600; font-size: clamp(34px, 3.4vw, 48px); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.game h2, .page h2 { font-size: clamp(30px, 3vw, 44px); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; border-top: 1px solid var(--rule); padding: 32px 0 40px; }
.row h3 { font-weight: 600; font-size: clamp(26px, 2.5vw, 36px); letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 14px; }
.row .desc { color: var(--quiet); font-size: 18px; line-height: 1.5; margin: 0; max-width: 32em; }
.projects h2 { margin-bottom: 36px; }
.row h3.mark { margin: 6px 0 24px; }
/* знак игры — ссылка; при наведении под ним линия, как подчёркивание ссылок (Р-студия-057) */
.row h3.mark a { display: inline-block; padding-bottom: 10px; border-bottom: 2px solid transparent; transition: border-color .15s ease-out; }
.row h3.mark a:hover { border-bottom-color: var(--ink); }
.row h3.mark img { height: 72px; width: auto; }
.latest-block { margin-top: 28px; border-top: 1px solid var(--hair); padding-top: 20px; }
.latest-block .label { color: var(--quiet); font-size: 15px; margin: 0 0 8px; }
.latest-block .t { font-weight: 600; font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -.01em; line-height: 1.25; }
.latest-block .meta2 { margin: 8px 0 0; color: var(--quiet); display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; }
.latest-block .meta2 a { font-size: 16px; font-weight: 500; color: var(--ink); }
dl { display: grid; grid-template-columns: 156px 1fr; margin: 0; font-size: 16px; }
dt { color: var(--quiet); padding: 6px 0; }
dd { margin: 0; font-weight: 500; padding: 6px 0; }
dl.lined { font-size: 17px; }
dl.lined dt, dl.lined dd { border-bottom: 1px solid var(--hair); padding: 11px 0; }
.game dl.lined, .page dl.lined { grid-template-columns: 180px 1fr; }
.more { display: inline-block; margin-top: 18px; font-weight: 500; }
.note { color: var(--quiet); font-size: 18px; line-height: 1.55; margin: 0; max-width: 34em; }
.prose p { font-size: 18px; line-height: 1.6; margin: 0 0 1em; max-width: 36em; }
.prose p:last-child { margin-bottom: 0; }
.prose p.label { color: var(--quiet); font-size: 15px; margin: 0 0 6px; }
.prose p.note-q { color: var(--quiet); margin-bottom: 28px; }
.prose p + p.label { margin-top: 28px; }
.prose dl.lined { margin-top: 8px; }
.prose .more { margin-top: 0; }
.prose .quiet { color: var(--quiet); font-size: 15px; margin-left: 10px; }
.row .side h2 { margin-bottom: 20px; }
.entry-row .when { margin: 4px 0 0; color: var(--quiet); display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.entry-row .t { font-weight: 600; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.015em; line-height: 1.2; text-wrap: balance; }
.entry-row .reading { color: var(--quiet); margin: 10px 0 0; }
.entry-row { padding-bottom: 32px; }
.entries { list-style: none; margin: 0; padding: 0; }
.entries li + li { border-top: 1px solid var(--hair); margin-top: 24px; padding-top: 24px; }
.entries .title { font-weight: 600; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.015em; line-height: 1.2; margin: 0 0 8px; }
.entries .reading { color: var(--quiet); margin: 0 0 14px; }
.entries .more { margin-top: 0; }

/* подвал — тёмный, со знаком */
footer { background: var(--ink); color: var(--enamel); margin-top: 72px; }
/* подвал в одну строку: слева знак и ©, справа соцсети и «Конфиденциальность»; уже 1200 px — ссылки под знаком */
footer .wrap { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 28px 48px; padding-top: 36px; padding-bottom: 36px; }
footer .brand { display: flex; align-items: center; gap: 32px; }
footer .lockup { height: 52px; width: auto; }
footer small { color: var(--dim-text); font-size: 14px; }
footer nav { justify-self: end; display: flex; align-items: center; gap: 12px 64px; }
footer ul { display: flex; flex-wrap: wrap; gap: 12px 40px; list-style: none; margin: 0; padding: 0; font-weight: 500; font-size: 15px; }
footer ul a { text-decoration: none; }
footer ul a:hover { text-decoration: underline; }
footer ul.social a { color: var(--dim-text); }
footer ul.social a:hover { color: var(--enamel); }

@media (max-width: 1200px) { footer .wrap { grid-template-columns: 1fr; } footer nav { justify-self: start; } }

@media (max-width: 760px) {
  .lede, .row, .promises { grid-template-columns: 1fr; gap: 20px; }
  .promises { gap: 14px; }
  .row h3.mark { margin-bottom: 16px; }
  .row h3.mark img { height: 56px; }
  /* шапка на телефоне: подпись и языки — первой строкой, страницы — второй, по левому краю подписи (Р-студия-067) */
  /* nav не делаем display: contents — иначе часть браузеров теряет для читалок ориентир «навигация» */
  .bar { position: relative; flex-wrap: wrap; row-gap: 18px; }
  .bar nav { width: 100%; font-size: 15px; }
  .bar nav .links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
  .bar nav .lang { position: absolute; right: 0; top: 28px; height: 26px; align-items: center; margin-left: 0; font-size: 16px; }
  .bar nav a, .bar nav .lang [aria-current] { padding: 6px 0; }  /* место под палец — не меньше 24 px */
  dl, .game dl.lined, .page dl.lined { grid-template-columns: 112px minmax(0, 1fr); font-size: 15px; }
  dd { overflow-wrap: anywhere; }
  /* подвал на телефоне: знак мельче, «© 2026» рядом, как на компьютере; ниже соцсети, ещё ниже «Конфиденциальность» */
  footer .wrap { row-gap: 24px; }
  footer .brand { flex-wrap: wrap; gap: 10px 20px; }  /* на самых узких (320) год уходит под знак */
  footer .lockup { height: 38px; }
  footer nav { flex-direction: column; align-items: flex-start; gap: 18px; }
  .meta .reading { overflow-wrap: anywhere; }
}

/* ===== заставка знака: один прогон, сходится к показанию и замирает (brand/README.md, «Движение») ===== */
.ruler .t, .ruler .b { transform-box: fill-box; }
.ruler .t { transform-origin: 50% 100%; }
.ruler .b { transform-origin: 50% 50%; }
.ruler .i { transform-box: fill-box; transform-origin: 50% 0%; }
.ruler .g { transform-box: view-box; }
/* пока линейка не проиграна — она «невзведена»; без JS и при отключённом движении — сразу конечный вид */
.js .ruler:not(.play) .t, .js .ruler:not(.play) .r { transform: scaleY(0); }
.js .ruler:not(.play) .b { transform: scaleX(0); }
.js .ruler:not(.play) .i { opacity: 0; }
.play .b { animation: draw .32s cubic-bezier(.2,.7,.2,1) both; }
.play .t { animation: rise .42s cubic-bezier(.2,.8,.25,1) both; animation-delay: var(--d); }
.play .r { animation: settle .52s cubic-bezier(.3,1.25,.45,1) both; animation-delay: var(--d); }
.play .i { animation: index .22s ease-out both; animation-delay: var(--d); }
/* блик: свет один раз проходит по золоту снизу вверх и уходит (Ярослав, 03.10.2026) */
.play .g { animation: glint .6s cubic-bezier(.4,0,.2,1) both; animation-delay: 1.36s; }
@keyframes draw   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise   { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes settle { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes index  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes glint  { from { transform: translateY(0); } to { transform: translateY(-200px); } }
@media (prefers-reduced-motion: reduce) {
  .play .b, .play .t, .play .r, .play .i, .play .g { animation: none; }
  .js .ruler:not(.play) .t, .js .ruler:not(.play) .r, .js .ruler:not(.play) .b { transform: none; }
  .js .ruler:not(.play) .i { opacity: 1; }
}

/* ===== заставка знака Flag Carrier (Р-студия-070): обвод → сетка → лента → подпись, ≈ 1,35 с, один прогон ===== */
#fcmark .letters path { transform-box: fill-box; }
.js #fcmark:not(.play) .m, .js #fcmark:not(.play) .grid { stroke-dashoffset: 1; }
.js #fcmark:not(.play) .letters path { opacity: 0; }
#fcmark.play .m.ring { animation: fc-draw .52s cubic-bezier(.3,.6,.2,1) both; }
#fcmark.play .grid { animation: fc-draw .38s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d); }
#fcmark.play .m.rib { animation: fc-draw .52s cubic-bezier(.55,0,.3,1) both; animation-delay: .56s; }
#fcmark.play .l1 path { animation: fc-land .32s cubic-bezier(.2,.8,.25,1) both; animation-delay: calc(.9s + var(--i) * 12ms); }
#fcmark.play .l2 path { animation: fc-land .32s cubic-bezier(.2,.8,.25,1) both; animation-delay: calc(1.02s + var(--i) * 12ms); }
@keyframes fc-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fc-land { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #fcmark.play * { animation: none !important; }
  .js #fcmark:not(.play) .m, .js #fcmark:not(.play) .grid { stroke-dashoffset: 0; }
  .js #fcmark:not(.play) .letters path { opacity: 1; }
}
