/* Файл: main/static/main/style.css
   Назначение: стили лендинга NEVRA. */

:root {
  --accent: #CD0074;
  --accent-2: #ff43aa;
  --accent-soft: rgba(205, 0, 116, .18);
  --gold: #dfc28e;

  --bg: #070609;
  --bg-2: #0d0a0f;
  --panel: rgba(18, 13, 20, .76);
  --panel-2: rgba(24, 15, 26, .86);

  --text: #f9eff6;
  --muted: #ae9eaa;

  --line: rgba(255, 255, 255, .09);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --radius: 24px;

  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 75% 15%, rgba(205, 0, 116, .11), transparent 25%),
    radial-gradient(circle at 15% 60%, rgba(205, 0, 116, .06), transparent 28%),
    linear-gradient(180deg, #060508 0%, #0b080d 50%, #060508 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(205, 0, 116, .12), transparent 68%);
  filter: blur(40px);
  top: 4vh;
  right: -100px;
  pointer-events: none;
  z-index: -1;
  animation: ambientFloat 14s ease-in-out infinite;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
img { display: block; max-width: 100%; height: auto; }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* --- Анимация появления при скролле --- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.22, 1, .36, 1), transform .9s cubic-bezier(.22, 1, .36, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* --- Навигация --- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(6, 5, 8, .66);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  transition: background .3s, border-color .3s;
}
.nav.is-scrolled { background: rgba(6, 5, 8, .88); border-color: rgba(205, 0, 116, .18); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; letter-spacing: .12em; font-size: 13px; font-weight: 800; }
.brand-mark {
  width: 38px; height: 38px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(205, 0, 116, .28), rgba(255, 255, 255, .03));
  box-shadow: inset 0 0 24px rgba(205, 0, 116, .14), 0 0 24px rgba(205, 0, 116, .1);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
}
.brand-mark img { width: 70%; height: 70%; object-fit: contain; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }

.nav-links { display: flex; gap: 28px; color: var(--muted); font-size: 13px; }
.nav-links a { position: relative; padding: 4px 0; transition: color .2s; }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .3s cubic-bezier(.22, 1, .36, 1);
}
.nav-links a:hover { color: white; }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  padding: 12px 17px;
  border: 1px solid rgba(205, 0, 116, .5);
  border-radius: 999px;
  background: rgba(205, 0, 116, .1);
  font-size: 13px; font-weight: 700;
  transition: .25s cubic-bezier(.22, 1, .36, 1);
  position: relative; overflow: hidden;
}
.nav-cta::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .18), transparent 70%);
  transform: translateX(-100%);
  transition: transform .8s cubic-bezier(.22, 1, .36, 1);
}
.nav-cta:hover { background: var(--accent); box-shadow: 0 0 28px rgba(205, 0, 116, .35); transform: translateY(-1px); }
.nav-cta:hover::before { transform: translateX(100%); }

.nav-right { display: flex; align-items: center; gap: 10px; }

/* Кнопка мобильного меню (видна только на узких экранах) */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
  cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: .25s;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .2s;
}
.nav-toggle:hover { border-color: rgba(205, 0, 116, .42); background: rgba(205, 0, 116, .08); }
.nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- Hero --- */
.hero { padding: 150px 0 95px; min-height: 760px; position: relative; display: grid; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 1.03fr .97fr; gap: 70px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: #f8b8dd; font-size: 11px;
  text-transform: uppercase; letter-spacing: .2em;
  margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 38px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }

h1 {
  font-size: clamp(54px, 7vw, 100px);
  line-height: .91;
  letter-spacing: -.055em;
  max-width: 760px;
  font-weight: 820;
}
.hero h1 span { color: var(--accent-2); text-shadow: 0 0 35px rgba(205, 0, 116, .3); position: relative; }
.hero h1 .flicker { animation: textFlicker 6s ease-in-out infinite; }

