/*
Theme Name: GO RUFP
Description: Лендинг-заглушка go.rufp.ru: манифест «Начните создавать» и страница 404. Самодостаточная тема без билда, бренд RUFP.
Version: 1.0.2
Author: RUFP
Text Domain: go-rufp
*/

/* ═══ Токены ═══ */
:root {
  --bg:          #0e0d0c;
  --bg-raise:    #16130f;
  --text:        #f5f1ea;
  --text-dim:    #b3a99b;
  --text-faint:  #7a7164;
  --accent:      #d97757;
  --accent-up:   #e08a6c;
  --accent-deep: #b85f43;
  --on-accent:   #1a0f08;
  --line:        rgba(245, 241, 234, 0.12);
  --font-sans:   'Inter Tight', system-ui, -apple-system, sans-serif;
  --font-mono:   'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  --font-brand:  'Space Grotesk', 'Inter Tight', system-ui, sans-serif;
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  /* Радиусы: интерактив = пилюля, поверхности = 16px. Других нет. */
  --r-pill:      999px;
  --r-surface:   16px;
}

/* ═══ База ═══ */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--on-accent); }

img { max-width: 100%; height: auto; }

a { color: inherit; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  /* width:100% обязателен: внутри флекс-секций (hero, err) элемент иначе ужимается по контенту */
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* Зерно поверх всего: фиксированный слой, не участвует в скролле */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* ═══ Лого (по logo.css из бренд-пака) ═══ */
.rufp-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  line-height: 1;
  color: var(--text);
  font-size: 21px;
  text-decoration: none;
}
.rufp-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1em;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.rufp-mark .br { color: var(--accent); }
.rufp-mark .ltr { padding: 0 0.04em; }
.rufp-wordmark {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: -0.04em;
}

/* ═══ Кнопки и ссылки ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  padding: 14px 28px;
  font-size: 1rem;
}
.btn-primary:hover { background: var(--accent-up); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }

.btn-nav { padding: 10px 20px; font-size: 0.9rem; }

.btn-big { padding: 18px 38px; font-size: 1.1rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}
.link-arrow svg { transition: transform 0.25s var(--ease-out); }
.link-arrow:hover { color: var(--text); }
.link-arrow:hover svg { transform: translate(2px, -2px); }

/* ═══ Навбар ═══ */
.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* ═══ Hero ═══ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 120px 64px;
  overflow: hidden;
}

/* Аврора: тёплое свечение из нижнего правого угла */
.hero-aura {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero-aura::before {
  content: '';
  position: absolute;
  right: -30%;
  bottom: -55%;
  width: 90vw;
  height: 90vw;
  max-width: 1100px;
  max-height: 1100px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(217, 119, 87, 0.32) 0%,
    rgba(217, 119, 87, 0.10) 42%,
    transparent 70%);
  filter: blur(20px);
}
.hero-aura::after {
  content: '';
  position: absolute;
  left: -20%;
  top: -40%;
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(217, 119, 87, 0.07) 0%,
    transparent 65%);
}

.hero-title {
  margin: 0 0 28px;
  font-size: clamp(3.3rem, 12.5vw, 8.75rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero-title .line {
  display: block;
}
.hero-title .line-in {
  display: block;
}

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

.hero-sub {
  margin: 0 0 40px;
  max-width: 33ch;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  line-height: 1.55;
  color: var(--text-dim);
}

.cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 28px;
}

/* ═══ Секция «Раньше / Сейчас» ═══ */
.shift {
  padding-block: clamp(96px, 14vh, 160px);
  border-top: 1px solid var(--line);
}
.shift h2 {
  margin: 0 0 16px;
  max-width: 22ch;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.shift-lead {
  margin: 0 0 clamp(48px, 8vh, 80px);
  max-width: 52ch;
  color: var(--text-dim);
}

.shift-rows {
  display: grid;
  gap: clamp(36px, 6vh, 56px);
}
.shift-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.25fr);
  align-items: center;
  gap: 20px;
}
.was {
  font-size: clamp(1.15rem, 2.6vw, 1.65rem);
  font-weight: 500;
  color: var(--text-faint);
}
.was s {
  position: relative;
  text-decoration: none;
}
/* Старый способ вычеркнут терракотовой линией */
.was s::after {
  content: '';
  position: absolute;
  left: -0.1em;
  right: -0.1em;
  top: 54%;
  height: 2px;
  background: var(--accent);
}

.shift-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.now {
  font-size: clamp(1.75rem, 4.4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

@media (max-width: 719px) {
  .shift-row {
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: start;
  }
  .shift-arrow svg { transform: rotate(90deg); }

  /* На узких экранах круг авроры почти целиком уходит за край: возвращаем свечение в кадр */
  .hero-aura::before {
    right: -55%;
    bottom: -18%;
    width: 150vw;
    height: 150vw;
  }
}

/* ═══ Финал ═══ */
.finale {
  position: relative;
  padding-block: clamp(120px, 20vh, 200px);
  text-align: center;
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.finale::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -60%;
  width: 130vw;
  height: 100%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center bottom,
    rgba(217, 119, 87, 0.30) 0%,
    rgba(217, 119, 87, 0.08) 45%,
    transparent 72%);
  pointer-events: none;
}
.finale .wrap { position: relative; }
.finale h2 {
  margin: 0 auto 40px;
  max-width: 16ch;
  font-size: clamp(2.2rem, 6.5vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

/* ═══ Футер ═══ */
.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 32px;
}
.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 32px;
}
.rufp-logo-small { font-size: 16px; color: var(--text-dim); }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.foot-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.25s var(--ease-out);
}
.foot-links a:hover { color: var(--text); }
.foot-copy {
  color: var(--text-faint);
  font-size: 0.9rem;
}

/* ═══ 404 ═══ */
.err {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 120px 64px;
  overflow: hidden;
  text-align: center;
}
.err .wrap { width: 100%; }
.err-aura {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.err-aura::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 60%;
  width: 100vw;
  height: 80vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(217, 119, 87, 0.16) 0%,
    transparent 65%);
}
.err-code {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(5rem, 24vw, 12rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.err-code .br { color: var(--accent); }
.err h1 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.err-sub {
  margin: 0 auto 36px;
  max-width: 40ch;
  color: var(--text-dim);
}
.err .cta-row { justify-content: center; }

/* ═══ Reduced motion ═══ */
@media (prefers-reduced-motion: reduce) {
  .btn, .link-arrow, .link-arrow svg { transition: none; }
  .btn-primary:hover, .btn-primary:active { transform: none; }
  .link-arrow:hover svg { transform: none; }
}
