/* ============================================================
   raja-yoga.org — единая таблица стилей. Без внешних зависимостей.
   Структура:
   1. Токены и база
   2. Утилиты и доступность
   3. Кнопки, чипы
   4. Шапка и навигация
   5. Hero
   6. Секции
   7. Карточки статей
   8. Цитата, разделы, CTA
   9. Страница статьи (проза)
   10. Каталог и фильтры
   11. Вход и кабинет
   12. 404
   13. Подвал
   14. Анимации и адаптив
   ============================================================ */

/* ---------- 1. Токены и база ---------- */
:root {
  color-scheme: light;
  --bg: #faf6ef;
  --bg-soft: #f3ecdf;
  --surface: #fffdf8;
  --ink: #26221b;
  --ink-soft: #5b5449;
  --ink-faint: #6e675a;
  --accent: #b4552d;
  --accent-deep: #8c3f1e;
  --accent-hover: #753115;
  --accent-active: #62280d;
  --accent-soft: #f4e3d8;
  --gold: #b98a2f;
  --line: #e8dfcd;
  --line-strong: #d9cdb4;
  --dark: #26221b;
  --cream: #f3ede1;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgb(38 34 27 / .05), 0 10px 30px -14px rgb(38 34 27 / .16);
  --shadow-card-hover: 0 2px 4px rgb(38 34 27 / .07), 0 18px 44px -16px rgb(38 34 27 / .26);
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "PT Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: rgb(180 85 45 / .18);
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

p {
  margin: 0;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  touch-action: manipulation;
}

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

.container {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 36px);
}

/* ---------- 2. Утилиты и доступность ---------- */
:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.site-footer :focus-visible {
  outline-color: var(--cream);
}

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

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  transform: none;
}

.overline {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.overline-light {
  color: #ecbd99;
}

section[id],
h1[id], h2[id], h3[id] {
  scroll-margin-top: 96px;
}

/* ---------- 3. Кнопки, чипы ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.btn-primary {
  background: var(--accent-deep);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:active {
  background: var(--accent-active);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink-faint);
  background: var(--surface);
}

.btn-light {
  background: var(--cream);
  color: var(--ink);
}

.btn-light:hover {
  background: #fff;
}

.btn-outline-light {
  border-color: rgb(255 253 248 / .55);
  color: #fff;
}

.btn-outline-light:hover {
  border-color: #fff;
  background: rgb(255 253 248 / .12);
}

.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid rgb(180 85 45 / .18);
  border-radius: 999px;
  background: rgb(180 85 45 / .08);
  color: var(--accent-deep);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease;
}

.chip:hover {
  background: rgb(180 85 45 / .16);
  border-color: rgb(180 85 45 / .3);
}

/* ---------- 4. Шапка и навигация ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(250 246 239 / .88);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}

.site-header[data-scrolled] {
  box-shadow: 0 6px 24px -12px rgb(38 34 27 / .18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.brand-mark {
  color: var(--accent-deep);
  flex-shrink: 0;
  transition: transform .5s ease;
}

.brand:hover .brand-mark {
  transform: rotate(45deg);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: rgb(38 34 27 / .05);
}

.nav-link.is-active {
  color: var(--accent-deep);
  background: rgb(180 85 45 / .1);
}

.nav-spacer {
  flex: 1;
}

.nav-auth {
  margin-left: 12px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle .icon-close {
  display: none;
}

.site-header[data-open] .icon-menu {
  display: none;
}

.site-header[data-open] .icon-close {
  display: block;
}

/* ---------- 5. Hero ---------- */
.hero {
  padding-top: 14px;
}

.hero-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(480px, 72vh, 700px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(24 18 12 / .78) 0%, rgb(24 18 12 / .4) 45%, rgb(24 18 12 / .1) 78%, rgb(24 18 12 / 0) 100%);
}

.hero-content {
  position: relative;
  max-width: 740px;
  padding: clamp(28px, 5vw, 56px);
  color: #fff;
}

.hero-title {
  margin: 12px 0 16px;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.08;
  letter-spacing: .01em;
}

.hero-lead {
  max-width: 56ch;
  margin-bottom: 28px;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: rgb(255 253 248 / .92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero :focus-visible,
.member-cta :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--cream);
}