.hero-copy { margin-top: 26px; color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 600px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 14px; padding: 14px 19px;
  font-weight: 700; font-size: 13px;
  transition: .25s cubic-bezier(.22, 1, .36, 1);
  cursor: pointer; border: none;
  position: relative; overflow: hidden;
}
.btn-primary { background: var(--accent); color: white; box-shadow: 0 12px 34px rgba(205, 0, 116, .24); }
.btn-primary::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .25), transparent 70%);
  transform: translateX(-100%);
  transition: transform .7s;
}
.btn-primary:hover { transform: translateY(-2px); background: #df0a82; box-shadow: 0 15px 42px rgba(205, 0, 116, .32); }
.btn-primary:hover::before { transform: translateX(100%); }
.btn-ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, .025); color: #e6dae1; }
.btn-ghost:hover { border-color: rgba(205, 0, 116, .42); background: rgba(205, 0, 116, .08); transform: translateY(-2px); }

/* --- Портал --- */
.portal-wrap { min-height: 530px; display: grid; place-items: center; position: relative; }

.portal {
  width: min(420px, 88vw);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle, rgba(17, 12, 19, .98) 39%, rgba(205, 0, 116, .08) 40%, rgba(205, 0, 116, .02) 55%, transparent 65%);
  border: 1px solid rgba(205, 0, 116, .34);
  box-shadow: 0 0 65px rgba(205, 0, 116, .15), inset 0 0 70px rgba(205, 0, 116, .13);
  animation: drift 7s ease-in-out infinite;
  overflow: visible;
}
/* Логотип N в центре портала — по размеру внутреннего пунктирного кольца */
.portal-art {
  position: absolute;
  left: 27%; top: 27%;
  width: 46%; height: 46%;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 0 26px rgba(205, 0, 116, .45));
  transition: opacity 1.2s;
  pointer-events: none;
  z-index: 1;
}
.portal.has-art .portal-art { opacity: 1; animation: logoGlow 6s ease-in-out infinite; }
.portal.has-art::before, .portal.has-art::after { opacity: .35; }

.portal::before, .portal::after {
  content: "";
  position: absolute; inset: 10%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 0 50px rgba(205, 0, 116, .09);
  transition: opacity .8s;
}
.portal::after {
  inset: 19%;
  border: 1px dashed rgba(205, 0, 116, .28);
  animation: rotate 24s linear infinite;
}

.portal-runes { position: absolute; inset: -20px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .055); }
.portal-runes .rune-icon { position: absolute; width: 24px; height: 24px; animation: runePulse 4s ease-in-out infinite; }
.portal-runes .rune-icon img { width: 100%; height: 100%; object-fit: contain; opacity: .85; }
.portal-runes .rune-icon:nth-child(1) { top: -12px; left: calc(50% - 12px); animation-delay: 0s; }
.portal-runes .rune-icon:nth-child(2) { right: -12px; top: calc(50% - 12px); animation-delay: 1s; }
.portal-runes .rune-icon:nth-child(3) { bottom: -12px; left: calc(50% - 12px); animation-delay: 2s; }
.portal-runes .rune-icon:nth-child(4) { left: -12px; top: calc(50% - 12px); animation-delay: 3s; }

.door {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 43%; height: 61%;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 15px 15px 7px 7px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(205, 0, 116, .04));
  box-shadow: inset 0 0 30px rgba(205, 0, 116, .06), 0 20px 50px rgba(0, 0, 0, .35);
  transition: opacity .6s;
}
.portal.has-art .door { opacity: 0; }
.door::before { content: ""; position: absolute; inset: 16px; border: 1px solid rgba(205, 0, 116, .38); border-radius: 9px; }
.door::after {
  content: "";
  position: absolute; left: 50%; top: 48%;
  width: 34px; height: 34px;
  transform: translate(-50%, -50%);
  background-image: url('images/sigil-star.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: sigilPulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(205, 0, 116, .6));
}

.office-label {
  position: absolute; left: 50%; bottom: 16%;
  transform: translateX(-50%);
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .11);
  background: rgba(5, 4, 6, .74);
  border-radius: 7px;
  font-size: 9px; letter-spacing: .26em; color: #ccb8c4;
  white-space: nowrap;
  z-index: 2;
}
.portal.has-art .office-label { bottom: 11%; }

