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

:root {
  --bg: #09090b;
  --surface: #18181b;
  --surface-hover: #27272a;
  --border: #27272a;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --radius: 12px;
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f4f4f5;
  --surface-hover: #e4e4e7;
  --border: #e4e4e7;
  --text: #09090b;
  --text-muted: #71717a;
  --accent: #4f46e5;
  --accent-hover: #6366f1;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}

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

a:hover {
  color: var(--accent-hover);
}

/* ── Layout ── */

.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

/* ── Nav ── */

nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s;
}

[data-theme="light"] nav {
  background: rgba(255, 255, 255, 0.85);
}

nav .nav-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

nav .brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  justify-self: start;
}

nav .links {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-self: center;
}

nav .links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}

nav .links a:hover,
nav .links a.active {
  color: var(--text);
}

nav .controls {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}

/* ── Mobile nav toggle & menu ── */

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-left: 4px;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.nav-toggle .icon-hamburger {
  display: block;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.open .icon-hamburger {
  display: none;
}

.nav-toggle.open .icon-close {
  display: block;
}

.nav-menu {
  display: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

[data-theme="light"] .nav-menu {
  background: var(--surface);
}

.nav-menu.open {
  display: block;
}

.nav-menu-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 8px 16px 12px;
  display: flex;
  flex-direction: column;
}

.nav-menu-inner a {
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  padding: 14px 8px;
  border-bottom: 1px solid var(--border);
  display: block;
}

.nav-menu-inner a:last-child {
  border-bottom: none;
}

.nav-menu-inner a:hover {
  color: var(--accent);
}

.nav-menu-inner a.active {
  font-weight: 600;
  color: var(--accent);
}

/* ── Theme Toggle ── */

.theme-toggle {
  background: none;
  border: none;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  transition: color 0.15s;
  flex-shrink: 0;
}

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

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

:root .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

/* ── Language Switcher ── */

.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.lang-btn {
  background: none;
  border: none;
  border-radius: 8px;
  height: 34px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  transition: color 0.15s;
}

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

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

.lang-btn .lang-code {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  min-width: 160px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 100;
}

[data-theme="light"] .lang-dropdown {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  border-radius: 7px;
  transition: background 0.1s, color 0.1s;
}

.lang-option:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.lang-option.selected {
  color: var(--text);
  font-weight: 600;
}

.lang-option .opt-flag {
  font-size: 16px;
  line-height: 1;
}

/* ── Typography ── */

h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 8px;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 48px;
  margin-bottom: 12px;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 8px;
}

p,
li {
  color: var(--text-muted);
  font-size: 15px;
}

p + p {
  margin-top: 12px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 40px;
}

ul,
ol {
  padding-left: 20px;
  margin-top: 8px;
  margin-bottom: 12px;
}

li {
  margin-bottom: 6px;
}

/* ── FAQ ── */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}

.faq-item:hover {
  border-color: var(--surface-hover);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: inherit;
}

.faq-question::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  content: "\2212";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-answer-inner {
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.faq-answer-inner a {
  color: var(--accent);
}

/* ── Contact Card ── */

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-top: 40px;
  text-align: center;
}

.contact-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.contact-card p {
  margin-bottom: 16px;
}

.contact-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 10px;
  transition: background 0.15s, transform 0.1s;
}

.contact-btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .page {
    padding: 40px 16px 80px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 19px;
    margin-top: 36px;
  }

  h3 {
    font-size: 16px;
    margin-top: 24px;
  }

  p, li {
    font-size: 14px;
  }

  nav .nav-inner {
    padding: 12px 16px;
    gap: 10px;
  }

  nav .links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .faq-question {
    padding: 16px;
    font-size: 14px;
  }

  .faq-answer-inner {
    padding: 0 16px 16px;
    font-size: 13px;
  }

  .contact-card {
    padding: 24px 16px;
  }
}

@media (max-width: 420px) {
  nav .nav-inner {
    grid-template-columns: auto 1fr auto;
  }

  nav .brand {
    font-size: 16px;
  }

  nav .links {
    gap: 12px;
  }

  nav .links a {
    font-size: 12px;
  }

  .lang-btn .lang-code {
    display: none;
  }

  h1 {
    font-size: 23px;
  }

  .page {
    padding: 32px 14px 60px;
  }
}

@media (max-width: 340px) {
  nav .brand {
    display: none;
  }

  nav .nav-inner {
    grid-template-columns: 1fr auto;
  }
}
