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

:root {
  --black: #111;
  --yellow: #f5c518;
  --gray: #888;
  --light: #fafafa;
  --white: #fff;
  --green: #34c759;
  --red: #ff3b30;
  --orange: #ff9500;
  --border: #eee;
  --nav-bg: rgba(255, 255, 255, 0.95);
}

html.dark {
  --black: #f0f0f0;
  --gray: #9a9a9a;
  --light: #1e1e1e;
  --white: #111;
  --border: #2a2a2a;
  --nav-bg: rgba(17, 17, 17, 0.92);
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* LANGUAGE */
html.lang-en .lang-ru,
html.lang-ru .lang-en {
  display: none !important;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(136, 136, 136, 0.1);
  border-radius: 999px;
  padding: 3px;
  margin-left: 24px;
}

.lang-btn {
  border: none;
  min-width: 38px;
  height: 28px;
  border-radius: 999px;
  background: transparent;
  color: var(--gray);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-btn.is-active {
  background: var(--black);
  color: var(--white);
}

/* THEME TOGGLE */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 12px;
  border: none;
  border-radius: 50%;
  background: rgba(136, 136, 136, 0.1);
  color: var(--gray);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  color: var(--black);
  background: rgba(136, 136, 136, 0.18);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 18px;
  height: 18px;
}

html:not(.dark) .theme-toggle .icon-sun {
  display: none;
}

html.dark .theme-toggle .icon-moon {
  display: none;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
}

nav .logo {
  display: flex;
  align-items: center;
}

.logo-light,
.logo-dark {
  height: 28px;
}

.logo-dark {
  display: none;
}

html.dark .logo-light {
  display: none;
}

html.dark .logo-dark {
  display: block;
}

nav .nav-links {
  display: flex;
  align-items: center;
}

nav .nav-links a {
  color: var(--black);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  margin-left: 32px;
  transition: color 0.2s;
}

nav .nav-links a:hover {
  color: var(--gray);
}

nav a {
  text-decoration: none;
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition:
    transform 0.3s,
    opacity 0.3s;
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* FOOTER */
footer {
  padding: 48px;
  font-size: 13px;
  color: var(--gray);
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--black);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

footer a:hover {
  color: var(--yellow);
}

/* PAGE HEADER */
.page-header {
  padding: 140px 48px 64px;
  max-width: 800px;
}

.page-header h1 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.5px;
}

.page-header p {
  margin-top: 16px;
  font-size: 16px;
  color: var(--gray);
  line-height: 1.6;
}

.page-content {
  padding: 0 48px 120px;
  max-width: 800px;
}

/* MOBILE */
@media (max-width: 768px) {
  nav {
    padding: 16px 20px;
  }

  .burger {
    display: flex;
  }

  nav .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 8px 20px 24px;
    border-bottom: 1px solid var(--border);
  }

  nav .nav-links.open {
    display: flex;
  }

  nav .nav-links a {
    margin-left: 0;
    padding: 12px 0;
    font-size: 16px;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

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

  .lang-switch {
    margin-left: 0;
    margin-top: 8px;
    align-self: flex-start;
  }

  .theme-toggle {
    margin-left: 8px;
    margin-top: 8px;
    align-self: flex-start;
  }

  .page-header {
    padding: 100px 20px 40px;
  }

  .page-content {
    padding: 0 20px 80px;
  }

  footer {
    padding: 32px 20px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* COOKIE CONSENT */
#cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  z-index: 200;
  animation: slideUp 0.3s ease;
}

#cookie-consent.cookie-hidden {
  animation: slideDown 0.3s ease forwards;
}

.cookie-text {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.5;
}

.cookie-text a {
  color: var(--black);
  text-decoration: underline;
}

#cookie-accept {
  flex-shrink: 0;
  border: none;
  background: var(--black);
  color: var(--white);
  padding: 8px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

#cookie-accept:hover {
  opacity: 0.8;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

@media (max-width: 768px) {
  #cookie-consent {
    padding: 16px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}
