:root {
  --bg: #f4f7fc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --brand: #1e3a5f;
  --brand-light: #e4ecff;
  --border: rgba(148, 163, 184, 0.34);
  --accent: #059669;
  --hero-shadow: 0 20px 54px rgba(15, 23, 42, 0.11);
  --card-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  --text-color-primary: #1e293b;
  color-scheme: light;
}

html.dark {
  --bg: #030712;
  --panel: #0f172a;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --brand: #8da3db;
  --brand-light: #132440;
  --border: rgba(71, 85, 105, 0.68);
  --accent: #34d399;
  --hero-shadow: 0 26px 62px rgba(2, 6, 23, 0.52);
  --card-shadow: 0 14px 34px rgba(2, 6, 23, 0.44);
  --text-color-primary: #e2e8f0;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Manrope', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(219, 228, 255, 0.75) 0%, transparent 35%),
    radial-gradient(circle at 100% 10%, rgba(167, 243, 208, 0.25) 0%, transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(244, 248, 253, 0.8) 60%, rgba(237, 244, 251, 0.82) 100%),
    var(--bg);
  transition: background-color 220ms ease, color 220ms ease;
}

.dark body {
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 85, 160, 0.34) 0%, transparent 35%),
    radial-gradient(circle at 100% 10%, rgba(5, 150, 105, 0.16) 0%, transparent 28%),
    linear-gradient(145deg, rgba(2, 6, 23, 0.96) 0%, rgba(3, 10, 29, 0.88) 60%, rgba(6, 18, 43, 0.86) 100%),
    var(--bg);
}

a {
  color: var(--brand);
  text-decoration-color: rgba(30, 58, 95, 0.36);
  text-underline-offset: 2px;
}

.dark a {
  color: #f8fafc;
  text-decoration-color: rgba(248, 250, 252, 0.46);
}

.dark a:hover {
  color: #dbe4ff;
  text-decoration-color: rgba(219, 228, 255, 0.78);
}

a:focus-visible {
  outline: 2px solid rgba(42, 64, 133, 0.5);
  outline-offset: 2px;
}

.dark a:focus-visible {
  outline-color: rgba(141, 163, 219, 0.72);
}

.page {
  width: min(1140px, 92vw);
  margin: 0 auto;
  padding: 74px 0 64px;
}

.hero {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 255, 0.93) 55%, rgba(238, 245, 253, 0.9) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(1.35rem, 2.8vw, 2.3rem);
  box-shadow: var(--hero-shadow);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.dark .hero {
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.95) 0%, rgba(12, 20, 36, 0.92) 55%, rgba(8, 16, 34, 0.9) 100%);
}

.hero h1 {
  margin: 12px 0 0;
  font-family: 'Newsreader', ui-serif, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.012em;
  font-size: clamp(1.9rem, 3.2vw, 2.85rem);
  line-height: 1.07;
  max-width: 18ch;
}

.lead {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.68;
  max-width: 66ch;
  font-size: 1.01rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.chip {
  background: linear-gradient(180deg, #e9fbf3 0%, #d7f7ea 100%);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.48);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dark .chip {
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.24) 0%, rgba(4, 120, 87, 0.2) 100%);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.42);
}

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

.button {
  display: inline-block;
  text-decoration: none;
  border-radius: 14px;
  border: 1px solid var(--brand);
  padding: 11px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 170ms ease, box-shadow 170ms ease, color 170ms ease, background-color 170ms ease;
}

.button.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(30, 58, 95, 0.22);
}

.dark .button.primary {
  background: #8da3db;
  color: #0b1220;
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.45);
}

.button.ghost {
  background: #fff;
  color: var(--brand);
  border-color: rgba(30, 58, 95, 0.28);
}

.dark .button.ghost {
  background: rgba(15, 23, 42, 0.86);
  color: #dbe4ff;
  border-color: rgba(90, 115, 184, 0.52);
}

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

.button.primary:hover {
  background: #162d4a;
  box-shadow: 0 14px 28px rgba(22, 45, 74, 0.27);
}

.dark .button.primary:hover {
  background: #9fb3e4;
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.54);
}

.button.ghost:hover {
  background: #f7faff;
}

.dark .button.ghost:hover {
  background: rgba(30, 58, 95, 0.42);
}

.grid {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

@media (min-width: 860px) {
  .grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero {
    padding-right: clamp(4.4rem, 7vw, 5.6rem);
  }

  .hero h1 {
    max-width: 16ch;
  }
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--card-shadow);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.card:hover {
  transform: translateY(-1px);
  border-color: rgba(90, 115, 184, 0.42);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.04rem;
  line-height: 1.32;
}

.card p,
.card li {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.card ul {
  margin: 0;
  padding-left: 18px;
}

.section-title {
  margin: 28px 0 12px;
  font-size: clamp(1.35rem, 2.2vw, 1.72rem);
  font-family: 'Newsreader', ui-serif, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.faq .card h3 {
  font-size: 1rem;
}

.small {
  color: #64748b;
  font-size: 0.85rem;
}

.dark .small {
  color: #e2e8f0;
}

.footer {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.52);
  background: linear-gradient(180deg, #ebfcf4 0%, #ddf8ed 100%);
  color: #047857;
  padding: 7px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dark .badge {
  border-color: rgba(52, 211, 153, 0.48);
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.2) 0%, rgba(4, 120, 87, 0.16) 100%);
  color: #34d399;
}

.theme-switch-host {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 90;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(10px);
}

.dark .theme-switch-host {
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.56);
}

.theme-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-color-primary);
  background: transparent;
  overflow: hidden;
  transition: opacity 180ms ease;
}

.theme-switch:hover {
  opacity: 0.8;
}

.theme-switch:focus-visible {
  outline: 2px solid rgba(42, 64, 133, 0.5);
  outline-offset: 2px;
}

.theme-icon {
  position: absolute;
  width: 19px;
  height: 19px;
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-switch[data-theme='light'] .theme-icon-sun,
.theme-switch[data-theme='dark'] .theme-icon-moon {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.theme-switch[data-theme='light'] .theme-icon-moon,
.theme-switch[data-theme='dark'] .theme-icon-sun {
  opacity: 0;
  transform: translateY(20px) scale(0.5);
}

@media (max-width: 700px) {
  .hero {
    border-radius: 18px;
    padding-top: 1.2rem;
  }

  .theme-switch-host {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .page {
    width: min(1120px, 94vw);
    padding: 68px 0 52px;
  }

  .hero {
    padding: 1.05rem;
    border-radius: 16px;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 11vw, 2.25rem);
    line-height: 1.08;
    max-width: 14ch;
  }

  .lead {
    margin-top: 14px;
    line-height: 1.6;
    font-size: 0.99rem;
  }

  .actions {
    flex-direction: column;
    gap: 10px;
  }

  .button {
    width: 100%;
    text-align: center;
    padding: 11px 14px;
  }

  .chips {
    gap: 8px;
    margin-top: 16px;
  }

  .chip {
    font-size: 0.68rem;
    padding: 6px 9px;
  }

  .theme-switch-host {
    top: 9px;
    right: 9px;
    padding: 3px;
  }

  .theme-switch {
    width: 32px;
    height: 32px;
  }
}

@media (min-width: 1280px) {
  .page {
    width: min(1180px, 91vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
