/* FinClub Blog — изумрудная тема (референс: landing-green) */

:root {
  --g-deep: #042f2e;
  --g-mid: #047857;
  --g-bright: #10b981;
  --g-grass: #84cc16;
  --g-teal: #0f766e;
  --g-glow: rgba(16, 185, 129, 0.22);
  --bg: #eef6f1;
  --text: #0f172a;
  --text-muted: #64748b;
  --white-glass: rgba(255, 255, 255, 0.72);
  --font: 'Bahnschrift SemiCondensed', 'Bahnschrift', 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
  --header-offset: 6.5rem;
  --container: 72rem;
}

@font-face {
  font-family: 'Bahnschrift SemiCondensed';
  src: local('Bahnschrift SemiCondensed'), local('Bahnschrift');
  font-weight: 300 700;
  font-stretch: semi-condensed;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-family: var(--font);
}

body.theme-green {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body.theme-green::selection {
  background: #d1fae5;
  color: #064e3b;
}

body.theme-green::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(6, 78, 59, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 45% at 95% 80%, rgba(15, 118, 110, 0.14), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(132, 204, 22, 0.04), transparent 40%);
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(165deg, #ecfdf5 0%, #eef6f1 40%, #e6f4ed 100%);
}

.site-bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(7.5rem);
}

.site-bg__blob--1 {
  top: -12%;
  left: -12%;
  width: 52vw;
  height: 52vw;
  background: rgba(110, 231, 183, 0.3);
}

.site-bg__blob--2 {
  bottom: -18%;
  right: -10%;
  width: 62vw;
  height: 62vw;
  background: rgba(19, 78, 74, 0.12);
  filter: blur(8.75rem);
}

.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1.25rem 1.5rem 0;
}

.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(1.25rem);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 38px -22px rgba(15, 23, 42, 0.42), inset 0 1px 0 white;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.site-brand__mark {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #047857;
  background: linear-gradient(to bottom, #fff, #f1f5f9);
  border: 1px solid #e2e8f0;
}

.site-brand__logo img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.site-brand__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #020617;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-brand__tagline {
  font-size: 0.625rem;
  color: #94a3b8;
}

.site-nav__list,
.site-footer__menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.site-nav__list a,
.site-footer__links a,
.site-footer__menu a {
  text-decoration: none;
  color: #475569;
  font-size: 0.75rem;
  transition: color 0.2s;
}

.site-nav__list a:hover,
.site-footer__links a:hover,
.site-footer__menu a:hover {
  color: var(--g-mid);
}

@media (min-width: 1024px) {
  .site-nav__list {
    display: flex;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
  font-family: inherit;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  padding: 0.875rem 1.5rem;
  background: linear-gradient(to bottom, #059669, #115e59);
  border-color: #064e3b;
  color: #fff;
  font-size: 0.875rem;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--primary:hover {
  background: linear-gradient(to bottom, #10b981, #047857);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.btn--secondary {
  padding: 0.875rem 1.5rem;
  background: linear-gradient(to bottom, #fff, #f8fafc);
  border-color: #e2e8f0;
  color: #334155;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05), inset 0 1px 0 white;
}

.btn__arrow { opacity: 0.85; }

/* Main layout */
.site-main {
  padding-top: var(--header-offset);
}

.blog-hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
  text-align: center;
}

.blog-hero__eyebrow {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--g-mid);
  text-transform: uppercase;
}

.blog-hero__title {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.06em;
  line-height: 0.95;
  color: #020617;
}

.blog-hero__lead {
  margin: 1.25rem auto 0;
  max-width: 36rem;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Grid */
.blog-grid-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.post-card {
  border-radius: 1.5rem;
  background: var(--white-glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px -28px rgba(15, 23, 42, 0.35), inset 0 1px 0 white;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.55s ease, box-shadow 0.35s ease;
}

.post-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.post-card:hover {
  box-shadow: 0 28px 60px -24px var(--g-glow), inset 0 1px 0 white;
}

.post-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.post-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
}

.post-card__media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--g-mid);
}

.post-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card__img {
  transform: scale(1.03);
}

.post-card__body {
  padding: 1.25rem 1.25rem 1.5rem;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-card__cat {
  color: var(--g-mid);
  font-weight: 600;
}

.post-card__title {
  margin: 0.65rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #0f172a;
}

.post-card__excerpt {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
  font-weight: 300;
}

.post-card__more {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--g-mid);
  font-weight: 500;
}

/* Article */
.article {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.article__header {
  margin-bottom: 2rem;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article__cat {
  color: var(--g-mid);
  font-weight: 600;
  text-decoration: none;
}

.article__title {
  margin: 1rem 0 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #020617;
}

.article__cover {
  margin-top: 1.5rem;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px -28px rgba(15, 23, 42, 0.35);
}

.article__cover-img {
  display: block;
  width: 100%;
  height: auto;
}

.article__content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #334155;
  font-weight: 300;
}

.article__content > *:first-child { margin-top: 0; }

.article__content h2,
.article__content h3,
.article__content h4 {
  color: #0f172a;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2rem;
}

.article__content a {
  color: var(--g-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article__content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

.article__content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--g-bright);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 0 1rem 1rem 0;
  color: #475569;
}

.article__footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article__tags a {
  display: inline-block;
  margin: 0 0.5rem 0.5rem 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  color: var(--g-mid);
  text-decoration: none;
}

/* Pagination */
.blog-pagination {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

.blog-pagination .nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.875rem;
  color: #475569;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.blog-pagination .current {
  background: var(--g-mid);
  color: #fff;
  border-color: var(--g-deep);
}

.blog-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.5);
  padding: 2.5rem 1.5rem;
}

.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer__links {
  display: flex;
  gap: 1rem;
}

@media (min-width: 768px) {
  .site-footer__menu {
    display: flex;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-card,
  .reveal {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
