/* ===== Профсоюз Андреев — флюид-дизайн ===== */
:root {
  --turq-100: #99f6e4;
  --turq-200: #5eead4;
  --turq-300: #2dd4bf;
  --turq-400: #14b8a6;
  --turq-500: #0d9488;
  --ink-900: #04120f;
  --ink-800: #08201c;
  --ink-700: #0c2b26;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(94, 234, 212, 0.16);
  --text: #e7fbf6;
  --text-dim: #a6c6be;
  --radius: clamp(16px, 2vw, 24px);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(120% 120% at 50% 0%, #06231e 0%, var(--ink-900) 55%);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand__text strong { font-family: "Unbounded", "Manrope", sans-serif; line-height: 1.05; }

/* Перенос длинных слов, чтобы текст не вылезал за границы (важно для длинных
   русских слов в узких карточках). Только для блочного текста — навигацию и
   бренд не трогаем, чтобы они не ломались посимвольно. */
h1, h2, h3, h4, h5, h6, p, li, dt, dd, blockquote {
  overflow-wrap: break-word;
}

/* Позволяем flex/grid-элементам с текстом сжиматься уже контента, иначе длинные
   слова расширяют колонку и не переносятся */
.cards > *, .org__grid > *, .org__lead, .org__lead > div, .footer__inner > * {
  min-width: 0;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ===== Фоновые флюид-пятна ===== */
.fluid-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; filter: blur(70px); }
.blob { position: absolute; border-radius: 50%; opacity: 0.5; mix-blend-mode: screen; }
.blob--1 { width: 46vw; height: 46vw; left: -8vw; top: -10vw; background: radial-gradient(circle, var(--turq-400), transparent 70%); animation: drift 22s ease-in-out infinite; }
.blob--2 { width: 40vw; height: 40vw; right: -10vw; top: 18vh; background: radial-gradient(circle, #0ea5a5, transparent 70%); animation: drift 28s ease-in-out infinite reverse; }
.blob--3 { width: 38vw; height: 38vw; left: 20vw; bottom: -14vw; background: radial-gradient(circle, #115e59, transparent 70%); animation: drift 32s ease-in-out infinite; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(6vw, 4vh) scale(1.1); }
  66% { transform: translate(-5vw, -3vh) scale(0.95); }
}

/* ===== Контейнеры ===== */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.container--narrow { max-width: 720px; }

/* ===== Шапка ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(0.7rem, 1.6vw, 1rem) clamp(1rem, 4vw, 2.5rem);
  background: rgba(4, 18, 15, 0.6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand__mark { width: clamp(34px, 5vw, 44px); height: auto; }
.brand__text { display: flex; flex-direction: column; }
.brand__text strong { font-size: clamp(0.95rem, 2vw, 1.1rem); letter-spacing: 0.3px; }
.brand__text small { font-size: 0.66rem; letter-spacing: 1.5px; color: var(--turq-200); text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: clamp(0.5rem, 2vw, 1.7rem); }
.nav a { font-weight: 500; font-size: 0.95rem; color: var(--text-dim); transition: color 0.2s; }
.nav a:hover { color: var(--turq-200); }
.nav__cta {
  padding: 0.55rem 1.1rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--turq-300), var(--turq-500));
  color: var(--ink-900) !important; font-weight: 700;
}
.nav__cta:hover { filter: brightness(1.08); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { width: 26px; height: 2px; background: var(--turq-200); border-radius: 2px; transition: 0.3s; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.6rem; border-radius: 999px; font-weight: 700;
  font-size: clamp(0.9rem, 1.5vw, 1rem); transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  will-change: transform;
}
.btn--primary { background: linear-gradient(135deg, var(--turq-200), var(--turq-400)); color: var(--ink-900); box-shadow: 0 12px 30px -10px rgba(45, 212, 191, 0.6); }
.btn--primary:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn--ghost { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: var(--turq-300); transform: translateY(-2px); }

/* ===== Общие секции ===== */
.section { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 3px; font-size: 0.75rem; font-weight: 700; color: var(--turq-300); margin-bottom: 0.6rem; }
.section__title { font-size: clamp(1.8rem, 5.5vw, 3.2rem); margin-bottom: 0.6rem; }
.section__sub { color: var(--text-dim); font-size: clamp(1rem, 2vw, 1.15rem); max-width: 60ch; margin-bottom: 2.5rem; }

/* ===== HERO ===== */
.hero { text-align: center; padding: clamp(3rem, 8vw, 6rem) 1.25rem clamp(3rem, 7vw, 5rem); }
.hero__inner { width: min(100%, 860px); margin-inline: auto; }
.hero__emblem { width: clamp(96px, 16vw, 150px); margin: 0 auto 1.4rem; filter: drop-shadow(0 16px 30px rgba(20, 184, 166, 0.35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-10px);} }
.hero__title { font-size: clamp(2.6rem, 11vw, 6rem); letter-spacing: -1px; background: linear-gradient(180deg, #fff, var(--turq-200)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { margin: 1.3rem auto 2rem; max-width: 54ch; font-size: clamp(1.05rem, 2.4vw, 1.35rem); color: var(--text-dim); }
.hero__lead strong { color: var(--turq-100); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.hero__actions--center { margin-top: 1.8rem; }

.hero__stats { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1.5rem, 6vw, 4rem); margin-top: clamp(2.5rem, 6vw, 4rem); }
.hero__stats dt { font-family: "Unbounded", sans-serif; font-size: clamp(2rem, 6vw, 3rem); color: var(--turq-200); }
.hero__stats dd { color: var(--text-dim); font-size: 0.85rem; max-width: 16ch; margin-top: 0.2rem; }

/* ===== Обращение ===== */
.manifest {
  margin-top: 2rem; padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.manifest p { margin-bottom: 1.1rem; color: var(--text-dim); font-size: clamp(1rem, 2vw, 1.12rem); }
.manifest__hail { font-family: "Unbounded", sans-serif; color: var(--turq-200) !important; font-size: 1.25rem !important; }
.manifest blockquote {
  margin: 1.6rem 0; padding: 1rem 1.4rem; font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  border-left: 4px solid var(--turq-300); color: var(--text); font-style: italic;
  background: linear-gradient(90deg, rgba(45,212,191,0.08), transparent);
  border-radius: 0 12px 12px 0;
}
.manifest__sign { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 1.6rem; }
.manifest__sign span:first-child { color: var(--turq-100); font-weight: 700; font-size: 1.1rem; }
.manifest__sign span:last-child { color: var(--text-dim); font-size: 0.9rem; }

/* ===== Карточки программы ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: clamp(1rem, 2.5vw, 1.5rem); }
.card {
  position: relative; padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.3s, border-color 0.3s, background 0.3s;
}
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0%, rgba(45,212,191,0.14), transparent 60%); opacity: 0; transition: opacity 0.3s; }
.card:hover { transform: translateY(-6px); border-color: var(--turq-300); background: var(--surface-strong); }
.card:hover::before { opacity: 1; }
.card__num { font-family: "Unbounded", sans-serif; font-size: 1rem; color: var(--turq-300); letter-spacing: 2px; }
.card h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); margin: 0.7rem 0 0.6rem; }
.card p { color: var(--text-dim); font-size: 0.98rem; }
.swatch { display: inline-block; width: 40px; height: 40px; border-radius: 10px; margin-top: 1rem; background: linear-gradient(135deg, var(--turq-200), var(--turq-500)); box-shadow: 0 8px 20px -6px var(--turq-400); }

/* ===== Состав организации ===== */
.org { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); }
.org__lead {
  display: flex; gap: clamp(1rem, 3vw, 1.8rem); align-items: center;
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  background: linear-gradient(135deg, rgba(45,212,191,0.12), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
}
.org__avatar {
  flex: none; width: clamp(64px, 12vw, 96px); height: clamp(64px, 12vw, 96px);
  display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, var(--turq-200), var(--turq-500)); color: var(--ink-900);
  font-family: "Unbounded", sans-serif; font-size: clamp(1.3rem, 4vw, 2rem); font-weight: 800;
}
.org__role { text-transform: uppercase; letter-spacing: 2px; font-size: 0.72rem; color: var(--turq-300); font-weight: 700; }
.org__name { font-size: clamp(1.3rem, 3.5vw, 1.9rem); margin: 0.2rem 0; }
.org__meta { color: var(--turq-100); font-size: 0.9rem; margin-bottom: 0.5rem; }
.org__desc { color: var(--text-dim); }
.org__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(1rem, 2.5vw, 1.5rem); }
.org__member { padding: clamp(1.2rem, 3vw, 1.6rem); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform 0.3s, border-color 0.3s; }
.org__member:hover { transform: translateY(-4px); border-color: var(--turq-300); }
.org__member h4 { font-size: 1.1rem; margin-bottom: 0.4rem; color: var(--turq-100); }
.org__member p { color: var(--text-dim); font-size: 0.95rem; }

/* ===== Таймлайн ===== */
.timeline { list-style: none; position: relative; margin-left: 0.5rem; padding-left: 2rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--turq-300), transparent); }
.timeline li { position: relative; padding: 0 0 2rem 0.5rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: -1.75rem; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--turq-200); box-shadow: 0 0 0 5px rgba(45,212,191,0.18); }
.timeline h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); margin-bottom: 0.3rem; }
.timeline p { color: var(--text-dim); }
.timeline__date { display: inline-block; font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; color: var(--turq-300); font-weight: 700; margin-bottom: 0.25rem; }

/* Состояние загрузки */
.boot { text-align: center; padding: clamp(4rem, 20vh, 10rem) 1rem; color: var(--text-dim); font-size: 1.1rem; }
.boot--error { color: #fca5a5; }

/* Фото в составе */
.org__avatar--photo { padding: 0; overflow: hidden; }
.org__avatar--photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.org__member-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin-bottom: 0.9rem; border: 1px solid var(--border); }

/* Модальная форма заявки */
body.no-scroll { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(2, 10, 8, 0.72); backdrop-filter: blur(6px); animation: fade 0.25s ease; }
.modal__dialog {
  position: relative; width: min(100%, 520px); max-height: 90vh; overflow: hidden;
  background: linear-gradient(160deg, #0b2b25, #061a16);
  border: 1px solid var(--border); border-radius: 22px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.85); animation: pop 0.28s ease;
}
.modal__scroll { max-height: 90vh; overflow-y: auto; padding: clamp(1.5rem, 4vw, 2.4rem); }
.modal__close { position: absolute; top: 0.8rem; right: 0.8rem; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: rgba(0,0,0,0.3); color: var(--text); font-size: 1rem; cursor: pointer; transition: border-color 0.2s; }
.modal__close:hover { border-color: var(--turq-300); }
.modal__dialog h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); margin-bottom: 0.5rem; }
.modal__intro { color: var(--text-dim); margin-bottom: 1.5rem; }