/* ---------- 6. Секции ---------- */
.section {
  padding: clamp(56px, 8vw, 92px) 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-tight {
  padding: clamp(36px, 6vw, 64px) 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-title {
  margin-top: 8px;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.15;
}

.section-sub {
  max-width: 60ch;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 17px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-deep);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: color .15s ease;
}

.section-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.section-link svg {
  transition: transform .2s ease;
}

.section-link:hover svg {
  transform: translateX(3px);
}

/* ---------- 7. Карточки статей ---------- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card-hover);
}

.card-media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-soft);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.card:hover .card-media img {
  transform: scale(1.035);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 24px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.card-date {
  color: var(--ink-faint);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.card-title {
  font-size: 24px;
  line-height: 1.25;
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}

.card-title a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-title-lg {
  font-size: clamp(26px, 2.6vw, 32px);
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.6;
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
  color: var(--accent-deep);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
}

.card-more svg {
  transition: transform .2s ease;
}

.card-more:hover svg {
  transform: translateX(3px);
}

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 24px;
  align-items: start;
}

.featured-side {
  display: grid;
  gap: 20px;
}

.featured-side .card {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
}

.featured-side .card-media {
  aspect-ratio: auto;
  height: 100%;
  min-height: 100%;
}

.featured-side .card-body {
  gap: 6px;
  padding: 16px 18px;
}

.featured-side .card-title {
  font-size: 20px;
}

.featured-side .card-desc {
  -webkit-line-clamp: 2;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.cards-grid-3 .card-title {
  font-size: 22px;
}

/* ---------- 8. Принципы, цитата, разделы, CTA ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.principle {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.principle-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.principle h3 {
  margin-bottom: 8px;
  font-size: 23px;
}

.principle p {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.6;
}

.quote {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.quote-mark {
  margin-bottom: 18px;
  color: var(--gold);
}

.quote-text p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.3;
}

.quote-source {
  margin-top: 18px;
  color: var(--ink-faint);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
}

.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.cat-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.cat-count {
  color: var(--ink-faint);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.cat-arrow {
  position: absolute;
  top: 20px;
  right: 16px;
  color: var(--accent-deep);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
}

.cat-card:hover .cat-arrow {
  opacity: 1;
  transform: none;
}

.member-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 44px;
  padding: clamp(28px, 4vw, 44px);
  background: var(--accent-deep);
  border-radius: var(--radius-lg);
  color: #fff;
}

.member-cta-title {
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(26px, 3vw, 32px);
}

.member-cta-text p {
  max-width: 56ch;
  color: rgb(255 253 248 / .85);
  line-height: 1.6;
}

.member-cta .btn-light:hover {
  background: #fff;
}

/* ---------- 9. Страница статьи ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
  color: var(--ink-faint);
  font-size: 14.5px;
}

.breadcrumbs a {
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 6px;
}

.breadcrumbs a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumbs-sep {
  color: var(--line-strong);
}

.article {
  max-width: 900px;
}

.article-header {
  margin: 26px 0 40px;
}

.article-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.article-meta {
  color: var(--ink-faint);
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}

.article-title {
  max-width: 24ch;
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.12;
  letter-spacing: .01em;
  text-wrap: balance;
}

.article-lede {
  max-width: 62ch;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 18.5px;
  line-height: 1.6;
}

.article-hero {
  margin: 34px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17.5px;
  line-height: 1.75;
}

.prose p {
  margin: 0 0 1.15em;
}

.prose h2 {
  margin: 1.9em 0 .7em;
  font-size: 30px;
  line-height: 1.2;
  text-wrap: balance;
}

.prose h3 {
  margin: 1.6em 0 .6em;
  font-size: 25px;
}

.prose h4 {
  margin: 1.4em 0 .5em;
  font-size: 18px;
  font-family: var(--font-body);
  font-weight: 700;
}

.prose a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-color: rgb(140 63 30 / .4);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease, color .15s ease;
}

.prose a:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}

.prose strong {
  color: var(--ink);
}

.prose ul,
.prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: .45em;
}

.prose li::marker {
  color: var(--accent-deep);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 18px 26px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.prose blockquote p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
}

.prose figure {
  margin: 2em 0;
}

.prose figure img {
  display: block;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prose figcaption {
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 14.5px;
  text-align: center;
}

.prose hr {
  width: 60%;
  height: 1px;
  margin: 2.4em auto;
  border: 0;
  background: var(--line-strong);
}

/* ---------- 10. Каталог и фильтры ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.filter-chip:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}

.filter-chip.is-active {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

.filter-count {
  padding: 1px 9px;
  background: rgb(38 34 27 / .08);
  border-radius: 999px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.filter-chip.is-active .filter-count {
  background: rgb(255 255 255 / .22);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 64px 0;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- 11. Вход и кабинет ---------- */
.auth {
  padding-top: 24px;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-block: 16px 56px;
}

.auth-media {
  aspect-ratio: 3 / 4;
  max-height: 640px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
}

.auth-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  padding: clamp(28px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.auth-title {
  margin: 10px 0 8px;
  font-size: 40px;
}

.auth-sub {
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.6;
}

.form-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: #fbeae4;
  border: 1px solid #eccdbb;
  border-radius: var(--radius-sm);
  color: #7c2d12;
  font-size: 14.5px;
  line-height: 1.5;
}

.form-error svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.form {
  display: grid;
  gap: 18px;
}

/* Спиннер в кнопке входа: виден, пока сервер обрабатывает попытку */
.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin .8s linear infinite;
}