.floating-card {
  position: absolute;
  backdrop-filter: blur(13px);
  background: rgba(15, 10, 17, .72);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 11px; color: #d7c7d1;
  animation: floatCard 6s ease-in-out infinite;
  z-index: 3;
}
.card-a { top: 8%; right: 1%; --r: 4deg; }
.card-b { bottom: 8%; left: 4%; --r: -5deg; animation-delay: 3s; }

.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #9ff0c0;
  box-shadow: 0 0 12px #9ff0c0;
  margin-right: 7px;
  animation: dotPulse 2s ease-in-out infinite;
}

/* --- Печать (свободный нижний правый угол сцены портала) --- */
.seal {
  position: absolute;
  width: 116px; height: 116px;
  border: 1px solid rgba(205, 0, 116, .22);
  border-radius: 50%;
  right: 0; bottom: 4%;
  display: grid; place-items: center;
  background: radial-gradient(circle, rgba(13, 10, 15, .85) 55%, transparent 72%);
  transform: rotate(-14deg);
  opacity: .8;
  z-index: 2;
}
.seal img { width: 84%; height: 84%; object-fit: contain; }

/* --- Секции --- */
section { padding: 95px 0; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 34px; }
.section-kicker { color: #ea8fc1; text-transform: uppercase; letter-spacing: .18em; font-size: 10px; margin-bottom: 10px; }
h2 { font-size: clamp(30px, 4vw, 51px); line-height: 1; letter-spacing: -.035em; }
.section-note { max-width: 430px; color: var(--muted); line-height: 1.65; font-size: 14px; }

/* --- Таланты --- */
.agents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.agent {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(205, 0, 116, .035));
  min-height: 420px;
  transition: .35s cubic-bezier(.22, 1, .36, 1);
}
.agent:hover {
  transform: translateY(-4px);
  border-color: rgba(205, 0, 116, .33);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28), 0 0 30px rgba(205, 0, 116, .07);
}
.agent-art {
  height: 245px;
  position: relative;
  background:
    radial-gradient(circle at 50% 40%, rgba(205, 0, 116, .21), transparent 36%),
    linear-gradient(180deg, #171017 0%, #0c090d 100%);
  overflow: hidden;
}
.agent-art::before {
  content: "";
  position: absolute;
  width: 155px; height: 155px;
  border-radius: 50%;
  border: 1px solid rgba(205, 0, 116, .34);
  top: 28px; left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 35px rgba(205, 0, 116, .18);
  transition: .5s;
}
.agent-portrait {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0;
  transition: opacity .7s, transform .8s cubic-bezier(.22, 1, .36, 1);
}
.agent.has-portrait .agent-portrait { opacity: 1; }
.agent:hover .agent-portrait { transform: scale(1.05); }

.sigil {
  position: absolute; top: 69px; left: 50%;
  transform: translateX(-50%);
  width: 70px; height: 70px;
  transition: opacity .5s;
}
.sigil img { width: 100%; height: 100%; object-fit: contain; opacity: .85; filter: drop-shadow(0 0 18px rgba(205, 0, 116, .4)); }
.agent.has-portrait .sigil { opacity: 0; }

.agent-info { padding: 20px; }
.agent-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.agent-name { font-size: 20px; font-weight: 780; }
.agent-role { color: var(--accent-2); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
.agent-desc { color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 10px; }
.agent-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 15px; }

.tag {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px; color: #cdbfc8;
  transition: .25s;
}
.agent:hover .tag { border-color: rgba(205, 0, 116, .3); color: #f0c5dd; }

.empty-note { color: var(--muted); font-size: 13px; }

/* --- Услуги --- */
.division { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: .35s;
}
.panel:hover { border-color: rgba(205, 0, 116, .22); }
.panel h3 { font-size: 20px; margin-bottom: 10px; }
.panel p { color: var(--muted); line-height: 1.65; font-size: 13px; }

.service-list { margin-top: 20px; display: grid; gap: 10px; }
.service {
  display: flex; gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .018);
  transition: .3s;
}
.service:hover { border-color: rgba(205, 0, 116, .3); background: rgba(205, 0, 116, .05); transform: translateX(4px); }
.service-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(205, 0, 116, .11);
  border: 1px solid rgba(205, 0, 116, .2);
  flex: 0 0 auto;
}
/* Контуры сигилов тонкие (1-2px на 128px): на малом размере утолщаем их свечением */
.service-icon img,
.portal-runes .rune-icon img {
  filter:
    drop-shadow(0 0 .5px var(--accent-2))
    drop-shadow(0 0 .5px var(--accent-2))
    drop-shadow(0 0 4px rgba(205, 0, 116, .55));
}
.service-icon img { width: 72%; height: 72%; object-fit: contain; }
.service strong { font-size: 12px; }
.service small { display: block; color: var(--muted); margin-top: 3px; line-height: 1.45; }

