/* Главная «/» — без React и сборки. Образец — макет заказчика 2026-10-27: слова капсом лесенкой, одна цветная карточка по центру, мелкие подписи по углам.
   Шрифт — JetBrains Mono Regular 400 (моноширинный; лицензия OFL — public/fonts/jetbrains-mono/OFL.txt). Решение заказчика: тонкие не нужны.
   Если понадобятся: woff2 в ту же папку, @font-face ниже, путь в HOME_FONTS (server/core/site.ts), --wt-words / --wt-text.
   Тема — по настройке системы (prefers-color-scheme). */
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --bg: #eeeeee;
  --ink: #141414;
  --muted: #6f6f6f;
  --bigmark: rgba(20, 20, 20, 0.04);
  --accent: rgba(255, 74, 56, 0.9);
  --accent-solid: #ff4a38;
  --on-accent: #141414;
  --dot: #141414;
  --on-dot: #f4f4f2;
  --dot-shadow: 0 4px 14px rgba(0, 0, 0, 0.28), 0 0 0 4px rgba(255, 255, 255, 0.35);
  --select: #1f6feb;
  --wt-words: 400;
  --wt-text: 400;
  --font: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e0e0d;
    --ink: #d8d8d4;
    --muted: #7d7d78;
    --bigmark: rgba(255, 255, 255, 0.025);
    --dot: #ececE8;
    --on-dot: #0e0e0d;
    --dot-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(255, 255, 255, 0.06);
    --select: #5b9bff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: var(--wt-text);
  font-size: 12px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Вошёл / не вошёл: метку data-auth на <body> меняет Worker. */
body[data-auth="out"] .only-in,
body[data-auth="in"] .only-out { display: none !important; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--select); outline-offset: 3px; }

.stage { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; }

/* Бледное имя на фоне */
.bigmark {
  position: absolute; left: 0; right: 0; top: 50%; z-index: 0;
  margin-top: -0.4em; text-align: center; white-space: nowrap; pointer-events: none; user-select: none;
  font-size: 22vw; font-weight: 700; line-height: 0.8; letter-spacing: -0.04em; color: var(--bigmark);
}

/* Слова лесенкой: размеры и отступы в em, композиция растёт вместе со шрифтом. Ширина блока — 11em, он стоит по центру. */
.words {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding-left: calc(50% - 5.5em);
  font-size: min(4.6vw, 70px); font-weight: var(--wt-words); line-height: 1.38; letter-spacing: -0.01em;
  pointer-events: none; user-select: none;
}
.ln { white-space: nowrap; margin-left: var(--x, 0); }
.m-only { display: none; }
.w { opacity: var(--o, 0.3); }
.w + .w { margin-left: 0.5em; }
.l1 .w, .l6 .w { --o: 0.26; }
.l2 .w, .l3 .w, .l4 .w { --o: 0.44; }
.l5 .w { --o: 0.32; }
.l3 .w:first-child { --o: 0.36; }
.w.over { position: relative; z-index: 3; }
.l1 { --x: 3.4em; }
.l2 { --x: 3.8em; }
.l3 { --x: 0.5em; }
.l4 { --x: 5em; }
.l5 { --x: 1.2em; }
.l6 { --x: 3.4em; }

/* Центр: цветная карточка и круглая кнопка рядом */
.center { position: absolute; left: 50%; top: 50%; z-index: 2; width: var(--card); height: var(--card); transform: translate(-50%, -50%); --card: clamp(210px, 17vw, 260px); }
.card {
  position: relative; width: 100%; height: 100%; padding: 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--accent-solid); color: var(--on-accent);
}
/* Карточка полупрозрачная: сквозь неё видны слова. Без поддержки blur — просто прозрачность. */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .card { background: var(--accent); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
}
.card .logo { display: block; width: 44px; height: auto; color: var(--on-accent); }
.card-body { margin-top: 10px; }
.card h1 { margin: 0 0 10px; font-size: 11px; font-weight: 500; line-height: 1.4; }
.card p { margin: 0; font-size: 10px; line-height: 1.45; }
.more {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: text-decoration-color 0.15s, opacity 0.15s;
}
.more svg, .go .dot svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.more:hover { opacity: 0.7; }

.go { position: absolute; left: calc(100% + 24px); top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 14px; text-decoration: none; white-space: nowrap; }
.go .dot { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--dot); color: var(--on-dot); box-shadow: var(--dot-shadow); transition: transform 0.2s; }
.go .dot svg { width: 20px; height: 20px; }
.go .label { font-size: 11px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.go:hover .dot { transform: scale(1.06); }

/* Углы */
.corner { position: absolute; z-index: 4; margin: 0; font-size: 10px; line-height: 1.5; color: var(--muted); }
.tl { left: 32px; top: 30px; }
.tr { right: 32px; top: 30px; text-align: right; }
.bl { left: 32px; bottom: 28px; color: var(--ink); }
.br { right: 32px; bottom: 28px; text-align: right; }
.brand { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.brand .logo { width: 30px; height: auto; display: block; }
.year { font-size: 18px; letter-spacing: -0.02em; }
.sub { color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn[disabled] { opacity: 0.5; cursor: default; }
.linkbtn:hover { opacity: 0.7; }

/* Ширины, на которых лесенка не помещается рядом с карточкой: кнопка уходит под карточку */
@media (max-width: 1100px) {
  .go { left: 50%; top: calc(100% + 18px); transform: translateX(-50%); }
}

/* Телефон: та же композиция в малом масштабе — шесть коротких слов лесенкой, карточка ~80 % ширины, круглая кнопка под ней справа.
   Первый экран — ровно в один экран (100svh), без прокрутки. */
@media (max-width: 700px) {
  .stage { height: 100vh; height: 100svh; min-height: 0; }
  .words { padding-left: 0; padding-bottom: 20svh; font-size: 12vw; line-height: 1.7; }
  .ln { margin-left: 0; }
  .w { display: block; }
  .w + .w { margin-left: 0; }
  .l1 .w { margin-left: 16vw; }
  .l2 .m-only { margin-left: 48vw; }
  .l3 .w:nth-child(1) { margin-left: 10vw; }
  .l3 .w:nth-child(2) { margin-left: 56vw; }
  .l5 .w:nth-child(2) { margin-left: 3vw; }
  .l6 .w:nth-child(3) { margin-left: 78vw; }
  .d-only, .m-hide { display: none; }
  .m-only { display: block; }
  .center { --card: min(80vw, 340px); top: 55%; height: auto; }
  .card { padding: 18px; height: auto; gap: 34px; }
  .card .logo { width: 52px; }
  .card h1 { font-size: 14px; }
  .card p { font-size: 12px; }
  .more { font-size: 13px; }
  .go { left: auto; right: 0; top: calc(100% + 16px); transform: none; flex-direction: row-reverse; }
  .go .label { font-size: 13px; }
  .tl { left: 18px; top: 20px; }
  .bl { left: 18px; bottom: 20px; }
  .br { right: 18px; bottom: 20px; }
  .year { font-size: 14px; }
  .corner { font-size: 11px; }
  .bigmark { font-size: 30vw; top: 44%; }
}

@media (prefers-reduced-motion: reduce) {
  .go .dot { transition: none; }
}
