:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #000000;
  --muted: rgba(0, 0, 0, 0.78);
  --shell-width: 960px;
  --shell-padding: clamp(24px, 3vw, 48px);
  --accent: #4d2bff;
}

html {
  height: 100%;
  scrollbar-gutter: stable both-edges;
}

@media (max-width: 1024px) {
  :root {
    --shell-padding: clamp(32px, 6vw, 60px);
  }
}

@media (max-width: 720px) {
  :root {
    --shell-padding: clamp(20px, 7vw, 32px);
  }
}

@media (max-width: 480px) {
  :root {
    --shell-padding: clamp(16px, 8vw, 24px);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  visibility: hidden;
}

body.is-ready {
  visibility: visible;
}

.site-shell {
  width: 100%;
  max-width: var(--shell-width);
  padding: 0 var(--shell-padding);
  margin: 0 auto;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px var(--shell-padding);
  width: 100%;
  max-width: 1200px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.site-logo {
  height: 48px;
}

.header-pages {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 28px);
  font-size: clamp(0.85rem, 1vw, 1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-pages a {
  color: var(--text);
  text-decoration: none;
  padding: 8px clamp(4px, 0.8vw, 8px);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(10, 101, 255, 0.4);
  outline-offset: 2px;
}

.nav-toggle-icon {
  width: 16px;
  height: 2px;
  background: currentColor;
  position: relative;
  border-radius: 999px;
  transition: transform 0.2s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-icon::before {
  top: -5px;
}

.nav-toggle-icon::after {
  top: 5px;
}

.site-header.nav-open .nav-toggle-icon {
  background: transparent;
}

.site-header.nav-open .nav-toggle-icon::before {
  transform: translateY(5px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-icon::after {
  transform: translateY(-5px) rotate(-45deg);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px var(--shell-padding) 72px;
  width: 100%;
  text-align: center;
}

.pages-nav {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.pages-nav[hidden] {
  display: none;
}

.pages-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 18, 35, 0.1);
  transition: background 0.2s ease, color 0.2s ease;
}

.pages-nav a:hover,
.pages-nav a:focus-visible {
  background: rgba(16, 18, 35, 0.05);
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 32px var(--shell-padding) 48px;
  text-align: center;
  color: rgba(0, 0, 0, 0.45);
  font-size: 0.8rem;
  width: 100%;
}

.footer-text {
  font-style: normal;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0.01em;
}

.footer-text .address-line {
  display: block;
}

.footer-text .address-line:first-child {
  font-weight: 600;
}

.footer-text .address-line + .address-line {
  margin-top: 2px;
}

.footer-text .address-line.is-registration {
  white-space: nowrap;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.footer-links a {
  color: rgba(0, 0, 0, 0.45);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: rgba(0, 0, 0, 0.7);
}

.accent {
  color: var(--accent);
}

.highlight {
  background: rgba(77, 43, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.hero a,
.subtitle a,
.page-body a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

body.home .hero {
  max-width: 1600px;
}

body.home h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 22px;
  letter-spacing: -0.015em;
}

body.home .subtitle {
  font-size: clamp(0.9rem, 1.7vw, 1.1rem);
  line-height: 1.55;
  color: var(--muted);
  margin: 0 auto;
  max-width: 820px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero-cta::after {
  content: "→";
  font-size: 1.05em;
  transition: transform 0.2s ease;
}

.hero-cta:hover {
  color: var(--text);
}

.hero-cta:hover::after {
  transform: translateX(3px);
}

body.page .main-content {
  text-align: center;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 32px var(--shell-padding) 72px;
}

.page-view {
  width: 100%;
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.page-view.active {
  display: block;
}

.page-view.is-visible {
  opacity: 1;
}

.hero.hide {
  display: none;
}

.page-content {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.page-body {
  text-align: left;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.78);
  font-size: 0.92rem;
}

.page-body h1 {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 1.6rem;
}

.page-body h2 {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
  margin: 2.4rem 0 0.8rem;
}

.page-body h1 + h2,
.page-body hr + h2 {
  margin-top: 0;
}

.page-body h3 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--text);
  margin: 2rem 0 0.6rem;
}

.page-body hr + h3,
.page-body h2 + h3 {
  margin-top: 0;
}

.page-body hr {
  border: none;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 1.6rem 0;
}

.page-body p {
  margin: 0 0 0.75rem;
}

.page-body ul {
  padding-left: 1.2rem;
  line-height: 1.45;
  margin: 0 0 0.75rem;
}

.page-body li {
  margin-bottom: 0.15rem;
}

.page-body li::marker {
  color: rgba(0, 0, 0, 0.25);
}

.page-body strong {
  font-weight: 600;
  color: var(--text);
}

.page-body a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(77, 43, 255, 0.3);
  text-decoration-line: underline;
  transition: text-decoration-color 0.2s ease;
}

.page-body a:hover {
  text-decoration-color: var(--accent);
}

.page-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px auto;
}

.team-panel {
  margin-top: 32px;
}

.team-grid {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.team-card {
  padding: 5px 20px 22px;
  border-radius: 32px;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 320px;
  gap: 2px;
}

.team-photo {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  object-fit: cover;
}

.team-info {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-name,
.team-role {
  display: block;
  line-height: 1.2;
  margin: 0;
}

.team-name {
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 2.2em;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.team-name span {
  display: block;
  line-height: 1.1;
}

.team-role {
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: normal;
}

.team-links {
  margin-top: auto;
  padding-top: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.team-link,
.page-body .team-link {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #0A66C2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0A66C2;
  text-decoration: none;
  font-weight: normal;
  transition: background 0.2s ease, color 0.2s ease;
}

.team-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.team-link:hover,
.team-link:focus-visible {
  background: rgba(0, 0, 0, 0.08);
}

@media (max-width: 1200px) {
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 960px) {
  .site-header {
    position: relative;
    padding-top: 24px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-pages {
    position: absolute;
    top: 100%;
    right: var(--shell-padding);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: auto;
    min-width: 140px;
    padding: 6px 0;
    background: var(--bg);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .site-header.nav-open .header-pages {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .header-pages a {
    width: 100%;
    text-align: left;
    padding: 8px 16px;
    font-size: 0.85rem;
    transition: background 0.15s ease;
  }

  .header-pages a:hover {
    background: rgba(0, 0, 0, 0.04);
  }

  .main-content {
    padding: 48px var(--shell-padding) 60px;
  }

  body.page .main-content {
    padding-top: 36px;
    text-align: left;
    align-items: stretch;
    justify-content: flex-start;
  }

  body.home .main-content {
    text-align: center;
    align-items: center;
    justify-content: center;
  }

  body.home .hero,
  .page-content {
    width: 100%;
  }

  body.home .pages-nav {
    justify-content: center;
  }

  body.home .subtitle {
    max-width: 720px;
  }
}

@media (max-width: 720px) {
  .site-logo {
    height: 28px;
  }

  body.home .subtitle {
    text-align: center;
    max-width: 100%;
  }

  body.home h1 {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    text-align: center;
  }

  .footer-text .address-line.is-registration {
    white-space: normal;
  }
}

@media (max-width: 600px) {
  .main-content {
    padding: 36px var(--shell-padding) 48px;
  }

  body.page .main-content {
    padding-top: 28px;
  }

  .pages-nav {
    flex-direction: column;
    width: 100%;
  }

  .pages-nav a {
    width: 100%;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 24px var(--shell-padding) 32px;
  }
}
