/* Шрифты хранятся на сайте, не на Google */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/plexmono-400-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/plexmono-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/plexmono-500-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/plexmono-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/onest-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/onest-symbols.woff2") format("woff2"); unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AE, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F8D0-1F8D8, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FAC6, U+1FAC8, U+1FACC-1FADD, U+1FADF-1FAEB, U+1FAEF-1FAFA, U+1FB00-1FBFF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/onest-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Кирилл Брус — сайт-портфолио */
:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6db;
  --ink: #1b1a17;
  --muted: #6b665c;
  --line: #d6cfc1;
  --accent: #c8471d;
  --f-main: "Onest", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-main);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 32px; height: 60px; }
.name { font-weight: 700; text-decoration: none; font-size: 17px; }
.menu { display: flex; gap: 24px; margin-left: auto; }
.menu a, .top-tg { text-decoration: none; font-size: 15px; color: var(--muted); }
.menu a:hover { color: var(--ink); }
.top-tg { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--accent); }

/* Первый экран */
.intro { padding: 90px 0 80px; }
.label { font-family: var(--f-mono); font-size: 14px; color: var(--accent); margin-bottom: 24px; }
.intro h1 { font-size: clamp(32px, 5vw, 60px); line-height: 1.1; font-weight: 600; max-width: 18em; }
.intro-bottom { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--ink); }
.intro-note { color: var(--muted); max-width: 30em; }
.intro-contacts li, .contact-list li { display: flex; gap: 18px; align-items: baseline; }
.intro-contacts li + li { margin-top: 6px; }
.intro-contacts span, .contact-list span { font-family: var(--f-mono); font-size: 13px; color: var(--muted); width: 80px; }
.intro-contacts a { font-size: 20px; font-weight: 600; text-decoration: none; }
.intro-contacts a:hover, .contact-list a:hover { color: var(--accent); }

/* Блоки */
.block { padding: 80px 0 40px; }
.block-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: baseline; padding-bottom: 20px; border-bottom: 1px solid var(--ink); margin-bottom: 8px; }
.block-head h2 { font-size: clamp(30px, 4vw, 44px); }
.block-head p { color: var(--muted); }

/* Работы */
.project { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center; padding: 56px 0 64px; border-bottom: 1px solid var(--line); }
.project:nth-of-type(even) .p-media { order: 2; }

.p-media { position: relative; padding: 0 9% 9% 0; }
.p-desk { display: block; text-decoration: none; border: 1px solid var(--ink); background: #fff; box-shadow: 8px 8px 0 var(--paper-2); }
.p-bar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--ink); background: var(--paper-2); font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.p-bar::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3f9d5a; }
.p-shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; container-type: inline-size; background: var(--paper-2); }
.p-shot img { position: absolute; top: 0; left: 0; width: 100%; height: auto; display: block; transition: transform 1.2s ease; }
.p-desk:hover .p-shot img, .p-desk:focus-visible .p-shot img { transform: translateY(calc(-100% + 62.5cqw)); transition: transform var(--dur, 10s) linear; }
.p-phone {
  position: absolute; right: 0; bottom: 0; width: 24%; height: auto; aspect-ratio: 390 / 844; object-fit: cover; object-position: top;
  border: 5px solid var(--ink); border-radius: 18px; background: #fff;
  box-shadow: 0 18px 40px -16px rgba(27, 26, 23, .45);
}

.p-text h3 { font-size: 30px; margin-bottom: 4px; }
.p-kind { font-family: var(--f-mono); font-size: 13px; color: var(--accent); margin-bottom: 18px; }
.p-text > p:not(.p-kind) { color: #3d3a34; }
.p-status { margin-top: 12px; padding: 10px 14px; background: var(--paper-2); font-size: 15px; }
.p-facts { margin-top: 20px; border-top: 1px solid var(--line); }
.p-facts li { position: relative; padding: 9px 0 9px 22px; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.p-facts li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 10px; height: 2px; background: var(--accent); }
.p-link { display: inline-block; margin-top: 22px; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); }
.p-link:hover { color: var(--accent); }