/* --- Манифест --- */
.manifesto {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.manifesto::before {
  content: "";
  position: absolute;
  width: 450px; height: 450px;
  border-radius: 50%;
  left: -170px; top: -210px;
  background: radial-gradient(circle, rgba(205, 0, 116, .15), transparent 70%);
  animation: ambientFloat 18s ease-in-out infinite;
}
.manifesto-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; align-items: center; }
.quote { font-size: clamp(26px, 3vw, 42px); line-height: 1.15; letter-spacing: -.03em; }
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.principle {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .018);
  border-radius: 17px;
  transition: .3s;
}
.principle:hover { border-color: rgba(205, 0, 116, .3); background: rgba(205, 0, 116, .04); }
.principle b {
  display: block;
  font-size: 11px; color: #f4c9df;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.principle span { display: block; color: var(--muted); font-size: 12px; line-height: 1.55; }

/* --- Набор --- */
.recruit { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.recruit-main {
  border: 1px solid rgba(205, 0, 116, .27);
  background: linear-gradient(145deg, rgba(205, 0, 116, .1), rgba(20, 11, 20, .72));
  border-radius: 26px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.recruit-main::before {
  content: "";
  position: absolute; inset: -50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(205, 0, 116, .08) 15%, transparent 30%);
  animation: conicSpin 12s linear infinite;
  pointer-events: none;
}
.recruit-main > * { position: relative; }
.recruit-main h3 { font-size: 34px; line-height: 1.05; max-width: 600px; }
.recruit-main p { color: #cbbcc5; line-height: 1.7; max-width: 640px; margin-top: 14px; }

.paper {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 27px 27px 120px;
  /* Фактура бумаги: тонкие линии и тёплый отлив вместо отдельной картинки */
  background:
    radial-gradient(circle at 85% 85%, rgba(205, 0, 116, .08), transparent 40%),
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(255, 255, 255, .025) 27px 28px),
    linear-gradient(160deg, rgba(247, 231, 240, .055), rgba(247, 231, 240, .02));
  position: relative;
  overflow: hidden;
  transform: rotate(1.2deg);
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
}
.paper:hover { transform: rotate(0deg) scale(1.01); }
.paper::after {
  content: "CLASSIFIED";
  position: absolute; right: 18px; top: 17px;
  color: rgba(255, 255, 255, .13);
  font-size: 9px; letter-spacing: .18em;
}
.paper h3 { font-family: Georgia, serif; font-size: 24px; margin-bottom: 10px; }
.paper p { color: #bdadb7; line-height: 1.6; font-size: 12px; }
.paper ul { list-style: none; margin-top: 18px; display: grid; gap: 8px; }
.paper li { font-size: 12px; color: #d7cad1; padding-left: 20px; position: relative; }
.paper li::before {
  content: "";
  position: absolute; left: 0; top: 2px;
  width: 12px; height: 12px;
  background-image: url('images/sigil-star.png');
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 .5px var(--accent-2)) drop-shadow(0 0 .5px var(--accent-2));
}

/* Штамп на листе допуска */
.paper-stamp {
  position: absolute;
  right: 22px; bottom: 16px;
  width: 104px;
  display: grid; justify-items: center; gap: 2px;
  transform: rotate(-14deg);
  opacity: .78;
  pointer-events: none;
}
.paper-stamp img { width: 92px; height: 92px; object-fit: contain; }
.paper-stamp span {
  font-size: 8px; letter-spacing: .26em;
  color: var(--accent-2);
  padding: 3px 7px;
  border: 1px solid rgba(205, 0, 116, .45);
  border-radius: 4px;
}

/* --- Контакты --- */
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; }
.contact-copy {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  background: var(--panel);
}
.contact-copy p { margin-top: 14px; color: var(--muted); line-height: 1.65; font-size: 14px; }

.contact-form { display: grid; gap: 12px; }
.field {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .026);
  color: var(--text);
  border-radius: 13px;
  padding: 14px 15px;
  outline: none;
  transition: .25s;
}
.field:focus { border-color: rgba(205, 0, 116, .53); box-shadow: 0 0 0 4px rgba(205, 0, 116, .08); }
textarea.field { min-height: 138px; resize: vertical; }

.form-errors,
.field-error { color: #ff8ec8; font-size: 12px; line-height: 1.45; }
.form-errors {
  padding: 12px 15px;
  border: 1px solid rgba(205, 0, 116, .45);
  background: rgba(205, 0, 116, .08);
  border-radius: 13px;
}
.field-error { margin-top: -6px; padding-left: 4px; }

.flash-messages {
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(205, 0, 116, .4);
  background: rgba(205, 0, 116, .08);
  border-radius: 13px;
  color: #f0c5dd;
  font-size: 13px;
}

/* --- Подвал --- */
footer { padding: 30px 0 55px; color: #81737d; font-size: 11px; }
.footer-line {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}

/* --- Анимации --- */
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-6px) rotate(var(--r, 0deg)); }
}
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes runePulse { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
@keyframes sigilPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
}
@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 0 22px rgba(205, 0, 116, .38)); }
  50% { filter: drop-shadow(0 0 38px rgba(205, 0, 116, .62)); }
}
@keyframes ambientFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 30px); }
}
@keyframes conicSpin { to { transform: rotate(360deg); } }
@keyframes textFlicker {
  0%, 92%, 100% { opacity: 1; }
  93%, 95% { opacity: .65; }
  94% { opacity: .9; }
}

