@font-face {
  font-family: Onest;
  src: url("assets/onest.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #151519;
  --panel: #212128;
  --sidebar: #1c1c22;
  --line: #383843;
  --ink: #f3f2f8;
  --muted: #b3b2c2;
  --violet: #7659f2;
  --violet-hover: #6649e0;
  --rail: 224px;
  --radius: 10px;
  font-family: Onest, system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; }
:focus-visible { outline: 2px solid #b3a3ff; outline-offset: 4px; }
:target { scroll-margin-block-start: 26px; }

.skip-link {
  position: fixed;
  z-index: 5;
  inset: 10px auto auto 12px;
  padding: 10px 16px;
  background: var(--panel);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.sidebar {
  position: fixed;
  z-index: 2;
  inset: 0 auto 0 0;
  width: var(--rail);
  padding: 29px 15px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  overflow-y: auto;
}

.identity {
  display: grid;
  gap: 5px;
  padding: 0 8px;
  margin-bottom: 27px;
  font-size: 15px;
  line-height: 1.35;
}
.identity strong { font-weight: 650; }
.identity span { color: var(--muted); font-size: 12px; }

.nav-group { display: grid; gap: 3px; }
.nav-secondary {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 17px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
}
nav a:hover,
body:where(:not(:has(:target)), :target) .nav-home,
body:has(#cases:target) .nav-cases,
body:has(#contact:target) .nav-contact {
  color: var(--ink);
  background: #2b2a36;
  border-color: #3b3948;
}
.nav-icon {
  width: 18px;
  text-align: center;
  color: #c4bbef;
  font-size: 16px;
}

.workspace { margin-inline-start: var(--rail); }
.shell {
  width: min(960px, calc(100% - clamp(40px, 10vw, 166px)));
  margin-inline: auto;
}

.hero { padding-block: 62px 53px; }
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 22px;
}
.hero h1 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(44px, 4.8vw, 69px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.01em;
}
.hero-role {
  margin-top: 36px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 630;
}
.hero-intro {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.48;
}
.hero-intro p { max-width: 31ch; font-size: 17px; }
.hero-intro span { text-align: right; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 640;
  line-height: 1.35;
  transition: background-color .15s ease, border-color .15s ease;
}
.button-primary {
  background: var(--violet);
  color: #fff;
  border-color: #957eff73;
}
.button-primary:hover { background: var(--violet-hover); }
.button-quiet {
  background: #19191f;
  border-color: var(--line);
}
.button-quiet:hover { background: #2b2936; }

.section-heading { padding-bottom: 17px; }
.section-heading h2 {
  font-size: 16px;
  font-weight: 660;
  line-height: 1.3;
  letter-spacing: .065em;
  text-transform: uppercase;
}
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}
.case {
  overflow: hidden;
  border: 1px solid #30303a;
  border-radius: var(--radius);
  background: var(--panel);
}
.case-visual {
  position: relative;
  height: clamp(178px, 18vw, 235px);
  overflow: hidden;
  isolation: isolate;
}
.kegel-visual {
  background: radial-gradient(ellipse at 50% 100%, #78616a, #3c303a 72%, #2c252e);
}
.phone {
  position: absolute;
  width: clamp(110px, 33%, 145px);
  height: auto;
  border: 3px solid #24242a;
  border-radius: 20px;
  box-shadow: 0 16px 30px #140e154d;
}
.phone-home {
  left: 50%;
  top: 22px;
  z-index: 1;
  transform: translateX(-86%) rotate(-8deg);
}
.phone-training {
  left: 50%;
  top: 50px;
  transform: translateX(-4%) rotate(10deg);
}

.ruwiki-visual {
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 53% 70%, #292442, #1c1a2b 78%);
}
.ruwiki-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(circle, #b1a5f237 1px, transparent 1.1px);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse, #000 24%, transparent 76%);
}
.flow {
  display: grid;
  justify-items: center;
  width: min(90%, 330px);
  font-size: 12px;
}
.flow-source, .flow-output {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid #494363;
  background: #27233b;
  border-radius: 6px;
}
.flow-source i, .flow-output i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a797e4;
}
.flow-output i { background: #c8b7ff; }
.flow-line { height: 12px; border-left: 1px solid #7f6db1; }
.flow-model {
  width: min(100%, 244px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #8f7ac5;
  border-radius: 8px;
  background: #403461;
  font-size: 14px;
}
.flow-model i {
  flex: 0 0 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #271c43;
  background: #c5b2ff;
  font-size: 19px;
  font-style: normal;
  line-height: 1;
}
.flow-model small {
  display: block;
  margin-top: 2px;
  color: #e0d7f7;
  font-size: 10px;
}

.case-body { padding: 17px 17px 0; }
.case-role {
  color: var(--muted);
  font-size: 11px;
  font-weight: 540;
  line-height: 1.4;
}
.case h3 {
  margin-block: 6px;
  font-size: clamp(21px, 2.6vw, 29px);
  font-weight: 660;
  line-height: 1.12;
  letter-spacing: -.015em;
}
.case-lead {
  max-width: 49ch;
  min-height: 2.84em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.metrics div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: start;
  gap: 5px;
}
.metrics dd {
  font-size: clamp(22px, 2.6vw, 31px);
  font-weight: 660;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.metrics dt {
  min-height: 2.64em;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.32;
}
details { margin-top: 13px; }
summary {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  border-top: 1px solid var(--line);
  padding-block: 8px;
  color: #d8ceff;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
summary::-webkit-details-marker { display: none; }
summary:hover { color: #fff; }
summary:focus-visible { outline-offset: -3px; }
.toggle-icon {
  position: relative;
  width: 24px;
  height: 24px;
  border: 1px solid #514b68;
  border-radius: 6px;
}
.toggle-icon::before, .toggle-icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 8px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.toggle-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
details[open] .toggle-icon::after { display: none; }
.case-details {
  padding-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.case-details ul { margin: 0; padding-inline-start: 16px; }
.case-details li + li { margin-top: 5px; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: #c8baff;
  font-size: 13px;
  font-weight: 650;
}
.text-link:hover { text-decoration: underline; }

.case-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 5fr 7fr;
}
.case-wide .case-visual { min-height: 207px; height: auto; }
.tvoi-visual {
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 52% 58%, #7c8186, #484864 75%);
}
.tvoi-visual img {
  position: absolute;
  width: min(78%, 275px);
  height: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.case-wide .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-wide.case-3metrics .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 54px;
  padding: clamp(20px, 4vw, 36px);
  background: #1e1d27;
}
.contact h2 {
  font-size: clamp(31px, 4vw, 50px);
  font-weight: 620;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.contact p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.44;
}
.contact-actions { display: grid; justify-items: end; gap: 9px; }
.email { font-size: 12px; color: var(--muted); }
.email:hover { text-decoration: underline; }
.footer {
  min-height: 66px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}
.footer a:hover { color: var(--ink); }

@media (max-width: 1080px) {
  :root { --rail: 194px; }
  .sidebar { padding-inline: 11px; }
  .shell { width: calc(100% - 54px); }
}

@media (max-width: 850px) {
  :target { scroll-margin-block-start: 118px; }
  .sidebar {
    position: sticky;
    inset: 0 0 auto;
    width: auto;
    padding: 12px max(18px, calc((100% - 702px) / 2)) 7px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .identity { display: flex; align-items: baseline; gap: 10px; padding: 0; margin-bottom: 6px; }
  .workspace { margin-inline-start: 0; }
  nav, .nav-group { display: flex; gap: 3px; }
  .nav-secondary { margin: 0; padding: 0; border: 0; }
  nav a { min-height: 37px; gap: 5px; padding-inline: 8px; font-size: 13px; }
  .nav-icon { width: auto; }
  .hero { padding-block: 38px; }
  .shell { width: min(702px, calc(100% - 36px)); }
  .case-visual { height: 206px; }
}
@media (max-width: 560px) {
  .identity span, .nav-icon, nav .nav-telegram { display: none; }
  .hero-top, .hero-intro { flex-direction: column; gap: 16px; }
  .hero-intro { margin-top: 13px; gap: 7px; }
  .hero-intro span { text-align: left; font-size: 14px; }
  .hero-role { margin-top: 23px; padding-bottom: 11px; }
  .hero { padding-block: 32px 34px; }
  .case-grid, .case-wide { grid-template-columns: 1fr; }
  .case-visual, .case-wide .case-visual { height: 198px; min-height: 0; }
  .case-lead { min-height: 0; }
  .metrics dd { font-size: clamp(24px, 7vw, 31px); }
  .metrics .metric-time { font-size: clamp(22px, 6.4vw, 29px); }
  .contact { flex-direction: column; align-items: start; margin-top: 38px; gap: 15px; }
  .contact-actions { justify-items: start; }
  .tvoi-visual img { width: min(70%, 235px); }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .button { transition: none; }
}

.case-note {
  margin-top: 14px;
  padding: 11px 12px;
  border-left: 2px solid #8e76f1;
  border-radius: 0 6px 6px 0;
  background: #282536;
}
.case-note h4 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 13px;
}

.editorial-visual {
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 48% 62%, #263e49, #192730 79%);
}
.editorial-process {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr) auto) minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: min(90%, 370px);
}
.editorial-process span {
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 7px 4px;
  border: 1px solid #557984;
  border-radius: 7px;
  color: #e1f8f8;
  background: #283e47;
  font-size: clamp(10px, 1.1vw, 13px);
  font-weight: 630;
  line-height: 1.23;
  text-align: center;
}
.editorial-process b {
  color: #9fc6d1;
  font-size: 14px;
  font-weight: 550;
}

.lona-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(13px, 3vw, 33px);
  padding: 14px;
  background: radial-gradient(ellipse at 44% 64%, #694250, #3c2939 76%);
}
.lona-visual img {
  width: clamp(72px, 24%, 110px);
  height: auto;
  border: 1px solid #b17c91;
  border-radius: 19%;
  box-shadow: 0 12px 26px #24132163;
}
.lona-path {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lona-path li {
  padding: 5px 10px;
  border: 1px solid #976b80;
  border-radius: 5px;
  color: #fff1f7;
  background: #4a2d3e;
  font-size: clamp(10px, 1.15vw, 13px);
}
