/* HYPNOLOGIYA — Encyclopedia pages */

.masthead__slogan {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2vw, 1.125rem);
  font-style: italic;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  max-width: 42ch;
  line-height: 1.4;
}

.footer__slogan {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.footer__grid--ency {
  grid-template-columns: 1.3fr repeat(4, 1fr);
}

.ency-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.page-lead--slogan {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-style: italic;
  color: var(--brand-light);
  margin-bottom: var(--space-md);
}

/* Hero */
.ency-hero {
  padding: var(--space-2xl) 0;
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.ency-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  max-width: 20ch;
}

.ency-hero__slogan {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--brand-light);
  margin-bottom: var(--space-md);
}

.ency-hero__lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 56ch;
  line-height: 1.65;
  margin-bottom: var(--space-xl);
}

.ency-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.ency-stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}

.ency-stat__label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.ency-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* Sections grid */
.ency-sections-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.ency-section-tag {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
}

.ency-checklist {
  list-style: none;
  padding: 0;
}

.ency-checklist li {
  padding-left: 1.5em;
  position: relative;
  margin-bottom: 0.5em;
}

.ency-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand-light);
  font-weight: 700;
}

/* Phases */
.ency-phases {
  display: grid;
  gap: var(--space-md);
  margin: var(--space-lg) 0 var(--space-2xl);
}

.ency-phases--compact {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.ency-phase-card {
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--brand-light);
}

.ency-phase-card__stage {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.ency-phase-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin: var(--space-sm) 0;
}

.ency-phase-card__count {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: var(--space-sm);
}

.ency-phase-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.ency-sections-block { margin-bottom: var(--space-3xl); }
.ency-roadmap { margin-bottom: var(--space-3xl); }

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
}

.pillar-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--pillar-color, var(--brand-light));
  transition: transform var(--transition), box-shadow var(--transition);
}

.pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.pillar-card__icon { font-size: 1.5rem; }
.pillar-card__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}
.pillar-card__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .footer__grid--ency { grid-template-columns: 1fr; }
  .ency-hero__stats { gap: var(--space-lg); }
}


/* Brand aliases used in encyclopedia styles */
:root {
  --brand: var(--navy);
  --brand-light: var(--accent);
}

.evidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 var(--space-md);
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--accent-soft);
  border: 1px solid var(--accent-muted);
}

.article-byline {
  display: grid;
  gap: 0.35rem;
  margin-top: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.article-summary,
.article-toc,
.article-sources,
.author-card {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.article-summary h2,
.article-toc h2,
.article-sources h2,
.author-card h2 {
  margin-bottom: var(--space-md);
  font-size: 1.25rem;
}

.article-summary ul,
.article-toc ol,
.article-sources ol {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.article-disclaimer,
.article-report {
  margin-top: var(--space-xl);
  color: var(--text-muted);
  font-size: 0.9375rem;
}


/* Разделы на странице энциклопедии */
.ency-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.ency-cat-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-muted);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
}

.ency-cat-nav__link:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-muted);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.ency-cat-nav__link.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
  transform: none;
}

.ency-cat-nav__link:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

.ency-cat-nav__link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.page-lead--slogan {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--brand);
  margin-bottom: var(--space-sm);
}


.ency-hero--with-banner {
  display: grid;
  gap: var(--space-xl);
}
@media (min-width: 900px) {
  .ency-hero--with-banner {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }
}

/* Centered homepage banner carousel — one slide visible at a time */
.home-page > .container,
.home-page > section.container {
  margin-bottom: var(--space-2xl);
}

.home-page__intro {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border);
}

.home-page__intro .home-banner {
  margin: 0;
  width: 100%;
}

.home-page__intro .home-banner__carousel {
  width: 100%;
  max-width: none;
}

.home-page__intro .ency-hero {
  padding: 0;
  margin: 0;
  border: none;
  text-align: center;
}

.home-page__intro .ency-hero__content {
  max-width: 48rem;
  margin-inline: auto;
}

.home-page__intro .ency-hero__title {
  max-width: none;
}

.home-page__intro .ency-hero__lead {
  max-width: 42rem;
  margin-inline: auto;
}

.home-page__intro .ency-hero__stats {
  justify-content: center;
}

.home-page__intro .ency-hero__actions {
  justify-content: center;
}

.ency-search {
  display: flex;
  gap: var(--space-sm);
  width: min(100%, 680px);
  margin: 0 auto var(--space-md);
}

.ency-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.ency-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.ency-hero__philosophy {
  margin-top: var(--space-lg);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--text-muted);
}

.contact-list {
  display: grid;
  gap: var(--space-md);
}

.contact-card {
  padding: var(--space-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.contact-card h2 {
  margin-bottom: var(--space-sm);
  font-size: 1.25rem;
}

.contact-card p {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.home-page .home-hero {
  padding-bottom: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.home-page .ency-sections-block,
.home-page .ency-roadmap {
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.home-banner {
  margin-bottom: 0;
}

.home-banner__carousel {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface-muted);
}

.home-banner__track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.home-banner__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.home-banner__slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.home-banner__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.home-banner__btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition), transform var(--transition), opacity var(--transition);
}

.home-banner__btn:hover {
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(-50%) scale(1.08);
}

.home-banner__btn--prev { left: var(--space-md); }
.home-banner__btn--next { right: var(--space-md); }

.home-banner__dots {
  position: absolute;
  left: 50%;
  bottom: var(--space-md);
  z-index: 2;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.home-banner__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.home-banner__dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .ency-search {
    flex-direction: column;
  }

  .home-banner__track {
    aspect-ratio: 16 / 9;
  }

  .home-banner__btn {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
  }
}

.site-form {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.site-form__row {
  display: grid;
  gap: 0.4rem;
}

.site-form label {
  font-weight: 600;
  color: var(--text);
}

.site-form input,
.site-form select,
.site-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.site-form input:focus,
.site-form select:focus,
.site-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.site-form__help,
.site-form .errorlist {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-form .errorlist {
  color: var(--danger);
  list-style: none;
  padding: 0;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.flash-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin: var(--space-md) 0 var(--space-lg);
  padding: 0;
}

.flash {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.flash--success {
  border-color: var(--accent-muted);
  background: var(--accent-soft);
  color: var(--navy);
}

.flash--error {
  border-color: #f5c2c7;
  background: #fff5f5;
  color: var(--danger);
}