/* --- Адаптив --- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    padding: 8px 20px 18px;
    /* Сплошной фон: внутри шапки с backdrop-filter полупрозрачный фон просвечивает */
    background: #0a070c;
    box-shadow: 0 24px 40px rgba(0, 0, 0, .45);
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a::after { display: none; }
  .nav.is-open .nav-links { display: flex; }
  .hero-grid, .manifesto-inner, .recruit, .contact, .division { grid-template-columns: 1fr; }
  .agents { grid-template-columns: 1fr 1fr; }
  .hero { min-height: auto; padding-top: 125px; }
  .portal-wrap { min-height: 420px; }
  .seal { width: 96px; height: 96px; right: 4%; }
}

@media (max-width: 610px) {
  .container { width: min(100% - 26px, 1180px); }
  .agents { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-note { margin-top: 13px; }
  .principles { grid-template-columns: 1fr; }
  h1 { font-size: 60px; }
  section { padding: 75px 0; }
  .floating-card { font-size: 10px; padding: 9px 11px; }
  .card-a { right: -4%; }
  .card-b { left: -4%; }
  .nav-cta { display: none; }
  .seal { width: 80px; height: 80px; right: 0; bottom: 0; }
  .paper { transform: none; }
  .recruit-main h3 { font-size: 27px; }
}