/* przz.ru — стили по DESIGN.md. Одна гарнитура, один акцент, тёмный фон. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  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 {
  --bg: #0a0a0a;
  --bg-2: #141414;
  --text: #e9e9e9;
  --text-2: #8a8a8a;
  --line: #262626;
  --accent: #4f7cff;
  --accent-2: #b14fff;
  --gutter: clamp(20px, 5vw, 80px);
  --gap: 24px;
  --section: clamp(96px, 14vw, 200px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; background: var(--bg-2); border-radius: 2px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---- шапка */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: var(--gap);
  padding: 20px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.nav-logo { font-weight: 500; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.nav nav { display: flex; gap: clamp(16px, 3vw, 40px); }
.nav nav a { font-size: 16px; color: var(--text-2); padding: 4px 0; transition: color .2s; white-space: nowrap; }
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--text); }

/* ---- общая раскладка */
main { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.section { margin-top: var(--section); }
.section > h2, .page-head h1 {
  font-size: clamp(36px, 5vw, 64px); line-height: 1; margin-bottom: clamp(40px, 5vw, 64px);
}
.page-head { padding-top: clamp(48px, 8vw, 120px); }
.page-head h1 { margin-bottom: 24px; }
.page-head .lead { max-width: 62ch; color: var(--text-2); }
.page-head .meta { margin-top: 8px; }
.lead { font-size: 18px; line-height: 1.55; max-width: 62ch; }
.meta { font-size: 14px; line-height: 1.4; color: var(--text-2); }
.meta span { margin: 0 .35em; opacity: .6; }
.more { margin-top: clamp(40px, 5vw, 64px); }

/* ---- hero */
.hero { position: relative; isolation: isolate; padding: clamp(64px, 12vw, 160px) 0 0; --mx: 30%; --my: 40%; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% -10%; pointer-events: none; z-index: -1;
  background: radial-gradient(600px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  transition: background-position .3s;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; will-change: transform; }
.hero h1 {
  font-size: clamp(50px, 8.4vw, 120px); line-height: 0.95; letter-spacing: -0.03em;
  max-width: 14em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shift 7s linear infinite;
}
@keyframes shift { to { background-position: 200% 0; } }
/* видео-луп на весь первый экран под тёмной маской; значения подобраны в песочнице (пресет «Как у Кати») */
.hero-with-video { padding-bottom: clamp(48px, 7vw, 96px); min-height: min(82vh, 820px); display: flex; flex-direction: column; justify-content: center; }
.hero-video { position: absolute; z-index: -1; pointer-events: none; overflow: hidden; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); }
.hero-video video {
  width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; display: block;
  filter: saturate(.7) brightness(.45) contrast(1.05);
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-video video.is-ready, .hero-video video.is-poster { opacity: 1; }
.hero-video::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,10,10,.78) 0%, rgba(10,10,10,.45) 45%, rgba(10,10,10,.15) 100%),
    linear-gradient(180deg, rgba(10,10,10,.7) 0%, transparent 25%, transparent 70%, rgba(10,10,10,1) 100%);
}
.hero-with-video h1, .hero-with-video .lead, .hero-with-video .pills { position: relative; z-index: 1; }
.hero-with-video .lead { color: var(--text); }
.hero .lead { margin-top: clamp(28px, 4vw, 48px); color: var(--text-2); }
.hero .btn { margin-top: 32px; }

/* ---- ссылка-кнопка */
.btn {
  display: inline-flex; align-items: center; gap: .35em;
  font-size: 18px; font-weight: 500; line-height: 1.3;
  text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px;
  text-decoration-color: var(--text-2);
  transition: text-decoration-color .2s;
}
.btn .arrow { width: .62em; height: .62em; flex: none; transition: transform .2s var(--ease); }
.btn:hover { text-decoration-color: var(--accent); }
.btn:hover .arrow { transform: translate(2px, -2px); }
.plain { color: var(--text-2); transition: color .2s; }
.plain:hover { color: var(--text); }

