/* Shared: footer, modal, buttons, tags, sections */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--stroke-hair) solid transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: var(--fw-medium);
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur-base) var(--ease-standard);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-accent);
}

.btn--primary:hover {
  background: var(--accent-press);
  color: var(--accent-contrast);
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  border-color: var(--ppch-deep);
  color: var(--ppch-deep);
}

.btn--outline:hover {
  background: var(--ppch-deep);
  color: var(--ppch-white);
  text-decoration: none;
}

.btn--white {
  background: var(--ppch-white);
  color: var(--ppch-deep);
  box-shadow: var(--shadow-lg);
}

.btn--sm {
  font-size: 14px;
  padding: 11px 20px;
}

.btn--block {
  width: 100%;
}

.section {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-xl) 0;
}

.section__overline {
  font-size: 12px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}

.section__overline--light {
  color: var(--ppch-teal-light);
}

.section__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ppch-deep);
  margin: 0 0 var(--space-md);
}

.section__lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  max-width: 520px;
}

.badge,
.tag {
  display: inline-block;
  border: var(--stroke-hair) solid var(--border-subtle);
  background: var(--surface-page);
  color: var(--ppch-grey-700);
  font-size: 14.5px;
  font-weight: var(--fw-medium);
  padding: 8px 17px;
  border-radius: var(--radius-pill);
}

.badge--accent,
.tag {
  border-color: var(--accent);
  background: var(--surface-accent-soft);
  color: var(--accent);
}

/* Search autocomplete (home + catalog) */
[data-search-autocomplete] {
  position: relative;
}

.search-autocomplete[hidden],
.search-autocomplete__live[hidden] {
  display: none;
}

.search-autocomplete,
.search-autocomplete__live {
  position: absolute;
  z-index: 35;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-height: min(480px, 65vh);
  overflow-y: auto;
  padding: 10px;
  background: var(--surface-card);
  border: var(--stroke-hair) solid var(--border-subtle);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.search-autocomplete__group + .search-autocomplete__group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: var(--stroke-hair) solid var(--border-subtle);
}

.search-autocomplete__heading {
  padding: 7px 12px 5px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-autocomplete__option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--ppch-deep);
  text-decoration: none;
}

.search-autocomplete__option:hover,
.search-autocomplete__option.is-active {
  color: var(--ppch-deep);
  background: var(--surface-accent-soft);
  text-decoration: none;
}

.search-autocomplete__option-label {
  min-width: 0;
  font-size: 15px;
  font-weight: var(--fw-medium);
}

.search-autocomplete__option-meta {
  flex-shrink: 0;
  max-width: 45%;
  overflow: hidden;
  color: var(--text-tertiary);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-autocomplete__action {
  margin-top: 8px;
  padding-top: 8px;
  border-top: var(--stroke-hair) solid var(--border-subtle);
}

.search-autocomplete__option--action {
  color: var(--accent);
}

.search-autocomplete__live {
  min-height: 44px;
  padding: 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

.search-autocomplete__live.is-announcement {
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.search-autocomplete__live.is-loading::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 9px;
  border: 2px solid var(--ppch-haze);
  border-top-color: var(--accent);
  border-radius: 50%;
  vertical-align: -2px;
  animation: search-autocomplete-spin 0.75s linear infinite;
}

@keyframes search-autocomplete-spin {
  to {
    transform: rotate(360deg);
  }
}

.breadcrumb {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 34px var(--space-xl) 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 14.5px;
}

.breadcrumb__link {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb__link:hover {
  color: var(--accent);
}

.breadcrumb__current {
  color: var(--ppch-deep);
  font-weight: var(--fw-medium);
}

.breadcrumb__sep {
  color: var(--ppch-grey-400);
}

/* Article cards (home + journal) */
.article-card {
  text-decoration: none;
  color: inherit;
  background: var(--surface-card);
  border: var(--stroke-hair) solid var(--border-subtle);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-base) var(--ease-standard),
    box-shadow var(--dur-base) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border-subtle));
  text-decoration: none;
}

.article-card:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.article-card__cover {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background-color: var(--ppch-haze-soft);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.article-card__cover--placeholder {
  background:
    linear-gradient(145deg, var(--ppch-haze-soft) 0%, var(--ppch-haze) 55%, color-mix(in srgb, var(--accent) 18%, var(--ppch-haze)) 100%);
}

.article-card__tag {
  font-size: 12px;
  font-weight: var(--fw-medium);
  color: var(--ppch-deep);
  background: rgba(255, 255, 255, 0.9);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: var(--stroke-hair) solid rgba(255, 255, 255, 0.6);
}

.article-card__tag--inline {
  align-self: flex-start;
  margin-bottom: 10px;
  background: var(--surface-accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
}

.article-card__body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

.article-card__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ppch-deep);
  margin: 0 0 12px;
}

.article-card__excerpt {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta {
  font-size: 13.5px;
  color: var(--text-tertiary);
  margin: 0 0 16px;
}

.article-card__cta {
  margin-top: auto;
  font-size: 14.5px;
  font-weight: var(--fw-medium);
  color: var(--accent);
}

.article-card:hover .article-card__cta {
  color: var(--accent-press);
}

/* Footer */
.site-footer {
  margin-top: var(--space-3xl);
  background: var(--surface-structural);
  color: var(--text-invert);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.site-footer__inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-on-structural);
}

