:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: rgba(18, 18, 28, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(167, 139, 250, 0.35);
  --text: #f4f4f8;
  --text-muted: #9a9ab0;
  --purple: #a78bfa;
  --cyan: #22d3ee;
  --glow: rgba(167, 139, 250, 0.25);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --header-h: 68px;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% -10%, rgba(167, 139, 250, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 35% at 90% 5%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(167, 139, 250, 0.08), transparent 50%);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(10, 10, 15, 0.72);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 10px var(--glow));
}

.brand-text {
  background: linear-gradient(135deg, #fff 30%, var(--purple) 70%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-nav {
  display: none;
  gap: 1.25rem;
  margin-left: auto;
  margin-right: 1rem;
}

.header-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--text);
}

.lang-toggle {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  margin-left: auto;
}

.header-nav + .lang-toggle {
  margin-left: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.lang-btn .flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn[aria-pressed="true"] {
  color: var(--text);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.25), rgba(34, 211, 238, 0.18));
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.35), 0 0 20px rgba(34, 211, 238, 0.12);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: 5rem 0 4rem;
}

.hero-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
  max-width: var(--max);
  margin-inline: auto;
  text-align: center;
}

.hero-copy {
  max-width: 36rem;
  margin-inline: auto;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  background: linear-gradient(135deg, #ffffff 20%, var(--purple) 55%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  margin: 0 auto 2rem;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.hero-art {
  justify-self: center;
  width: min(100%, 320px);
  filter: drop-shadow(0 0 40px rgba(167, 139, 250, 0.28));
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    text-align: left;
    gap: 2.5rem;
  }

  .hero-copy {
    margin-inline: 0;
  }

  .hero-tagline {
    margin-inline: 0;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-art {
    width: min(100%, 420px);
    justify-self: end;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  color: #0a0a0f;
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.3);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: rgba(167, 139, 250, 0.08);
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(167, 139, 250, 0.03), transparent);
}

.section-head {
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.card-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

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

/* Glass cards with gradient border */
.card {
  position: relative;
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.45), rgba(255, 255, 255, 0.06), rgba(34, 211, 238, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 40px rgba(167, 139, 250, 0.12);
}

.card-body {
  padding: 1.35rem 1.4rem 1.5rem;
}

.card-link {
  display: block;
  color: inherit;
  height: 100%;
}

.card-link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.card-date {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
}

.card-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.card-summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
}

.card-cta svg {
  transition: transform 0.2s ease;
}

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

/* Feature cards */
.feature-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.18), rgba(34, 211, 238, 0.12));
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: var(--cyan);
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.15);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Video cards */
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.04);
}

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 15, 0.35);
  transition: background 0.25s ease;
}

.video-card:hover .play-badge {
  background: rgba(10, 10, 15, 0.2);
}

.play-badge span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.45);
  color: #0a0a0f;
}

.play-badge svg {
  width: 22px;
  height: 22px;
  margin-left: 2px;
}

/* Status / error */
.status {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 560px);
  margin: 2rem auto 3rem;
  padding: 1.5rem;
  text-align: center;
  border-radius: var(--radius);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.status[data-kind="empty"] {
  background: rgba(167, 139, 250, 0.06);
  border-color: rgba(167, 139, 250, 0.3);
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  margin: 0 0 0.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-meta {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-meta time {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.footer-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0.85;
}

/* Responsive */
@media (min-width: 640px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .header-nav {
    display: flex;
  }

  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .videos-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    padding: 6.5rem 0 5rem;
  }
}

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

  .card,
  .btn,
  .video-thumb img,
  .card-cta svg {
    transition: none;
  }
}