/* Как работаю */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.steps li { counter-increment: step; padding: 32px 32px 36px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--f-mono); font-size: 14px; color: var(--accent); margin-bottom: 14px; }
.steps h3 { font-size: 22px; margin-bottom: 10px; }
.steps p { color: #3d3a34; font-size: 16.5px; }

/* Что делаю */
.services > div { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.services dt { font-size: 22px; font-weight: 600; }
.services dd { color: #3d3a34; }

/* Контакты */
.contact { margin-top: 80px; padding: 80px 0 90px; background: var(--ink); color: var(--paper); }
.contact h2 { font-size: clamp(36px, 6vw, 72px); margin-bottom: 20px; }
.contact-note { color: #b9b3a6; max-width: 34em; margin-bottom: 48px; }
.contact-list li { padding: 18px 0; border-top: 1px solid #3a3730; }
.contact-list li:last-child { border-bottom: 1px solid #3a3730; }
.contact-list span { color: #8f897c; width: 110px; flex: none; }
.contact-list a { font-size: clamp(26px, 4vw, 44px); font-weight: 600; text-decoration: none; }

.foot { display: flex; justify-content: space-between; padding: 28px 0 36px; font-size: 14px; color: var(--muted); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Форма заявки */
.lead { margin-top: 64px; max-width: 760px; }
.lead h3 { font-size: 26px; margin-bottom: 24px; }
.lead-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lead label { display: block; margin-bottom: 20px; }
.lead label:not(.lead-agree) > span { display: block; font-family: var(--f-mono); font-size: 13px; color: #8f897c; margin-bottom: 8px; }
.lead input:not([type=checkbox]), .lead textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 17px; color: var(--paper);
  background: transparent; border: 1px solid #4a463d; border-radius: 0; resize: vertical;
}
.lead input:focus, .lead textarea:focus { outline: none; border-color: var(--paper); }
.lead-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead .lead-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #b9b3a6; }
.lead-agree a { color: var(--paper); }
.lead-agree input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.lead-send { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.lead button {
  padding: 14px 28px; font: inherit; font-weight: 600; color: #fff; background: var(--accent);
  border: 0; cursor: pointer;
}
.lead button:hover { filter: brightness(1.08); }
.lead button:disabled { opacity: .6; cursor: wait; }
.lead-status { font-size: 15px; color: #b9d7a8; }
.lead-status.is-error { color: #f0a58a; }

/* Страница 404 и политика */
.page { padding: 90px 0 80px; min-height: 60vh; }
.page h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.1; margin-bottom: 24px; }
.page p, .page li { color: #3d3a34; max-width: 42em; }
.page p + p, .page ul { margin-top: 14px; }
.page h2 { font-size: 22px; margin: 36px 0 10px; }
.page ul li { padding-left: 18px; position: relative; }
.page ul li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.page .p-link { margin-top: 32px; }

/* Адаптив */
@media (max-width: 900px) {
  .project { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 48px; }
  .project:nth-of-type(even) .p-media { order: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  body { font-size: 17px; }
  .wrap { width: calc(100% - 32px); }
  .menu { display: none; }
  .top-tg { margin-left: auto; }
  .intro { padding: 56px 0 56px; }
  .intro-bottom { grid-template-columns: 1fr; gap: 28px; margin-top: 44px; }
  .block { padding-top: 64px; }
  .block-head { grid-template-columns: 1fr; gap: 10px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { padding-right: 0; }
  .services > div { grid-template-columns: 1fr; gap: 6px; }
  .contact { padding: 64px 0 70px; }
  .contact-list li { flex-direction: column; gap: 4px; }
  .foot { flex-direction: column; gap: 8px; }
  .lead-row { grid-template-columns: 1fr; gap: 0; }
  .page { padding: 56px 0; }
  .p-phone { border-width: 3px; border-radius: 12px; width: 26%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .p-shot img { transition: none !important; }
}
