/* ezhakusok.ru — визитка в виде бирки мягкой игрушки */

@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-cyrillic-600-normal.woff2") format("woff2");
  font-weight: 600; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Цвета с фотографии: серый стол, белая сатиновая бирка,
   тёмно-коричневый нос, бежевый мех, тёмные иголки. */
:root {
  --desk: #c9cbce;
  --label: #fbfbfa;
  --ink: #3a2a22;
  --ink-soft: #7a6a60;
  --fur: #a88658;
  --nose: #5b3a2c;
  --stitch: #c9bfb5;
  --seam: #ecebe8;
  --focus: #5b3a2c;
  --shadow: 0 1px 0 rgba(58, 42, 34, .06), 0 18px 40px -24px rgba(58, 42, 34, .45);
}
@media (prefers-color-scheme: dark) {
  :root {
    --desk: #1c1e21;
    --label: #2a2c30;
    --ink: #eee6dc;
    --ink-soft: #a99d92;
    --fur: #d8c09c;
    --nose: #e9b48f;
    --stitch: #4a4c52;
    --seam: #323439;
    --focus: #e9b48f;
    --shadow: 0 18px 40px -20px rgba(0, 0, 0, .7);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 48px 16px;
  background: var(--desk);
  color: var(--ink);
  font: 400 1rem/1.5 "Onest", system-ui, sans-serif;
}

/* Языки: показываем только активный */
html[data-lang="ru"] [lang="en"],
html[data-lang="en"] [lang="ru"] { display: none; }

.tag {
  position: relative;
  width: 100%;
  max-width: 30rem;
  padding: 3.25rem 2rem 1.75rem;
  background: var(--label);
  border-radius: 2px 2px 6px 6px;
  box-shadow: var(--shadow);
  /* строчка по краю */
  outline: 1.5px dashed var(--stitch);
  outline-offset: -10px;
}

/* верхний загиб бирки, вшитый в шов */
.seam {
  position: absolute;
  inset: 0 0 auto 0;
  height: 1.5rem;
  background: var(--seam);
  border-bottom: 1.5px dashed var(--stitch);
  border-radius: 2px 2px 0 0;
}

.lang {
  position: absolute;
  top: 2.1rem;
  right: 1.4rem;
  padding: .25rem .5rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-soft);
  font: 400 .8125rem/1 "JetBrains Mono", ui-monospace, monospace;
  cursor: pointer;
}
.lang:hover { color: var(--ink); }

.hedgehog {
  margin: 0 auto 1.75rem;
  width: max-content;
  max-width: 100%;
  font: 400 clamp(7.5px, 2.45vw, 13px)/1.2 "JetBrains Mono", ui-monospace, monospace;
  color: var(--ink);
  user-select: none;
}
.hedgehog .f { color: var(--fur); }
.hedgehog .e { color: var(--ink); }
.hedgehog .n { color: var(--nose); }
.hedgehog.blink .e { visibility: hidden; }

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.role {
  margin: .5rem 0 0;
  font-size: 1.0625rem;
}

.clock {
  margin: .25rem 0 0;
  color: var(--ink-soft);
  font-size: .9375rem;
}
.clock time { font-variant-numeric: tabular-nums; }

.links {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  border-top: 1.5px dashed var(--stitch);
}
.links li { border-bottom: 1.5px dashed var(--stitch); }
.links a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .8rem .25rem;
  color: inherit;
  text-decoration: none;
}
.links .where { font-weight: 600; }
.links .handle {
  font: 400 .875rem/1.4 "JetBrains Mono", ui-monospace, monospace;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  text-align: right;
}
.links a:hover .handle { color: var(--nose); text-decoration: underline; text-underline-offset: 3px; }

.care {
  margin: 1.5rem 0 0;
  color: var(--ink-soft);
  font-size: .8125rem;
}

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

@media (max-width: 380px) {
  .tag { padding: 3rem 1.25rem 1.5rem; }
  .lang { right: .9rem; }
}

/* 404 */
.lost h1 { font-size: 1.5rem; }
.lost p { margin: .5rem 0 0; }
.lost a { color: var(--nose); }
