:root {
  --bg: #ffffff;
  --bg-hero: #ffffff;
  --bg-services: #f8faff;
  --hero-grid: rgba(6, 72, 248, 0.11);
  --hero-top: rgba(6, 72, 248, 0.08);
  --hero-bottom: rgba(6, 72, 248, 0.035);
  --text: #05070d;
  --muted: #4f5665;
  --soft: #f7f9fd;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --line: #e6eaf2;
  --blue: #0648f8;
  --blue-dark: #0034cc;
  --mint: #2cc89f;
  --lavender: #eceeff;
  --shadow: 0 18px 44px rgba(16, 45, 102, 0.1);
  --page: 1280px;
}

:root[data-theme="dark"] {
  --bg: #070a12;
  --bg-hero: #070a12;
  --bg-services: #0b101b;
  --hero-grid: rgba(132, 160, 255, 0.11);
  --hero-top: rgba(132, 160, 255, 0.09);
  --hero-bottom: rgba(84, 216, 181, 0.035);
  --text: #f7f9ff;
  --muted: #aab4c8;
  --soft: #101522;
  --surface: #0d1320;
  --surface-strong: #121a2a;
  --line: #202a3d;
  --blue: #84a0ff;
  --blue-dark: #a8b8ff;
  --mint: #54d8b5;
  --lavender: #252947;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, var(--page));
  min-height: 76px;
  margin: 0 auto;
  padding: 0 clamp(18px, 3.6vw, 54px);
  background: transparent;
  backdrop-filter: none;
}

.site-header::after {
  content: "";
  position: fixed;
  top: 75px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 clamp(38px, 5vw, 54px);
  width: clamp(38px, 5vw, 54px);
  height: clamp(38px, 5vw, 54px);
  overflow: hidden;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.brand-logo {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 54px;
  max-height: 54px;
  object-fit: contain;
}

.brand-name {
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  font-weight: 800;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  transition: opacity 180ms ease;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
  min-height: 46px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  transition: opacity 180ms ease;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0;
  transition: color 180ms ease;
}

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

.nav a.active {
  color: var(--blue);
}

.nav a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--blue);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.site-header.is-scrolled .brand {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
}

.site-header.is-scrolled .nav {
  opacity: 1;
}

.site-header.is-scrolled .theme-toggle {
  opacity: 1;
}

.site-header.is-scrolled .nav:hover,
.site-header.is-scrolled .theme-toggle:hover {
  opacity: 1;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  color: var(--blue);
}

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 19px;
  height: 19px;
}

.theme-toggle .sun-icon {
  opacity: 0;
  transform: scale(0.8);
}

.theme-toggle .moon-icon {
  opacity: 1;
  transform: scale(1);
}

:root[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 1;
  transform: scale(1);
}

:root[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 0;
  transform: scale(0.8);
}

.hero,
section {
  width: min(100%, var(--page));
  margin: 0 auto;
  padding-right: clamp(18px, 3.6vw, 54px);
  padding-left: clamp(18px, 3.6vw, 54px);
}

.hero {
  position: relative;
  overflow: hidden;
  max-width: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 76px);
  padding-top: clamp(46px, 6vw, 82px);
  padding-bottom: clamp(72px, 8vw, 118px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--hero-top) 0%, transparent 42%),
    linear-gradient(140deg, transparent 0%, transparent 48%, var(--hero-bottom) 100%),
    var(--bg-hero);
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-position: center top;
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 70%, transparent 100%);
  opacity: 0.34;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(3rem, 4.7vw, 4.55rem);
  font-weight: 800;
  line-height: 1.02;
}

.hero p {
  max-width: 680px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.32rem);
  line-height: 1.6;
}

.hero-about {
  max-width: 610px;
  margin-top: 14px;
  color: var(--text);
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 156px;
  min-height: 52px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  padding: 0 22px;
  font-size: 0.98rem;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 28px rgba(6, 72, 248, 0.18);
}

.button-primary:hover {
  background: var(--blue-dark);
}

.button-secondary {
  background: var(--surface);
  color: var(--blue);
}

section {
  padding-top: clamp(42px, 5.4vw, 72px);
  padding-bottom: clamp(42px, 5.4vw, 72px);
}

.services {
  max-width: none;
  width: 100%;
  background: var(--bg-services);
  border-bottom: 1px solid var(--line);
}

.services > * {
  width: min(100%, var(--page));
  margin-right: auto;
  margin-left: auto;
  padding-right: clamp(18px, 3.6vw, 54px);
  padding-left: clamp(18px, 3.6vw, 54px);
}

.section-heading h2,
.contact h2 {
  margin: 0;
  font-size: clamp(1.85rem, 2.7vw, 2.75rem);
  line-height: 1.1;
  font-weight: 800;
}

.section-heading p,
.contact p {
  max-width: 600px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.65;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.service-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 18px;
  min-height: 154px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.service-icon img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.service-icon > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 0;
  background: transparent;
  color: currentColor;
  font-size: 1.45rem;
  font-weight: 900;
}

.service-icon svg {
  width: 36px;
  height: 36px;
}

.ticket {
  color: var(--blue);
}

.server {
  color: #13a884;
}

.people {
  color: #5556ea;
}

.support {
  color: #0ea5e9;
}

.announcement {
  color: #f59e0b;
}

.staff {
  color: #7c3aed;
}

