/* ------------------------------------------------------------------ */
/*  Копачевский. Общая база — base.css                                 */
/* ------------------------------------------------------------------ */

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/unbounded-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: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-cyrillic.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #f2eee6;
  --ink: #16130c;
  --ink-soft: rgba(22, 19, 12, 0.64);
  --ink-faint: rgba(22, 19, 12, 0.6);
  --line: rgba(22, 19, 12, 0.12);
  --accent: #e5484d;
  --accent-text: #c2313a;
  --pad-x: clamp(22px, 5vw, 72px);
  --mast-h: 78px;
  --font-body: 'Unbounded', 'Arial Black', 'Arial', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --step: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  position: relative;
}

::selection { background: var(--ink); color: var(--bg); }

a { color: inherit; text-decoration: none; }

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

/* --------------------------- Шапка -------------------------------- */

.masthead {
  position: relative;
  z-index: 2;
  height: var(--mast-h);
  padding: 0 var(--pad-x);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 0;
  padding: 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
  transition: color 0.22s var(--step);
}

@media (hover: hover) {
  .brand:hover { color: var(--accent-text); }
}

.status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ------------------------ Основная сцена -------------------------- */

.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  padding: clamp(12px, 3vh, 34px) var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --------------------------- Заголовок ---------------------------- */

.title {
  font-weight: 400;
  font-size: clamp(2.3rem, 7.2vw, 6.5rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-transform: lowercase;
  color: var(--ink);
  user-select: none;
}

.tl-line {
  display: block;
}

.tl-2 {
  margin-left: 0.82em;
  font-weight: 500;
}

.tl-dot {
  color: var(--accent);
}

/* --------------------------- Подзаголовок ------------------------- */

.sub {
  max-width: 40ch;
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------------------------- Подвал ------------------------------ */

.foot {
  position: relative;
  z-index: 2;
  min-height: 66px;
  padding: 0 var(--pad-x);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.foot-meta {
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* --------------------------- Reveal ------------------------------- */

.js .reveal { opacity: 0; }

.js.fonts-pending .reveal,
.js.fonts-pending .tl-dot {
  opacity: 0 !important;
}

.r-mast { animation: rise 0.5s var(--step) 0.08s both; }
.r-l1 { animation: rise 0.6s var(--step) 0.2s both; }
.r-l2 { animation: rise 0.6s var(--step) 0.3s both; }
.r-sub { animation: rise 0.6s var(--step) 0.42s both; }
.r-foot { animation: rise 0.5s var(--step) 0.66s both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------ Responsive ------------------------------ */

@media (max-width: 720px) {
  :root { --mast-h: 62px; }

  .title {
    font-size: clamp(1.8rem, 8.8vw, 3rem);
    letter-spacing: -0.01em;
  }

  .tl-2 { margin-left: 0.5em; }

  .sub {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .foot {
    min-height: 56px;
  }
}

@media (max-width: 480px) {
  .status-text { display: none; }
}

@media (max-height: 600px) {
  :root { --mast-h: 52px; }

  .title {
    font-size: clamp(1.7rem, 6.5vw, 3.6rem);
    line-height: 1.1;
  }

  .sub {
    font-size: 0.9rem;
  }

  .foot {
    min-height: 48px;
  }
}

/* --------------------- Reduced motion ----------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal, .tl-dot {
    opacity: 1 !important;
    transform: none !important;
  }
}