@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,400;6..72,600&display=swap");

:root {
  color-scheme: dark;
  --bg: #0a0d14;
  --bg-soft: #111727;
  --panel: rgba(19, 25, 39, 0.72);
  --panel-solid: #161d2f;
  --text: #e8ecf5;
  --heading: #f3f7ff;
  --muted: #a6b1c7;
  --line: rgba(173, 189, 218, 0.2);
  --accent: #4da6ff;
  --accent-strong: #7ac0ff;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.46);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2fb;
  --bg-soft: #dfe7f6;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --text: #1b2538;
  --heading: #10213f;
  --muted: #4f5f7a;
  --line: rgba(48, 74, 122, 0.2);
  --accent: #1f75ff;
  --accent-strong: #0356d7;
  --shadow: 0 8px 24px rgba(44, 72, 122, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(77, 166, 255, 0.26), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(54, 89, 176, 0.2), transparent 30%),
    linear-gradient(180deg, #090d16 0%, #0a0d14 55%, #090c12 100%);
}

:root[data-theme="light"] body {
  background: #eef2fb;
}

.page {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 46px);
  display: grid;
  gap: clamp(20px, 3vw, 30px);
}

.affiliate-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #c99700;
  border-radius: 12px;
  background: #ffd84d;
  padding: 10px 14px;
}

.affiliate-logo-link {
  display: inline-flex;
  align-items: center;
}

.affiliate-logo {
  display: block;
  width: 150px;
  max-width: 34vw;
  height: auto;
}

.affiliate-banner p {
  margin: 0;
  color: #2f2500;
  font-size: 0.9rem;
  line-height: 1.5;
}

.affiliate-banner a {
  color: #1f1700;
  font-weight: 700;
  text-decoration: none;
}

.affiliate-banner a:hover {
  text-decoration: underline;
}

:root[data-theme="light"] .affiliate-banner {
  background: #ffd84d;
}

@media (max-width: 640px) {
  .affiliate-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .affiliate-logo {
    width: 135px;
  }
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 18, 31, 0.72);
  backdrop-filter: blur(12px);
}

:root[data-theme="light"] .site-header {
  background: #ffffff;
  backdrop-filter: none;
}

.site-header,
.hero,
.featured,
.posts,
.newsletter {
  animation: rise-in 520ms ease both;
}

.hero {
  animation-delay: 70ms;
}

.featured {
  animation-delay: 140ms;
}

.posts {
  animation-delay: 210ms;
}

.newsletter {
  animation-delay: 280ms;
}

.brand {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

:root[data-theme="light"] .brand {
  color: var(--heading);
}

.main-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.main-nav a:hover {
  color: var(--text);
}

.theme-toggle {
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.hero,
.featured,
.posts,
.newsletter {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(170deg, var(--panel), rgba(17, 23, 39, 0.48));
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 42px);
}

:root[data-theme="light"] .hero,
:root[data-theme="light"] .featured,
:root[data-theme="light"] .posts,
:root[data-theme="light"] .newsletter {
  background: #ffffff;
}

.eyebrow {
  margin: 0 0 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 600;
}

h1,
h2,
h3 {
  font-family: Newsreader, Georgia, serif;
  margin: 0;
  line-height: 1.04;
  color: var(--heading);
}

h1 {
  font-size: clamp(2.2rem, 7.5vw, 4.8rem);
  max-width: 14ch;
  letter-spacing: -0.02em;
}

.lede {
  margin: 18px 0 0;
  max-width: 56ch;
  line-height: 1.75;
  color: var(--muted);
}

.actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 18px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #041325;
  background: linear-gradient(135deg, #7ac0ff, #4da6ff);
  box-shadow: 0 14px 30px rgba(77, 166, 255, 0.28);
}

:root[data-theme="light"] .button.primary {
  box-shadow: 0 8px 18px rgba(31, 117, 255, 0.2);
}

.button.secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.chip {
  margin: 0 0 14px;
  display: inline-block;
  color: #9ed0ff;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.featured h2 {
  font-size: clamp(1.8rem, 5vw, 2.9rem);
  max-width: 18ch;
}

.featured p {
  margin: 16px 0 0;
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.7;
}

.text-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent-strong);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 4.2vw, 2.5rem);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-button {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 0 12px;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.filter-button:hover {
  color: var(--text);
}

.filter-button.is-active {
  color: #081326;
  border-color: transparent;
  background: linear-gradient(135deg, #8ac7ff, #58abff);
}

.post-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

:root[data-theme="light"] .post-card {
  background: #ffffff;
}

.meta {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a97b2;
}

.post-card h3 {
  margin-top: 10px;
  font-size: 1.5rem;
}

.post-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.post-card.is-hidden {
  display: none;
}

.article-body {
  max-width: 72ch;
}

.article-body p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
}

.cookie-consent {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 14, 24, 0.95);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  padding: 12px 14px;
}

.cookie-consent p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.cookie-consent.is-hidden {
  display: none;
}

.cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-button {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.cookie-button.accept {
  border-color: transparent;
  background: linear-gradient(135deg, #8ac7ff, #58abff);
  color: #041325;
}

.cookie-button.deny {
  background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] .cookie-consent {
  background: #ffffff;
}

@media (max-width: 760px) {
  .cookie-consent {
    flex-direction: column;
    align-items: flex-start;
  }
}

.article-body blockquote {
  margin: 22px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

:root[data-theme="light"] .article-body blockquote {
  background: #f3f6fc;
}

.newsletter {
  background: linear-gradient(150deg, rgba(77, 166, 255, 0.18), rgba(22, 29, 47, 0.86));
}

:root[data-theme="light"] .newsletter {
  background: #ffffff;
}

.newsletter h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
}

.newsletter p {
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.7;
}

.featured:focus,
.posts:focus,
.newsletter:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  * {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