/* ---- сетка работ */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(40px, 5vw, 72px) var(--gap); }
.card { display: block; }
.card-img { overflow: hidden; border-radius: 2px; background: var(--bg-2); }
.card-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; transition: filter .2s; }
.card h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; line-height: 1.15; margin-top: 18px; text-wrap: pretty; }
.card .meta { margin-top: 8px; }
.card:hover img { filter: brightness(1.06); }
.card:hover h3 { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.card.is-hidden { display: none; }

/* ---- карточка на главной: коллаж + круглая кнопка */
.card-home .card-img { position: relative; }
.card-home .view {
  position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 18px; font-weight: 500;
  transition: transform .25s var(--ease), background .2s;
}
.view-eye { width: 30px; height: 24px; fill: currentColor; }
.card-home:hover .view { transform: scale(1.08); background: color-mix(in srgb, var(--accent) 85%, white); }
.card-home h3 { font-size: clamp(26px, 2.8vw, 40px); font-weight: 600; letter-spacing: -0.02em; margin-top: 20px; }
.card-home:hover h3 { text-decoration: none; }
@media (max-width: 480px) { .card-home .view { width: 104px; height: 104px; margin: -52px 0 0 -52px; font-size: 16px; } .view-eye { width: 26px; height: 21px; } }

/* ---- рубрикатор: пилюли */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.hero .pills { margin-top: 36px; }
.works .pills { margin-bottom: clamp(40px, 5vw, 64px); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.works .pills::-webkit-scrollbar { display: none; }
.pill {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-size: 14px; font-weight: 500; line-height: 1; padding: 10px 16px; letter-spacing: .01em;
  border: 1px solid var(--line); border-radius: 999px; color: var(--text);
  transition: border-color .2s, background .2s, color .2s;
}
.pill:hover { border-color: var(--text-2); }
.pill[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill:focus-visible { outline-offset: 2px; }
.pill-tool { border-style: dashed; }
.pill-tool[aria-pressed="true"] { border-style: solid; }

/* ---- направления (список) */
.services li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); padding: 28px 0; border-top: 1px solid var(--line); }
.services li:last-child { border-bottom: 1px solid var(--line); }
.services h3 { font-size: 28px; font-weight: 500; line-height: 1.15; text-wrap: pretty; }
.services p { color: var(--text-2); max-width: 62ch; }

/* ---- как работаю */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 64px) var(--gap); }
.process h3 { font-size: 28px; font-weight: 500; line-height: 1.15; margin-bottom: 16px; }
.process p { color: var(--text-2); }

/* ---- контакт и форма */
.contact-text { max-width: 62ch; margin-bottom: 24px; }
.contact-mail { margin-bottom: clamp(40px, 5vw, 64px); }

form.lead-form { max-width: 560px; font-size: 18px; }
.field { margin-bottom: 28px; }
.field label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: none;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 0;
  transition: border-color .2s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field.is-error input, .field.is-error textarea { border-color: #ff5f5f; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-2); line-height: 1.45; margin: 8px 0 28px; cursor: pointer; }
.consent input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.consent a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
form.lead-form button[type="submit"] {
  background: var(--text); color: var(--bg); font-weight: 500; font-size: 18px;
  padding: 14px 28px; border-radius: 4px; transition: opacity .2s;
}
form.lead-form button[type="submit"]:disabled { opacity: .35; cursor: not-allowed; }
.form-note { font-size: 14px; color: var(--text-2); min-height: 1.4em; margin-bottom: 12px; }
.form-note.is-error { color: #ff8a8a; }
.form-done {
  display: flex; gap: 20px; align-items: flex-start; max-width: 560px;
  padding: 28px 28px 28px 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2);
  animation: pop .45s var(--ease);
}
.form-done svg { flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--accent); color: #fff; }
.form-done h3 { font-size: 24px; font-weight: 600; line-height: 1.15; margin-bottom: 8px; }
.form-done p { color: var(--text-2); }
.form-done a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 480px) { .form-done { flex-direction: column; gap: 14px; padding: 22px 20px; } }
.contact-page { margin-top: 0; padding-top: clamp(48px, 8vw, 120px); }
.contact-page h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1; margin-bottom: clamp(40px, 5vw, 64px); }

