:root {
  --page: #f3f4f5;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --text: #161719;
  --muted: #666b72;
  --soft: #8c9197;
  --line: #e3e5e8;
  --red: #e30d1a;
  --red-dark: #bd0712;
  --telegram: #168bd2;
  --dingtalk: #087fa7;
  --shadow: 0 22px 60px rgba(25, 31, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 7% 0%, rgba(227, 13, 26, 0.08), transparent 30rem),
    radial-gradient(circle at 96% 90%, rgba(21, 24, 29, 0.045), transparent 34rem),
    var(--page);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.46;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24, 27, 31, 0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 27, 31, 0.027) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

img {
  max-width: 100%;
}

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

.page-shell {
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 30px 0 24px;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 68px;
  padding: 10px 12px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(227, 229, 232, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(25, 31, 38, 0.04);
}

.brand {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  transition: opacity 160ms ease;
}

.brand:hover {
  opacity: 0.72;
}

.brand img {
  display: block;
  width: 142px;
  height: auto;
  border-radius: 4px;
}

.portal-label {
  margin: 0;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #555a61;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 650;
}

.portal-label span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27a663;
  box-shadow: 0 0 0 4px rgba(39, 166, 99, 0.1);
}

main {
  flex: 1;
}

.welcome-card {
  min-height: 250px;
  margin-top: 18px;
  padding: clamp(28px, 4vw, 46px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 4vw, 42px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.welcome-copy {
  position: relative;
  z-index: 2;
}

.section-label {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 750;
}

h1,
h2 {
  margin: 0;
}

h1 {
  max-width: 650px;
  font-size: clamp(38px, 4.5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.welcome-text {
  max-width: 590px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.service-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 720;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.portal-logo {
  position: relative;
  width: 104px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-solid);
}

.portal-logo::before,
.portal-logo::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  pointer-events: none;
}

.portal-logo::before {
  width: 74%;
  aspect-ratio: 1;
  border: 1px solid rgba(227, 13, 26, 0.12);
}

.portal-logo::after {
  right: -12%;
  bottom: -18%;
  width: 48%;
  aspect-ratio: 1;
  background: rgba(227, 13, 26, 0.055);
}

.portal-logo img {
  position: relative;
  z-index: 1;
  width: 112%;
  max-width: none;
  transform: none;
}

.company-link {
  min-height: 44px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #555a61;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 680;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.company-link:hover {
  color: var(--text);
  border-color: #cfd2d6;
  transform: translateY(-2px);
}

.services {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

.service-card {
  min-height: 230px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(25, 31, 38, 0.055);
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-heading .section-label {
  margin-bottom: 5px;
}

.card-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--red);
  border: 1px solid rgba(227, 13, 26, 0.22);
  border-radius: 15px;
  background: rgba(227, 13, 26, 0.04);
  font-size: 12px;
  font-weight: 800;
}

h2 {
  font-size: 25px;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.card-description {
  margin: 21px 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.service-card > .service-button,
.support-buttons {
  margin-top: auto;
}

.service-button {
  padding: 0 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.service-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(25, 31, 38, 0.08);
}

.file-button {
  color: #fff;
  border-color: var(--text);
  background: var(--text);
}

.file-button:hover {
  background: #292b2f;
}

.support-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.telegram-button {
  color: #0879b9;
  border-color: rgba(22, 139, 210, 0.24);
  background: rgba(22, 139, 210, 0.045);
}

.dingtalk-button {
  color: #087894;
  border-color: rgba(8, 127, 167, 0.24);
  background: rgba(8, 127, 167, 0.045);
}

footer {
  padding: 24px 4px 0;
  color: var(--soft);
  font-size: 13px;
}

a:focus-visible {
  outline: 3px solid rgba(227, 13, 26, 0.28);
  outline-offset: 3px;
}

.js .welcome-card,
.js .service-card {
  opacity: 0;
  transform: translateY(8px);
}

.js.is-ready .welcome-card,
.js.is-ready .service-card {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease, transform 420ms ease;
}

.js.is-ready .service-card:nth-child(2) {
  transition-delay: 70ms;
}

@media (max-width: 840px) {
  .welcome-card {
    min-height: auto;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 22px;
  }

  .company-link {
    grid-column: 2;
    justify-self: start;
  }

  .services {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body::before {
    background-size: 42px 42px;
  }

  .page-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 12px;
  }

  .site-header {
    min-height: 62px;
    padding: 8px 9px 8px 12px;
    border-radius: 15px;
  }

  .brand img {
    width: 118px;
  }

  .portal-label {
    padding: 9px 10px;
    font-size: 11px;
  }

  .portal-label span {
    display: none;
  }

  .welcome-card {
    margin-top: 12px;
    padding: 24px 20px;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 17px;
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(30px, 9vw, 40px);
  }

  .welcome-text {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.58;
  }

  .portal-logo {
    width: 72px;
    border-radius: 16px;
  }

  .company-link {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .services {
    margin-top: 12px;
    gap: 12px;
  }

  .service-card {
    min-height: 224px;
    padding: 22px;
    border-radius: 19px;
  }

  .card-icon {
    width: 45px;
    height: 45px;
    border-radius: 13px;
  }

  h2 {
    font-size: 23px;
  }

  .support-buttons {
    grid-template-columns: 1fr;
  }

  .service-button {
    width: 100%;
  }

  footer {
    padding: 20px 3px 4px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