.site-footer__logo {
  filter: brightness(0) invert(1);
  margin-bottom: var(--space-md);
}

.site-footer__desc {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.66);
  margin: 0;
  max-width: 312px;
}

.site-footer__heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ppch-teal-light);
  margin-bottom: 18px;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__links a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 15px;
}

.site-footer__links a:hover {
  color: var(--ppch-white);
}

.site-footer__links--plain span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}

.site-footer__bottom {
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__legal a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.site-footer__legal a:hover {
  color: var(--ppch-white);
}

.site-footer__tagline {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.55);
}

/* Modal Dasha */
.modal-dasha[hidden] {
  display: none;
}

.modal-dasha {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal-dasha__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 43, 45, 0.5);
  backdrop-filter: blur(4px);
}

.modal-dasha__dialog {
  position: relative;
  width: 480px;
  max-width: 100%;
  background: var(--surface-card);
  border-radius: 28px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.modal-dasha__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-dasha__badge {
  font-size: 11.5px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface-accent-soft);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
}

.modal-dasha__close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 24px;
  line-height: 1;
  padding: 0;
}

.modal-dasha__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  font-size: 26px;
  color: var(--ppch-deep);
  margin: 4px 0 6px;
}

.modal-dasha__lead {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 24px;
}

.modal-dasha__field {
  margin-bottom: 16px;
}

.modal-dasha__label {
  display: block;
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  color: var(--ppch-grey-700);
  margin-bottom: 7px;
}

.modal-dasha__optional {
  color: var(--text-tertiary);
  font-weight: var(--fw-regular);
}

.modal-dasha__input,
.modal-dasha__textarea {
  width: 100%;
  border: var(--stroke-medium) solid var(--border-subtle);
  border-radius: 12px;
  padding: 13px 15px;
  font-family: var(--font-body);
  font-size: 15px;
}

.modal-dasha__submit {
  width: 100%;
  margin-top: 4px;
  border: none;
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: var(--fw-medium);
  padding: 16px;
  border-radius: var(--radius-pill);
}

.modal-dasha__privacy {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary, #667);
}

.modal-dasha__privacy a {
  color: inherit;
}

@media (max-width: 960px) {
  .section {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .section__title {
    font-size: clamp(28px, 7vw, 38px);
  }

  .breadcrumb {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
    padding-top: 22px;
  }

  .site-footer__inner {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .modal-dasha__dialog,
  .modal-club__dialog {
    width: calc(100vw - 32px);
    max-width: 480px;
    padding: 28px 22px;
    margin: 16px;
  }

  .modal-dasha__close,
  .modal-club__close {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 640px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

.error-page {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-page__inner {
  max-width: 480px;
}

.error-page__code {
  font-size: 64px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.error-page__title {
  margin: 0 0 12px;
  font-size: 28px;
}

.error-page__text {
  color: var(--ppch-muted, #666);
  margin: 0 0 24px;
}

.error-page__details {
  text-align: left;
  background: #f5f5f5;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  overflow: auto;
  margin-bottom: 16px;
}

.modal-dasha__success {
  padding: 16px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 8px;
  margin-bottom: 16px;
}

.modal-dasha__errors {
  margin-bottom: 16px;
}

.modal-dasha__error {
  margin: 0 0 4px;
  color: #c62828;
  font-size: 14px;
}

/* Modal Club auth */
.modal-club[hidden] {
  display: none;
}

.modal-club {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal-club__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 43, 45, 0.5);
  backdrop-filter: blur(4px);
}

.modal-club__dialog {
  position: relative;
  width: 480px;
  max-width: 100%;
  background: var(--surface-card);
  border-radius: 28px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.modal-club__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-club__badge {
  font-size: 11.5px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface-accent-soft);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
}

.modal-club__close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 24px;
  line-height: 1;
  padding: 0;
}

.modal-club__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  font-size: 26px;
  color: var(--ppch-deep);
  margin: 4px 0 6px;
}

.modal-club__lead {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.modal-club__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--ppch-haze-soft, #f0f4f1);
  border-radius: var(--radius-pill);
}

.modal-club__tab {
  border: none;
  background: transparent;
  color: var(--ppch-grey-700);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--fw-medium);
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.modal-club__tab.is-active {
  background: var(--surface-card);
  color: var(--ppch-deep);
  box-shadow: var(--shadow-xs);
}

.modal-club__field {
  margin-bottom: 16px;
}

.modal-club__label {
  display: block;
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  color: var(--ppch-grey-700);
  margin-bottom: 7px;
}

.modal-club__input {
  width: 100%;
  border: var(--stroke-medium) solid var(--border-subtle);
  border-radius: 12px;
  padding: 13px 15px;
  font-family: var(--font-body);
  font-size: 15px;
}

.modal-club__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 16px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.modal-club__checkbox input {
  margin-top: 2px;
  flex-shrink: 0;
}

.modal-club__checkbox a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-club__submit {
  width: 100%;
  margin-top: 4px;
  border: none;
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: var(--fw-medium);
  padding: 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.modal-club__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.modal-club__errors {
  margin-bottom: 16px;
}

.modal-club__error {
  margin: 0 0 4px;
  color: #c62828;
  font-size: 14px;
}

.modal-club__notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ppch-deep);
  background: var(--surface-accent-soft);
  font-size: 14px;
  line-height: 1.45;
}