/* ---- кейс */
.case .page-head h1 { font-size: clamp(36px, 5vw, 72px); line-height: 1.02; max-width: 16em; }
.case-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 4vw, 64px) clamp(32px, 5vw, 96px); margin-top: clamp(48px, 6vw, 96px); align-items: start; }
.case-text h2 { font-size: 14px; font-weight: 400; color: var(--text-2); margin-bottom: 12px; letter-spacing: 0; }
.case-text p { text-wrap: pretty; }
.case-brief { display: grid; gap: clamp(24px, 3vw, 40px); }
.case-done ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.case-done li { position: relative; padding-left: 28px; text-wrap: pretty; }
.case-done li::before { content: ''; position: absolute; left: 0; top: .62em; width: 14px; height: 2px; background: var(--accent); border-radius: 2px; }
.case-result { margin-top: 24px; padding: 18px 22px; border-radius: 16px; background: color-mix(in oklab, var(--accent) 12%, transparent); border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); }
.case-result strong { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2, var(--accent)); margin-bottom: 6px; }
.case-images { margin-top: clamp(64px, 8vw, 120px); display: grid; gap: var(--gap); }
.case-images figure { margin: 0; }
.case-images img { width: 100%; }
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.case-grid.case-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.case-note { color: var(--text-2); font-size: 15px; margin: 0 0 16px; max-width: 60ch; text-wrap: pretty; }
.case-grid-mixed figure:nth-child(7), .case-grid-mixed figure:nth-child(n+8) { grid-column: 1 / -1; }
.case-grid figure:last-child:nth-child(odd):not(.case-grid-mixed figure) { grid-column: 1 / -1; width: calc((100% - var(--gap)) / 2); justify-self: center; }
.emails { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: var(--gap); align-items: start; }
.email { margin: 0; }
.email img { width: 100%; height: auto; display: block; border: 1px solid #ffffff12; }
.email-clip { max-height: 1000px; overflow: hidden; position: relative; transition: max-height .6s var(--ease); }
.email-clip::after { content: ''; position: absolute; inset: auto 0 0; height: 160px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; transition: opacity .3s; }
.email.is-open .email-clip { max-height: none; }
.email.is-open .email-clip::after { opacity: 0; }
.email-toggle { margin-top: 16px; }
.case-nav { margin-top: clamp(64px, 8vw, 120px); display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: baseline; }

/* ---- плавающая панель кейса: появляется после прокрутки; контрастные кнопки на любом фоне */
.case-tools {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 40;
  width: min(930px, calc(100% - 40px)); display: flex; gap: 12px;
  transform: translate(-50%, 16px); opacity: 0; visibility: hidden;
  transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.case-tools.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.case-tool {
  flex: 1 1 0; min-width: 0; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.2;
  color: #fff; border: 2px solid #fff; box-shadow: 0 6px 28px rgba(0, 0, 0, .6);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.case-tool svg { width: 18px; height: 18px; flex: none; }
.case-tool .l-narrow { display: none; }
.case-tool.top { background: linear-gradient(110deg, var(--accent-2) 0%, var(--accent) 100%); border-color: #b797ff; }
.case-tool.home { background: #181b2a; border-color: #9a9fb5; }
.case-tool.next { background: #3454d1; }
.case-tool:hover { border-color: #fff; box-shadow: 0 6px 28px rgba(0, 0, 0, .7), 0 0 0 2px rgba(168, 148, 255, .4); }
.case-tool.top:hover { background: linear-gradient(110deg, #7134c8, #2545cc); }
.case-tool.home:hover { background: #593bd1; }
.case-tool.next:hover { background: #192b82; }
.case-tool:focus-visible { outline: 3px solid #8198ff; outline-offset: 3px; }
body:has(.case-tools) .footer { padding-bottom: 110px; }
@media (max-width: 600px) {
  .case-tools { width: auto; left: 12px; right: 12px; transform: translateY(16px); gap: 6px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .case-tools.is-visible { transform: none; }
  .case-tool { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 11px; min-height: 58px; text-align: center; }
  .case-tool svg { width: 17px; height: 17px; }
  .case-tool .l-wide { display: none; }
  .case-tool .l-narrow { display: inline; }
}

/* ---- ссылки на резюме («Обо мне») */
.resume-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.resume-link {
  display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 104px; padding: 10px;
  border-radius: 16px; font-size: 14px; color: var(--text); transition: background .2s, color .2s, transform .2s var(--ease);
}
.resume-link svg { width: 64px; height: 64px; }
.resume-link:hover { background: var(--bg-2); color: var(--accent); transform: translateY(-2px); }
@media (max-width: 600px) { .resume-links { gap: 8px; margin-top: 24px; } .resume-link svg { width: 56px; height: 56px; } }

/* ---- обо мне */
.about-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--gap); align-items: end; }
.about-photo { margin: 0; }
.about-photo img { width: 100%; max-width: 420px; justify-self: end; border-radius: 2px; }
@media (max-width: 899px) { .about-head { grid-template-columns: 1fr; } .about-photo { order: -1; } .about-photo img { max-width: 70vw; } }
.about .page-head h1 { font-size: clamp(50px, 8vw, 120px); line-height: .95; letter-spacing: -0.03em; }
.about-sec { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); padding: clamp(32px, 4vw, 56px) 0; border-top: 1px solid var(--line); }
.about .page-head + .about-sec { margin-top: clamp(48px, 6vw, 96px); }
.about-sec h2 { font-size: 28px; font-weight: 500; line-height: 1.15; }
.about-sec p { max-width: 62ch; }
.about-sec p + p { margin-top: 1em; }
.about-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 62ch; }
.about-list li { position: relative; padding-left: 28px; text-wrap: pretty; }
.about-list li::before { content: ''; position: absolute; left: 0; top: .62em; width: 14px; height: 2px; background: var(--accent); border-radius: 2px; }
.about-list b { font-weight: 600; color: var(--text); }
.exp { width: 100%; border-collapse: collapse; font-size: 16px; }
.exp td { padding: 10px 0; vertical-align: top; border-top: 1px solid var(--line); }
.exp tr:first-child td { border-top: 0; padding-top: 0; }
.exp td:first-child { width: 7em; color: var(--text-2); white-space: nowrap; }
.exp td:nth-child(2) { padding-right: var(--gap); width: 40%; }
.exp td:last-child { color: var(--text-2); }
.plain-list li + li { margin-top: 8px; }
.about .more { padding-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line); margin-top: 0; }

/* ---- политика */
.policy { max-width: 72ch; }
.policy h2 { font-size: 22px; font-weight: 500; margin: 48px 0 16px; }
.policy p { margin-bottom: 12px; color: var(--text); }

/* ---- подвал */
.footer {
  max-width: 1440px; margin: var(--section) auto 0; padding: 32px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; gap: 8px 32px;
  font-size: 14px; color: var(--text-2); border-top: 1px solid var(--line);
}
.footer a:hover { color: var(--text); }

/* ---- адаптив */
@media (max-width: 899px) {
  .grid, .process, .case-text, .case-grid { grid-template-columns: 1fr; }
  .case-grid.case-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services li, .about-sec { grid-template-columns: 1fr; gap: 10px; }
  .case-grid figure:nth-child(n) { grid-column: auto; width: auto; }
  .exp td:nth-child(2) { width: auto; }
  .exp tr { display: grid; grid-template-columns: 7em 1fr; }
  .exp td { border-top: 0; padding: 4px 0; }
  .exp td:last-child { grid-column: 2; padding-top: 0; padding-bottom: 14px; }
  .exp tr + tr td:first-child, .exp tr + tr td:nth-child(2) { border-top: 1px solid var(--line); padding-top: 14px; }
  .exp tr + tr td:last-child { padding-top: 0; }
  .nav nav a { font-size: 15px; }
}
@media (max-width: 480px) {
  body { font-size: 17px; }
  .nav { padding: 16px var(--gutter); gap: 12px; }
  .nav-logo { font-size: 15px; }
  .nav nav { gap: 12px; }
  .nav nav a { font-size: 14px; }
  .services h3, .process h3, .about-sec h2 { font-size: 24px; }
  .card h3 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s; animation-duration: 0s; }
  .hero h1 em { animation: none; }
}