.apply-form { display: flex; flex-direction: column; gap: 1rem; }
.fld { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.85rem; color: var(--text-dim); }
.fld .req { color: var(--turq-300); }
.apply-form input, .apply-form textarea, .apply-form select {
  width: 100%; padding: 0.75rem 0.9rem; border-radius: 12px; font-family: inherit; font-size: 0.98rem;
  background: rgba(0,0,0,0.28); border: 1px solid var(--border); color: var(--text);
}
.apply-form textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.apply-form select { appearance: none; }
.apply-form input:focus, .apply-form textarea:focus, .apply-form select:focus { outline: none; border-color: var(--turq-300); box-shadow: 0 0 0 3px rgba(45,212,191,0.15); }
.apply-submit { margin-top: 0.5rem; width: 100%; }
.apply-error { color: #fca5a5; font-size: 0.9rem; }
.apply-success { text-align: center; padding: 2rem 0.5rem; font-size: 1.15rem; color: var(--turq-100); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ===== Вступить ===== */
.section--join { text-align: center; }
.section--join .section__sub { margin-inline: auto; }

/* ===== Футер ===== */
.footer { border-top: 1px solid var(--border); padding: clamp(2rem, 5vw, 3rem) 0; background: rgba(4, 18, 15, 0.5); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.brand--sm .brand__mark { width: 36px; }
.footer__note { color: var(--text-dim); font-size: 0.85rem; }

/* ===== Reveal-анимации ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.cards .reveal:nth-child(2) { transition-delay: 0.08s; }
.cards .reveal:nth-child(3) { transition-delay: 0.16s; }
.cards .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ===== Мобильное меню ===== */
@media (max-width: 820px) {
  .burger { display: flex; }
  .nav {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 1rem clamp(1rem, 5vw, 2rem) 2rem;
    background: rgba(4, 18, 15, 0.96); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: transform 0.35s ease;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 0.9rem 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 1.05rem; }
  .nav__cta { text-align: center; margin-top: 0.8rem; }
  .burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger.is-open span:nth-child(2) { opacity: 0; }
  .burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .org__lead { flex-direction: column; text-align: center; }
}

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