/* Общий слой прототипов info.theraki.ru: токены Porcelain Folk (DESIGN.md меню) + сетка BPM эталона */

@font-face { font-family: "Fraunces"; src: url("fonts/Fraunces72pt-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-02AF, U+0300-036F, U+2000-206F, U+20A0-20CF, U+2116; }
@font-face { font-family: "Fraunces"; src: url("fonts/Fraunces72pt-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0000-02AF, U+0300-036F, U+2000-206F, U+20A0-20CF, U+2116; }
@font-face { font-family: "Fraunces"; src: url("fonts/Fraunces72pt-LightItalic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; unicode-range: U+0000-02AF, U+0300-036F, U+2000-206F, U+20A0-20CF, U+2116; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-cyrillic-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jbmono-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jbmono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122; }

:root {
  --white: #ffffff;
  --surface: #f6f9fb;
  --mist: #eef4f8;
  --ink: #17313d;
  --muted: #6b8494;
  --hairline: rgba(23, 49, 61, 0.14);
  --blue-100: #dcecf5;
  --blue-200: #a7d9ee;
  --blue-400: #4f8bb6;
  --blue-600: #2b7da4;
  --blue-800: #17506b;
  --cobalt: #2f66c0;
  --red-500: #e11308;

  --display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  /* 128 BPM: доля 469 мс, восьмая 234, шестнадцатая 117 */
  --beat: 469ms;
  --eighth: 234ms;
  --sixteenth: 117ms;
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-swift: cubic-bezier(0.7, 0, 0.2, 1);

  --gutter: 20px;
  --hero-h: clamp(300px, 46svh, 420px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--white); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }

.page {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  overflow-x: clip;
}

.mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* HUD: моно-микроподписи как в эталоне, но чернилами по фарфору */
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 0;
  height: calc(max(14px, env(safe-area-inset-top)) + 22px);
  color: var(--muted);
  position: relative;
  z-index: 5;
}
.hud__dot {
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--red-500);
  vertical-align: 1px;
  transform: scale(var(--pulse, 1));
}

/* Локап: лого + тонкая линейка + мета в три колонки (как финал эталона) */
.lockup { padding: 0 var(--gutter); }
.lockup__logo { display: block; width: min(212px, 56vw); height: auto; margin: 0 auto; }
.lockup__rule {
  height: 1px;
  margin: 14px 0 9px;
  background: var(--ink);
  opacity: 0.8;
  transform-origin: 0 50%;
}
.lockup__meta { display: flex; justify-content: space-between; color: var(--muted); }
.lockup__meta b { font-weight: 500; color: var(--red-500); }

/* Ссылки: видимы и кликабельны с первого кадра, без JS */
.links { list-style: none; margin: 14px 0 0; padding: 0 var(--gutter); counter-reset: n; }
.links li { position: relative; }
.link {
  position: relative;
  display: grid;
  grid-template-columns: 26px 34px 1fr 22px;
  align-items: center;
  column-gap: 12px;
  min-height: 70px;
  padding: 10px 0;
  isolation: isolate;
}
.link::before {
  /* заливка отклика на тап — растекается от маркера, как чернила */
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--gutter));
  z-index: -1;
  background: var(--blue-100);
  clip-path: circle(0 at 52px 50%);
  transition: clip-path 0.45s var(--ease-snap);
}
.link:active::before,
.link:focus-visible::before { clip-path: circle(140% at 52px 50%); transition-duration: 0.35s; }
@media (hover: hover) {
  .link:hover::before { clip-path: circle(140% at 52px 50%); }
}
.link__n { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; }
.link__mark { width: 34px; height: 34px; display: block; }
.link__mark svg { width: 100%; height: 100%; display: block; }
.link__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.link__label {
  font-family: var(--display);
  font-weight: 500;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.link__label i { font-style: italic; }
.link__sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link__arrow {
  width: 22px; height: 22px;
  color: var(--ink);
  transition: transform 0.35s var(--ease-snap);
}
.link:active .link__arrow { transform: translate(3px, -3px); }
@media (hover: hover) { .link:hover .link__arrow { transform: translate(3px, -3px); } }
.link__rule {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--hairline);
  transform-origin: 0 50%;
}
.links li:first-child .link__rule--top { top: 0; bottom: auto; }

.foot {
  display: flex;
  justify-content: space-between;
  padding: 22px var(--gutter) 0;
  color: var(--muted);
}

/* Прототипная плашка переключения A/B — не часть страницы */
.proto-tag {
  position: fixed;
  right: 10px; bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 100;
  padding: 6px 9px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
