:root {
  color-scheme: light;
  --ink: #210665;
  --paper: #f7f5ff;
  --line: #ddd0fb;
  --radius: 18px;
  --gap: 16px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
body::before {
  content: "";
  position: absolute;
  inset: 0;
  min-height: 100%;
  background: #ad76ec url("assets/background-original.jpg") center / 100% 100% no-repeat;
  z-index: -1;
  pointer-events: none;
}
body { position: relative; isolation: isolate; min-height: 100vh; }
a { color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.page { width: min(1240px, calc(100% - 96px)); margin: 0 auto; padding: 70px 0 76px; }
h1 { font-size: clamp(2.15rem, 4.5vw, 4rem); font-weight: 800; line-height: 1.09; letter-spacing: -.045em; margin: 0 0 20px; }
.site-heading {
  width: fit-content;
  max-width: 100%;
  padding: 22px 30px;
  border: 1px solid #ffffffb3;
  border-left: 5px solid #7220db;
  border-radius: var(--radius);
  background: #ffffffd9;
  box-shadow: 0 8px 28px #4520780d;
  font-size: clamp(26px, 3.2vw, 46px);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.site-heading .title-prefix { display: block; }
.title-name { display: block; margin-top: 5px; color: inherit; }
.hero { display: grid; grid-template-columns: 1.55fr 1fr 1fr; grid-template-rows: repeat(2, minmax(208px, auto)); gap: var(--gap); }
.tile { border-radius: var(--radius); overflow: hidden; position: relative; isolation: isolate; }
.brand { grid-row: span 2; display: grid; place-items: center; background: #ece6ff; border: 1px solid #ffffff80; }
.brand::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("assets/background-desktop.png") center / 100% 100% no-repeat;
  opacity: .45;
}
.brand img { display: block; width: 91%; height: 91%; max-height: 410px; object-fit: contain; }
.link-tile { padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; text-decoration: none; color: #fff; border: 1px solid #ffffff1f; transition: transform .18s ease, box-shadow .18s ease; }
.link-tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("assets/background-desktop.png") right bottom / 165% auto no-repeat;
  opacity: .15; mix-blend-mode: screen;
  mask-image: linear-gradient(125deg, transparent 44%, #000);
}
.vk { background: #0657ed; }
.telegram { background: #7220db; }
.website { background: #4020ad; }
.max { background: linear-gradient(135deg, #ae0ed0, #8519bd); }
.service-icon { width: 76px; height: 76px; flex: none; }
.vk .service-icon { width: 89px; }
.telegram .service-icon { color: white; }
.telegram .service-icon use { fill: currentColor; }
.link-label { font-size: clamp(1.5rem, 2.45vw, 2rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.arrow { position: absolute; top: 25px; right: 25px; width: 28px; height: 28px; }
.link-tile[aria-disabled="true"] { cursor: default; }
.link-tile[href]:hover { transform: translateY(-3px); box-shadow: 0 10px 24px #39109026; }
.link-tile[href]:active { transform: translateY(0); }
a:focus-visible { outline: 3px solid #ff8a15; outline-offset: 5px; }
.contacts { display: grid; grid-template-columns: .95fr 1.75fr; gap: var(--gap); margin-top: var(--gap); }
.address-panel, .directory { background: #ffffffed; border: 1px solid #fff; box-shadow: 0 4px 25px #42289805; }
.address-panel { padding: 24px 28px; background: #f8f5ffed; }
h2 { font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1.1; letter-spacing: -.035em; margin: 0 0 18px; }
address { font-style: normal; }
.address-row { display: flex; gap: 16px; align-items: center; padding: 15px 0; font-size: 1rem; line-height: 1.4; }
.address-row + .address-row { border-top: 1px solid var(--line); }
.address-row p { margin: 0; min-width: 0; }
.icon-disc { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 50%; background: #e8defb; color: #3e1590; }
.icon-disc svg { width: 24px; height: 24px; }
.directory { list-style: none; margin: 0; padding: 12px 28px; display: flex; flex-direction: column; justify-content: center; }
.directory li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 13px 0; min-width: 0; }
.directory li + li { border-top: 1px solid var(--line); }
.directory .icon-disc { width: 40px; height: 40px; }
.department { font-size: 1rem; line-height: 1.35; }
.phone { text-decoration: none; font-size: clamp(1.1rem, 1.7vw, 1.45rem); font-weight: 800; letter-spacing: -.025em; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.phone:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 1500px) { .page { padding-top: 84px; } }
@media (max-width: 1100px) {
  .page { width: calc(100% - 64px); padding-top: 48px; }
  .hero { grid-template-rows: repeat(2, minmax(182px, auto)); grid-template-columns: 1.25fr 1fr 1fr; }
  .link-tile { padding: 24px; }
  .service-icon { width: 64px; height: 64px; }
  .vk .service-icon { width: 74px; }
  .contacts { grid-template-columns: 1fr 1.35fr; }
  .directory li { grid-template-columns: 40px minmax(0, 1fr); gap: 2px 14px; }
  .directory .icon-disc { grid-row: span 2; }
  .phone { grid-column: 2; font-size: 1.2rem; }
  .address-panel, .directory { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 700px) {
  :root { --gap: 12px; --radius: 15px; }
  .page { width: calc(100% - 32px); padding: 34px 0 40px; }
  h1 { font-size: clamp(1.75rem, 8.3vw, 3rem); text-align: center; letter-spacing: -.045em; line-height: 1.08; margin-bottom: 22px; }
  .title-prefix { display: block; }
  .site-heading { width: 100%; padding: 18px 16px; font-size: clamp(25px, 6.8vw, 34px); line-height: 1.15; letter-spacing: -.035em; }
  .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
  .brand { grid-row: auto; grid-column: 1 / -1; height: 230px; }
  .brand img { width: 232px; height: 232px; max-width: 95%; }
  .brand::before { opacity: .35; }
  .link-tile { min-height: 150px; padding: 20px; gap: 22px; }
  .service-icon { width: 53px; height: 53px; }
  .vk .service-icon { width: 61px; }
  .link-label { font-size: clamp(1.12rem, 5.1vw, 1.5rem); letter-spacing: -.035em; }
  .arrow { width: 21px; height: 21px; top: 17px; right: 16px; }
  .contacts { grid-template-columns: minmax(0, 1fr); }
  .address-panel { padding: 24px 22px 12px; }
  h2 { font-size: 2rem; margin-bottom: 10px; }
  .address-row { font-size: 1rem; gap: 13px; padding: 14px 0; }
  .directory { padding: 8px 22px; }
  .directory li { padding: 14px 0; }
  .department { font-size: 1rem; }
  .phone { font-size: 1.22rem; }
}
@media (max-width: 359px) {
  :root { --gap: 10px; }
  .page { width: calc(100% - 24px); }
  .link-tile { padding: 16px; min-height: 137px; }
  .address-panel, .directory { padding-left: 16px; padding-right: 16px; }
  .directory li { column-gap: 10px; }
  .phone { font-size: 1.12rem; }
}
@media (prefers-reduced-motion: reduce) { .link-tile { transition: none; } }
@media print {
  body::before { display: none; }
  .page { width: 100%; padding: 0; }
  .hero { break-inside: avoid; }
  .contacts { break-inside: avoid; }
  .link-tile { print-color-adjust: exact; }
}

