@import url('../design-system.css');

/* Resources page — extends design-system.css */

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--ds-font);
  color: var(--text-light);
  background: var(--bg-dark);
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 11, 22, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.site-header .nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #f1f5f9;
}
.site-header .logo {
  width: 36px;
  height: 36px;
  border-radius: var(--ds-radius-logo);
  overflow: hidden;
}
.site-header .logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-header nav a {
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.84rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.site-header nav a:hover { color: #fff; }
.site-header nav a.is-active { color: #fff; font-weight: 600; }

.lang-switcher { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--ds-radius-sm);
  border: 1px solid var(--ds-border-dark-strong);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--ds-transition);
  font-family: inherit;
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(123, 97, 255, 0.45); }
.lang-btn.active {
  background: linear-gradient(135deg, var(--ds-accent-purple), var(--accent));
  color: #ffffff;
  border-color: transparent;
}
.lang-btn span { font-size: 0.85rem; }

/* Resources hero */
.resources-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10vw, 112px) 0 clamp(48px, 6vw, 64px);
  text-align: center;
  background: var(--bg-section);
  border-bottom: 1px solid var(--border-subtle);
}
.resources-hero__glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(100px);
}
.resources-hero__glow--purple {
  width: min(520px, 65vw);
  height: min(520px, 65vw);
  top: -20%;
  left: 50%;
  transform: translateX(-55%);
  background: rgba(123, 97, 255, 0.1);
}
.resources-hero__glow--blue {
  width: min(440px, 55vw);
  height: min(440px, 55vw);
  bottom: -10%;
  right: -8%;
  background: rgba(106, 168, 255, 0.08);
}
.resources-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}
.resources-hero__label {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.88);
}
.resources-hero__title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw + 0.4rem, 3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #f8fafc;
}
.resources-hero__lead {
  margin: 0;
  font-size: clamp(1.05rem, 1.1vw + 0.4rem, 1.18rem);
  line-height: 1.65;
  color: var(--text-muted);
}

/* Article grid */
.resources-grid-section {
  padding: clamp(56px, 8vw, 88px) 0 clamp(80px, 10vw, 112px);
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
/* article-card radius, shadow, hover: design-system.css */
.article-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.article-card__link:focus-visible {
  outline: 2px solid rgba(196, 181, 253, 0.95);
  outline-offset: -2px;
}
.article-card:has(.article-card__link:hover),
.article-card:has(.article-card__link:focus-visible) {
  border-color: rgba(255, 255, 255, 0.18);
}
.article-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.45), rgba(106, 168, 255, 0.4));
}
.article-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 35%, rgba(7, 11, 22, 0.55));
  pointer-events: none;
}
.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.article-card:has(.article-card__link:hover) .article-image img,
.article-card:has(.article-card__link:focus-visible) .article-image img {
  transform: scale(1.06);
}
.article-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
}
.article-card__category {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(147, 197, 253, 0.85);
}
.article-content h2 {
  margin: 0 0 12px;
  font-size: clamp(1.05rem, 1.2vw + 0.45rem, 1.25rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #f8fafc;
}
.article-title-split { line-height: 1.35; }
.title-break { line-height: 0; }
.article-content p {
  margin: 0 0 20px;
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
}
.article-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.article-card__time {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}
.article-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--ds-radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.85), rgba(91, 124, 255, 0.9));
  border: 1px solid var(--ds-border-dark-strong);
  transition: var(--ds-transition-hover);
}
.article-card:has(.article-card__link:hover) .article-card__btn,
.article-card:has(.article-card__link:focus-visible) .article-card__btn {
  box-shadow: 0 4px 20px rgba(123, 97, 255, 0.35);
}
.article-card__btn svg {
  stroke-width: var(--ds-icon-stroke-bold);
}

/* Article page */
.article-page {
  padding: clamp(48px, 8vw, 80px) 0 clamp(80px, 10vw, 112px);
}
.article-page__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-faint);
  transition: color 0.2s ease;
}
.article-page__back:hover { color: rgba(248, 250, 252, 0.9); }
.article-page__hero {
  margin: 0 0 36px;
  border-radius: 20px;
  overflow: hidden;
  height: clamp(220px, 32vw, 380px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.35), rgba(106, 168, 255, 0.3));
}
.article-page__hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-page__header {
  max-width: 720px;
  margin-bottom: 40px;
}
.article-page__category {
  display: inline-block;
  margin: 0 0 16px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.88);
}
.article-page__title {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 3.5vw + 0.35rem, 2.65rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #f8fafc;
}
.article-page__meta {
  font-size: 0.82rem;
  color: var(--text-faint);
}
.article-page__body {
  max-width: 680px;
  padding: 32px 36px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.article-page__body p {
  margin: 0 0 18px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text-muted);
}
.article-page__body p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer {
  background: #050811;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(48px, 6vw, 72px) clamp(20px, 5vw, 56px) clamp(28px, 4vw, 40px);
  color: rgba(203, 213, 225, 0.55);
}
.site-footer a {
  color: rgba(203, 213, 225, 0.62);
  text-decoration: none;
  transition: color 0.22s ease;
}
.site-footer a:hover { color: rgba(248, 250, 252, 0.9); }
.site-footer__main {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(200px, 2fr) minmax(120px, 1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
  padding-bottom: clamp(28px, 4vw, 36px);
}
.site-footer__brand-name {
  display: block;
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.92);
}
.site-footer__tagline {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(203, 213, 225, 0.48);
  max-width: 200px;
}
.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer__nav a { font-size: 0.84rem; font-weight: 500; }
.site-footer__store { display: flex; justify-content: flex-end; }
.site-footer__store-link {
  display: inline-block;
  line-height: 0;
  opacity: 0.88;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.site-footer__store-link:hover { opacity: 1; transform: translateY(-2px); }
.app-store-badge-link {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.app-store-badge-link:hover { opacity: 0.9; transform: translateY(-2px); }
.app-store-badge {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  border: 0;
}
.app-store-badge--footer { width: 120px; }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  padding: clamp(20px, 3vw, 28px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: clamp(16px, 2.5vw, 24px);
}
.site-footer__legal a { font-size: 0.78rem; color: rgba(203, 213, 225, 0.45); }
.site-footer__legal a:hover { color: rgba(203, 213, 225, 0.78); }
.site-footer__copy {
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(203, 213, 225, 0.38);
}

@media (max-width: 900px) {
  .articles-grid { grid-template-columns: 1fr; }
  .site-footer__main {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .site-footer__tagline { max-width: none; margin: 0 auto; }
  .site-footer__store { justify-content: center; }
  .site-header nav ul { justify-content: center; }
  .site-header .nav { flex-wrap: wrap; }
  .site-header .nav-right { width: 100%; justify-content: center; flex-wrap: wrap; gap: 14px; }
}

@media (max-width: 768px) {
  .article-page__body { padding: 24px 22px; }
  .article-image { height: 180px; }
  .article-content { padding: 20px 18px 18px; }
}