.escalation {
  color: #f43f5e;
}

.safety {
  color: #10b981;
}

.service-item h3,
.experience-grid h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.service-item p,
.experience-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.experience {
  max-width: none;
  width: 100%;
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.experience > * {
  width: min(100%, var(--page));
  margin-right: auto;
  margin-left: auto;
  padding-right: clamp(18px, 3.6vw, 54px);
  padding-left: clamp(18px, 3.6vw, 54px);
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.experience-grid article {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  min-height: 285px;
  padding: 24px 24px 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.experience-grid article:nth-child(3) {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, calc((100% - 20px) / 2));
}

.experience-logo {
  display: grid;
  place-items: center;
  min-height: 100%;
  border-radius: 0;
  background: transparent;
  border: 0;
  overflow: hidden;
}

.experience-logo img {
  width: 100%;
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
}

.experience-logo span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--blue);
  color: #fff;
  font-size: 1.7rem;
  font-weight: 800;
}

.experience-content {
  min-width: 0;
}

.experience-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.community-link {
  color: var(--text);
  transition: color 180ms ease;
}

.community-link:hover {
  color: var(--blue);
}

.experience-date {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.member-count {
  position: absolute;
  left: calc(24px + 112px + 22px);
  bottom: 34px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0;
  padding: 0 11px;
  border: 1px solid rgba(6, 72, 248, 0.14);
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 800;
}

.discord-button {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 7px;
  background: #788cdb;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(120, 140, 219, 0.22);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.discord-button:hover {
  transform: translateY(-2px);
  background: #667bd0;
  box-shadow: 0 16px 30px rgba(120, 140, 219, 0.28);
}

.discord-button img,
.discord-button .button-icon-fallback {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
}

.discord-button img {
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.button-icon-fallback {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 900;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(360px, 1fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
  margin-bottom: clamp(26px, 4vw, 52px);
  padding-top: clamp(42px, 5.4vw, 72px);
  padding-bottom: clamp(42px, 5.4vw, 72px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.contact-copy {
  max-width: 540px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.contact-card {
  display: grid;
  gap: 18px;
  min-height: 178px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 72, 248, 0.3);
  box-shadow: none;
}

.contact-card {
  padding: 20px;
}

.contact-logo {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 0;
  background: transparent;
}

.contact-logo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.contact-logo > span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
}

.contact-card strong,
.contact-card small {
  display: block;
}

.contact-card strong {
  font-size: 1.2rem;
  line-height: 1.2;
}

.contact-card small {
  margin-top: 8px;
  color: var(--blue);
  font-size: 0.98rem;
  font-weight: 800;
}

.discord-contact .contact-logo {
  background: transparent;
}

.telegram-contact .contact-logo {
  background: transparent;
}

.x-contact .contact-logo {
  background: transparent;
}

@media (min-width: 981px) {
  .services {
    min-height: calc(100vh - 68px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .service-list {
    gap: clamp(28px, 3.2vw, 46px);
    margin-top: clamp(36px, 4vw, 58px);
  }

  .service-item {
    min-height: clamp(178px, 18vh, 230px);
    padding: clamp(24px, 2.6vw, 36px);
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    min-height: auto;
    padding-top: 18px;
    padding-bottom: 16px;
  }

  .site-header::after {
    top: 100%;
  }

  .nav {
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 0.88rem;
  }

  .header-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .hero {
    min-height: 0;
    padding-top: 36px;
    padding-bottom: 52px;
  }

  .hero h1 {
    max-width: 660px;
    font-size: clamp(2.8rem, 9vw, 4.4rem);
  }

  .service-list,
  .experience-grid,
  .contact-links,
  .contact {
    grid-template-columns: 1fr;
  }

  .experience-grid article:nth-child(3) {
    grid-column: auto;
    width: 100%;
  }

  .service-list {
    gap: 16px;
  }

  .service-item {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 12px;
    flex-direction: column;
  }

  .brand {
    display: inline-flex;
  }

  .nav {
    justify-content: flex-start;
    width: auto;
    font-size: 0.76rem;
  }

  .nav a {
    min-height: 32px;
    padding: 0 10px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding-top: 28px;
    padding-bottom: 34px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 10vw, 3.05rem);
    line-height: 1.05;
  }

  .hero p {
    margin: 16px auto 0;
    font-size: 0.98rem;
  }

  .hero-actions {
    display: grid;
    margin-top: 22px;
  }

  .button {
    width: 100%;
    min-width: 0;
    min-height: 52px;
  }


  section {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .service-item {
    grid-template-columns: 58px 1fr;
    gap: 14px;
    padding: 16px;
  }

  .service-icon {
    width: 56px;
    height: 56px;
  }

  .service-icon img,
  .service-icon svg,
  .service-icon > span {
    width: 48px;
    height: 48px;
  }

  .experience-grid article {
    grid-template-columns: 86px 1fr;
    gap: 16px;
    min-height: 0;
    padding: 16px 16px 84px;
  }

  .member-count {
    left: 16px;
    bottom: 68px;
  }

  .discord-button {
    right: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
  }

  .experience-logo span {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    font-size: 1.35rem;
  }

  .contact {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .contact-card {
    min-height: 128px;
    grid-template-columns: 58px 1fr;
    align-items: center;
  }

  .member-count {
    display: none;
  }
}
