:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-soft: #eef3fa;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --text: #17243a;
  --text-muted: #4f6484;
  --border: #d7e2f0;
  --border-strong: #c6d5e8;
  --shadow: 0 10px 28px rgba(19, 36, 65, 0.07);
  --accent: #315efb;
  --accent-2: #7a5cff;
  --accent-text: #ffffff;
  --ok-bg: #e8f8ed;
  --ok-border: #76ba89;
  --err-bg: #ffecec;
  --err-border: #d28888;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1424;
  --bg-soft: #121b2f;
  --surface: #172238;
  --surface-2: #1d2a43;
  --text: #ebf2ff;
  --text-muted: #a8bad8;
  --border: #2d3c59;
  --border-strong: #384b6d;
  --shadow: 0 12px 26px rgba(3, 8, 19, 0.45);
  --accent: #5f8dff;
  --accent-2: #8f74ff;
  --accent-text: #0c1730;
  --ok-bg: #133323;
  --ok-border: #1f6f44;
  --err-bg: #3a191d;
  --err-border: #8c3c44;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at 100% -20%, rgba(122, 92, 255, 0.18), transparent 36%),
    radial-gradient(circle at 0% 0%, rgba(49, 94, 251, 0.16), transparent 35%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.site-header .container {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.logo {
  color: var(--text);
  font-weight: 700;
  font-size: 1.04rem;
  white-space: nowrap;
}

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

.main-nav a {
  color: var(--text-muted);
  padding: 6px 8px;
  border-radius: 8px;
}

.main-nav a:hover {
  text-decoration: none;
  background: var(--surface);
  color: var(--text);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.lang-switch,
.theme-toggle {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  padding: 7px 10px;
  cursor: pointer;
  font: inherit;
  box-shadow: var(--shadow);
}

.lang-switch.active {
  background: var(--bg-soft);
  color: var(--text);
}

.theme-toggle {
  min-width: 120px;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-text);
  box-shadow: var(--shadow);
}

.btn.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

main {
  padding-top: 24px;
  padding-bottom: 56px;
}

.breadcrumbs {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: 0.93rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

section {
  width: 100%;
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  line-height: 1.25;
}

h1 {
  text-align: center;
}

p {
  margin: 0 0 10px;
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 22px;
  align-items: center;
}

.hero img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gap {
  gap: 12px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card h2,
.card h3 {
  margin-bottom: 4px;
}

.card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.steps {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  max-width: 840px;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.pricing-table th,
.pricing-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.pricing-table th {
  background: color-mix(in srgb, var(--surface-2) 70%, var(--accent) 8%);
}

.pricing-table tr:last-child td {
  border-bottom: none;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.filters label {
  display: grid;
  gap: 5px;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
}

.contact-form,
.admin-login,
.quiz {
  display: grid;
  gap: 10px;
}

.flash {
  border-radius: 10px;
  padding: 10px 12px;
  margin: 14px 0;
}

.flash.ok {
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
}

.flash.error {
  background: var(--err-bg);
  border: 1px solid var(--err-border);
}

.faq details {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.feature-img {
  width: min(860px, 100%);
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto 14px;
}

.image-btn {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.image-btn img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 18px 0;
}

.site-footer .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-footer .links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 12, 22, 0.65);
}

.modal.is-open {
  display: flex;
}

.modal-card {
  width: min(680px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 18px;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-wide {
  width: min(980px, 100%);
}

.modal-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

#modal-view-image {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

@media (max-width: 980px) {
  .site-header .container {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
  }

  .header-actions {
    justify-content: center;
  }
}

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

  .row {
    flex-wrap: wrap;
  }

  section {
    padding: 16px;
  }

  .site-footer .row {
    justify-content: center;
    text-align: center;
  }
}
