@import url('native-ui.css');

/* === Базовые стили и CSS-переменные === */

:root {
  --bg: #0c0c0e;
  --bg-elevated: #111114;
  --surface: #16161a;
  --surface-2: #1c1c21;
  --accent: #c41e3a;
  --accent-hover: #d62845;
  --accent-muted: rgba(196, 30, 58, 0.35);
  --text: #eceae7;
  --text-muted: #9c9893;
  --border: #2a2a30;
  --font-display: 'Oswald', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --space-section-gap: clamp(2rem, 4vw, 3rem);
  --space-section-tight: clamp(1.25rem, 3vw, 2rem);
  --space-section-compact: clamp(1rem, 2.5vw, 1.75rem);
  --space-section-roomy: clamp(3rem, 7vw, 4.5rem);
  --space-hero-y: clamp(3rem, 7vw, 5rem);
  /* алиас для старых правил */
  --space-section: var(--space-section-gap);
  --space-block: clamp(1.75rem, 4vw, 2.75rem);
  --container: min(1120px, 100% - 2rem);
  --torn-bottom: polygon(
    0% 0%, 100% 0%, 100% calc(100% - 14px), 97% 100%, 93% calc(100% - 10px),
    87% 100%, 81% calc(100% - 12px), 74% 100%, 67% calc(100% - 8px),
    59% 100%, 51% calc(100% - 13px), 43% 100%, 35% calc(100% - 9px),
    27% 100%, 19% calc(100% - 11px), 11% 100%, 4% calc(100% - 7px),
    0% calc(100% - 15px)
  );
  --torn-small: polygon(
    0% 0%, 100% 0%, 100% calc(100% - 10px), 95% 100%, 88% calc(100% - 7px),
    78% 100%, 68% calc(100% - 9px), 56% 100%, 44% calc(100% - 6px),
    32% 100%, 20% calc(100% - 8px), 8% 100%, 0% calc(100% - 11px)
  );
  /* Токены эффектов (переопределяются в css/theme-generated.css) */
  --radius-nav-toggle: 0;
  --radius-card-media: 12px;
  --radius-code-block: 10px;
  --shadow-mobile-menu: 0 18px 40px rgba(0, 0, 0, 0.35);
  --nav-toggle-duration: 0.25s;
  --overlay-animation-duration: 0.25s;
  --header-overlay-bg: rgba(12, 12, 14, 0.78);
  --brand-word-transition: 0.2s;
  --scrollbar-thumb: var(--surface-2);
  --scrollbar-track: var(--bg);
  /* Типографика RTE / rich-content (редактируйте здесь) */
  --rich-line-height: 1.55;
  --rich-p-gap: 0.65em;
  --rich-list-gap: 0.35rem;
  --rich-list-gap-after: 0.65rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
}

/* Утилиты */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.text-accent {
  color: var(--accent);
}

/* Контейнеры */
.container {
  width: var(--container);
  margin-inline: auto;
}

.container--narrow {
  --container: min(560px, 100% - 2rem);
}

/* ?????????? ????? ?????? */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

a:visited {
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-footer a,
.site-footer__links a {
  color: var(--text);
}

.site-footer a:hover,
.site-footer__links a:hover {
  color: var(--accent);
}