.btn.is-loading {
  opacity: .85;
  cursor: progress;
}

.btn.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Уменьшенная версия: вместо вращения — мягкая пульсация прозрачности */
  .btn-spinner {
    animation: btn-pulse 1.2s ease-in-out infinite alternate;
  }

  @keyframes btn-pulse {
    from {
      opacity: .35;
    }

    to {
      opacity: 1;
    }
  }
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-label {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}

.form-input {
  height: 48px;
  padding: 0 14px;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px; /* ≥16px — без зума на iOS */
  transition: border-color .15s ease, box-shadow .15s ease;
}

.form-input:hover {
  border-color: var(--ink-faint);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px rgb(140 63 30 / .15);
}

.account-wrap {
  max-width: 680px;
}

.account-card {
  padding: clamp(28px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.account-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
}

.account-hello {
  color: var(--ink-faint);
  font-size: 14px;
}

.account-email {
  font-weight: 600;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.account-status {
  padding: 24px 0;
}

.account-title {
  margin-bottom: 10px;
  font-size: 27px;
}

.account-text {
  margin-bottom: 12px;
  color: var(--ink-soft);
}

.account-text a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-note {
  color: var(--ink-faint);
  font-size: 14.5px;
}

.account-logout {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ---------- 12. 404 ---------- */
.notfound {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 0 72px;
  text-align: center;
}

.notfound-code {
  color: rgb(180 85 45 / .18);
  font-family: var(--font-display);
  font-size: clamp(72px, 12vw, 120px);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.notfound-title {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 36px);
}

.notfound-text {
  margin: 14px 0 28px;
  color: var(--ink-soft);
}

.notfound-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 13. Подвал ---------- */
.site-footer {
  background: var(--dark);
  color: var(--cream);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-block: clamp(48px, 6vw, 72px) 44px;
}

.brand-light {
  color: var(--cream);
}

.brand-light .brand-mark {
  color: #d9a06b;
}

.footer-tagline {
  max-width: 36ch;
  margin-top: 14px;
  color: rgb(243 237 225 / .65);
  font-size: 15px;
  line-height: 1.6;
}

.footer-title {
  margin-bottom: 14px;
  color: rgb(243 237 225 / .55);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  color: var(--cream);
  opacity: .85;
  font-size: 15px;
  text-decoration: none;
  transition: opacity .15s ease;
}

.footer-col a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  padding-block: 20px 28px;
  border-top: 1px solid rgb(243 237 225 / .14);
  color: rgb(243 237 225 / .62);
  font-size: 14px;
}

/* ---------- 14. Анимации и адаптив ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s ease;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal,
  .js .reveal.in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card,
  .card-media img,
  .brand-mark,
  .section-link svg,
  .cat-arrow {
    transition: none;
  }

  .card:hover {
    transform: none;
  }

  .card:hover .card-media img {
    transform: none;
  }
}

@media (max-width: 1100px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .featured {
    grid-template-columns: 1fr;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-media {
    display: none;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgb(38 34 27 / .3);
  }

  .no-js .site-nav {
    display: flex;
  }

  .site-header[data-open] .site-nav {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
    font-size: 16.5px;
  }

  .nav-spacer {
    display: none;
  }

  .nav-auth {
    margin: 8px 0 0;
    justify-content: center;
    height: 46px;
  }
}

@media (max-width: 700px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .principles {
    grid-template-columns: 1fr 1fr;
  }

  .principle {
    padding: 20px 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .member-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-card {
    min-height: 520px;
  }
}

@media (max-width: 480px) {
  .principles {
    grid-template-columns: 1fr;
  }

  .featured-side .card {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .featured-side .card-title {
    font-size: 18px;
  }

  .form-input {
    height: 48px;
  }

  .btn {
    height: 46px;
  }
}
