@font-face {
  font-family: Onest;
  src: url('/assets/onest.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: Unbounded;
  src: url('/assets/unbounded.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --bg: #f5f7fc;
  --ink: #142135;
  --muted: #53627b;
  --blue: #2254eb;
  --pale: #e5edff;
  --line: #ced8eb;
  --inverse: #dce7ff;
  --gutter: clamp(32px, 5.56vw, 80px);
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.4 Onest, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.wrap { width: min(1280px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.mobile { display: none; }

.header {
  display: grid;
  grid-template-columns: 48.8% 1fr 115px;
  align-items: start;
  gap: 0;
  padding-top: 35px;
}
.brand { justify-self: start; font-size: 21px; font-weight: 600; }
.header nav { display: flex; flex-wrap: wrap; gap: 4px clamp(16px, 2.8vw, 40px); }
.header nav a, .telegram { padding-block: 4px; font-size: 15px; }
.header nav a { color: var(--muted); }
.header nav a:hover { text-decoration: underline; }
.telegram { justify-self: start; color: var(--blue); font-weight: 500; }
.telegram:hover { text-decoration: underline; }

h1, h2 { font-family: Unbounded, sans-serif; font-weight: 600; }
h1 { margin-left: -4px; font-size: clamp(42px, 5vw, 72px); line-height: 1.18; }
h1 span { display: inline-block; margin-bottom: 4px; font-size: clamp(56px, 6.12vw, 88px); color: var(--blue); }
h2 { font-size: clamp(38px, 3.62vw, 52px); line-height: 1.3; }
.hero { padding-top: 68px; padding-bottom: 92px; }
.hero-grid { display: grid; grid-template-columns: 3fr 5fr; margin-top: 99px; }
.lead { font-size: 25px; font-weight: 500; line-height: 1.38; }
.intro-copy { color: var(--muted); font-size: 18px; line-height: 1.55; margin-top: 21px; }
.contact {
  display: inline-flex;
  align-items: center;
  width: min(280px, 100%);
  min-height: 56px;
  padding: 10px 20px;
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}
.contact:hover { background: #153dc0; }
.intro .contact { margin-top: 35px; }
.hint { margin-top: 19px; color: var(--muted); font-size: 14px; }

figure { min-width: 0; padding-top: 10px; }
.factory { position: relative; height: 370px; }
.connections { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.connections path { fill: none; stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.connections .feedback { stroke: var(--line); stroke-width: 1; }
.connections .branch { stroke: var(--muted); stroke-width: 1; }
.feedback-label { position: absolute; left: 57%; top: -16px; color: var(--muted); font-size: 12px; }
.stage {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 22.5%;
  height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  padding: 11px clamp(8px, 1.25vw, 17px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.stage strong { font-size: clamp(16px, 1.4vw, 20px); font-weight: 600; }
.stage small { font-size: 13px; color: var(--muted); }
.stage:hover { border-color: var(--blue); }
.stage:focus-visible { z-index: 1; }
.stage[data-factory-stage="task"] { --x: 0%; --y: 12px; }
.stage[data-factory-stage="context"] { --x: 25.875%; --y: 12px; }
.stage[data-factory-stage="work"] { --x: 51.75%; --y: 112px; }
.stage[data-factory-stage="review"] { --x: 75.875%; --y: 12px; }
.stage[data-factory-stage="result"] { --x: 75.875%; --y: 224px; }
.stage[data-factory-stage="creative"] { --x: 51.75%; --y: 256px; }
.stage.creative { height: 68px; background: var(--pale); border-color: transparent; border-radius: 12px; padding-block: 8px; gap: 2px; }
.stage.creative:hover { border-color: var(--blue); }
.stage.creative strong { font-size: clamp(13px, 1.11vw, 16px); font-weight: 500; }
.stage[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.stage[aria-pressed="true"] small { color: #fff; }
figcaption { margin-top: 32px; color: var(--muted); font-size: 14px; }
#factory-detail { display: block; min-height: 14px; color: var(--ink); }
#factory-detail:not(:empty) { margin-top: 8px; }

.session { border-top: 1px solid var(--line); padding-top: 77px; padding-bottom: 131px; }
.session-rows { margin-top: 28px; }
.session-row {
  display: grid;
  grid-template-columns: 51.7% 1fr;
  padding: 38px 0;
  min-height: 146px;
  border-bottom: 1px solid var(--line);
}
.session-row h3 { font-size: 25px; font-weight: 500; }
.session-row p { color: var(--muted); font-size: 18px; line-height: 1.6; }
.band { background: var(--blue); color: #fff; padding: 88px 0 73px; }
.band h2 { font-size: clamp(39px, 3.89vw, 56px); line-height: 1.4; }
.band p { margin: 39px 0 0 4px; color: var(--inverse); font-size: 19px; }

.about { display: grid; grid-template-columns: 37.5% 1fr; padding-top: 120px; }
.about img { display: block; width: min(370px, 90%); height: auto; margin-top: 10px; }
.about h2 { font-size: clamp(38px, 3.55vw, 51px); line-height: 1.35; }
.about p { margin-top: 46px; color: var(--muted); font-size: 20px; line-height: 1.6; }
.about p + p { margin-top: 32px; }
.faq { padding-top: 150px; padding-bottom: 135px; }
.faq h2 { font-size: clamp(36px, 3.34vw, 48px); }
.questions { margin-top: 44px; }
details { border-bottom: 1px solid var(--line); }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 85px;
  list-style: none;
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; width: 8px; height: 8px; margin-right: 5px; flex: none; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
details[open] summary::after { transform: rotate(225deg); }
details p { padding: 0 0 24px; color: var(--muted); max-width: 62ch; }
.closing { padding: 90px 0 70px; min-height: 550px; background: var(--pale); }
.closing h2 { font-size: clamp(40px, 3.82vw, 55px); line-height: 1.35; }
.closing p { margin-top: 30px; color: var(--muted); font-size: 19px; }
.closing .contact { margin-top: 58px; }
.footer { display: flex; align-items: start; gap: 20px; padding-top: 40px; padding-bottom: 68px; color: var(--muted); font-size: 15px; }
.footer-domain::before { content: '·'; margin-right: 20px; }
.footer-year { margin-left: auto; padding-right: 44px; }

@media (min-width: 901px) and (max-width: 1150px) {
  .hero-grid { grid-template-columns: 32% 1fr; gap: 16px; }
  .intro-copy br.wide, .session-row p br, .about p br { display: none; }
}

@media (max-width: 900px) {
  :root { --gutter: clamp(16px, 6.154vw, 32px); }
  .wrap { max-width: 540px; }
  .wide, .header nav { display: none; }
  .mobile { display: revert; }
  .header { grid-template-columns: 1fr 80px; padding-top: 27px; }
  .brand { font-size: 19px; }
  .telegram { font-size: 14px; }
  .hero { padding-top: 71px; padding-bottom: 0; }
  h1 { margin-left: -2px; font-size: clamp(26px, 8.72vw, 34px); line-height: 1.4; }
  h1 span { color: inherit; margin: 0; font-size: inherit; }
  h2 { font-size: clamp(26px, 8.72vw, 34px); line-height: 1.4; }
  .hero-grid { display: block; margin-top: 54px; }
  .lead { font-size: 23px; line-height: 1.4; }
  .intro-copy { font-size: 17px; line-height: 1.6; margin-top: 27px; max-width: 300px; }
  .contact { width: 100%; }
  .intro .contact { margin-top: 35px; }
  .hint { font-size: 13px; }
  figure { padding-top: 0; margin-top: 76px; }
  .factory { height: 535px; }
  .connections .mobile-feedback { stroke: var(--muted); stroke-width: 1.25; stroke-linecap: round; }
  .mobile-feedback-label { position: absolute; left: 69.59%; top: 235px; color: var(--muted); font-size: 12px; line-height: 1.2; }
  .stage { width: 67.2515%; height: 74px; padding: 10px clamp(10px, 4.36vw, 17px); }
  .stage strong { font-size: 20px; }
  .stage[data-factory-stage="task"] { --x: 0%; --y: 0px; }
  .stage[data-factory-stage="context"] { --x: 30.9942%; --y: 94px; }
  .stage[data-factory-stage="work"] { --x: 0%; --y: 188px; }
  .stage[data-factory-stage="review"] { --x: 30.9942%; --y: 282px; }
  .stage[data-factory-stage="result"] { --x: 0%; --y: 376px; }
  .stage[data-factory-stage="creative"] { --x: 32.7485%; --y: 461px; }
  .stage.creative { height: 64px; width: 52.6316%; padding: 8px clamp(8px, 4.1vw, 16px); }
  .stage.creative strong { font-size: clamp(13px, 3.85vw, 15px); }
  figcaption { margin-top: 48px; }
  .session { border-top: 0; padding-top: 117px; padding-bottom: 117px; }
  .session-rows { margin-top: 42px; }
  .session-row { display: block; padding: 41px 0 38px; min-height: 187px; }
  .session-row h3 { font-size: 21px; }
  .session-row p { margin-top: 24px; font-size: 16px; line-height: 1.65; }
  .band { padding: 54px 0 90px; }
  .band h2 { font-size: clamp(23px, 6.92vw, 27px); line-height: 1.5; }
  .band p { font-size: 17px; margin: 48px 0 0; }
  .about { display: block; padding-top: 110px; }
  .about img { width: 100%; margin: 0 0 53px; }
  .about h2 { font-size: clamp(26px, 8.72vw, 34px); line-height: 1.4; }
  .about p { font-size: 17px; line-height: 1.7; margin-top: 32px; }
  .about p + p { margin-top: 30px; }
  .faq { padding-top: 144px; padding-bottom: 158px; }
  .faq h2 { font-size: clamp(26px, 7.95vw, 31px); }
  .questions { margin-top: 39px; }
  summary { gap: 6px; min-height: 91px; font-size: 18px; }
  .closing { min-height: 560px; padding: 60px 0 65px; }
  .closing h2 { font-size: clamp(26px, 8.21vw, 32px); line-height: 1.4; }
  .closing p { font-size: 17px; margin-top: 53px; }
  .closing .contact { margin-top: 71px; }
  .footer { display: block; min-height: 200px; padding-top: 60px; font-size: 14px; }
  .footer span:first-child { display: block; }
  .footer-domain::before { content: none; }
  .footer-year::before { content: '·'; margin-inline: 18px; }
  .footer-year { padding: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .stage { transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
}
