/* Визитка Артёма Ткаченко в стиле RESULTA «Highlight»: тёплая бумага, почти чёрные чернила, один оранжевый маркер.
   Раскладка: телефон — всё на одном экране (фото тянется под высоту, остальное сжимается по svh),
   подробности в шторках снизу (#help, #contacts). От 880px — фото слева, текст справа, шторки — панелью справа. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  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: "Geist";
  src: url("fonts/geist-cyrillic-wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  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";
  src: url("fonts/ibm-plex-mono-cyrillic-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Один светлый мир бренда: тёмной темы нет намеренно, все цвета заданы явно. */
:root {
  --paper: #f1f0eb;
  --ink: #111110;
  --ink-hover: #33322e;
  --grey: #5c5b55;
  --hair: #cfccc2;
  --signal: #ff4f1a;
  --signal-hover: #ff6a3d;
  --on-dark: #f1f0eb;
  --on-dark-grey: #a3a19a;
  --scrim: rgba(17, 17, 16, 0.55);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: 16px;
  --settle: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ── Экран визитки ─────────────────────────────────────── */
.screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 560px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  padding-top: max(16px, env(safe-area-inset-top, 0px));
}
.card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.7svh, 16px);
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}
/* Фото забирает всё свободное место по высоте: на коротком телефоне ужимается, на длинном растёт. */
.photo {
  flex: 1 1 0;
  min-height: 96px;
  max-height: 46svh;
  margin: 0;
  overflow: hidden;
  background: #d9d7cf;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  filter: grayscale(1) contrast(1.06) brightness(1.02);
}
.intro {
  flex: none;
  display: grid;
  gap: clamp(6px, 1.1svh, 10px);
  min-width: 0;
}

/* Метка: короткая чёрная черта + моно-подпись */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 500 12px/1.2 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 28px;
  height: 2px;
  background: currentColor;
}
.name {
  display: grid;
  margin: 0;
  font-weight: 820;
  font-size: clamp(34px, min(12.4vw, 7.1svh), 62px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.name-2 {
  padding-left: 0.42em;
}
.dot {
  color: var(--signal);
}
.nw {
  white-space: nowrap;
}
.sheet [tabindex="-1"]:focus {
  outline: none;
}
.role {
  margin: 0;
  max-width: 27ch;
  font-size: clamp(16px, min(4.9vw, 2.9svh), 21px);
  line-height: 1.26;
  font-weight: 560;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

/* Что получает клиент — одна строка под должностью */
.promise {
  margin: 0;
  max-width: 36ch;
  color: var(--grey);
  font-size: clamp(14px, min(3.9vw, 2.2svh), 16px);
  line-height: 1.4;
  text-wrap: pretty;
}

/* Жирное подчёркивание от руки: оранжевый мазок под ключевым словом, проводится при открытии */
.uline {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.uline-svg {
  position: absolute;
  left: -0.04em;
  top: 1.02em;
  width: calc(100% + 0.1em);
  height: 0.52em;
  overflow: visible;
  pointer-events: none;
  fill: var(--signal);
}
@media (prefers-reduced-motion: no-preference) {
  .uline-svg {
    animation: uline-draw 650ms var(--settle) 280ms both;
  }
}
@keyframes uline-draw {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* Направления: процессы, ERP и CRM, ИИ — одной строкой */
.areas {
  margin: 2px 0 0;
  font: 500 clamp(10.5px, 2.9vw, 12px)/1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.areas i {
  font-style: normal;
  margin: 0 0.5em;
  color: var(--signal);
}

/* ── Кнопки ───────────────────────────────────────────── */
.actions {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-wide {
  grid-column: 1 / -1;
}
.actions.has-wallet #btn-save {
  grid-column: auto;
}
.btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: clamp(46px, 6.6svh, 54px);
  min-width: 0;
  padding: 0 14px 1px;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: 650 16px/1.15 var(--font-sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease;
}
.btn:hover {
  background: var(--ink-hover);
  border-color: var(--ink-hover);
}
.btn > span {
  flex: 1;
  min-width: 0;
}
.btn-line {
  background: transparent;
  color: var(--ink);
}
.btn-line:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn-wallet {
  background: #000;
  border-color: #000;
}
.btn-signal {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
}
.btn-signal:hover {
  background: var(--signal-hover);
  border-color: var(--signal-hover);
}
.ico {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico .fill {
  fill: currentColor;
  stroke: none;
}
.arrow {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms var(--settle);
}
.btn:hover .arrow,
.row:hover .arrow {
  transform: translateX(4px);
}

/* ── Ряд «подробнее»: три входа в шторки ──────────────── */
.more {
  flex: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--hair);
}
.more-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 6px 6px;
  text-align: center;
  font: 620 14px/1.15 var(--font-sans);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.more-link + .more-link {
  border-left: 1px solid var(--hair);
}
.more-link:hover {
  background: rgba(17, 17, 16, 0.05);
}
.plus {
  flex: none;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 2.4;
  stroke-linecap: square;
}

/* ── Шторки ───────────────────────────────────────────── */
.sheet {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 88vh;
  max-height: 88svh;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet::backdrop {
  background: var(--scrim);
}
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] {
    animation: sheet-up 320ms var(--settle);
  }
  .sheet[open]::backdrop {
    animation: fade 240ms ease;
  }
}
@keyframes sheet-up {
  from {
    transform: translateY(32px);
    opacity: 0;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.sheet-in {
  display: grid;
  gap: 18px;
  max-width: 560px;
  margin-inline: auto;
  padding-top: 16px;
  padding-bottom: max(22px, env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.close svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

/* Список дел: маркером — что делаю я; без маркера, с меткой — остаётся у клиента */
.todo,
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--ink);
}
.todo li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 18px;
  line-height: 1.42;
  font-weight: 520;
}
.todo li > span:not(.box):not(.tag) {
  flex: 1;
  min-width: 0;
}
.box {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 1.5px solid var(--ink);
}
/* Мои пункты отмечены рукописной галочкой; пункт «ваше» остаётся пустым */
.box {
  position: relative;
}
.todo li:not(.yours) .box::after {
  content: "";
  position: absolute;
  inset: -7px -6px -1px -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff4f1a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13.5c2.2 1.2 4.1 3.2 5.8 6C11.6 13 15.6 7.6 22 2.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tag {
  flex: none;
  align-self: center;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1.5px solid var(--ink);
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cta {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 20px 18px 18px;
  background: var(--ink);
  color: var(--on-dark);
}
.cta :focus-visible {
  outline-color: var(--on-dark);
}
.cta-title {
  margin: 0;
  font-weight: 820;
  font-size: 30px;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.cta-text {
  margin: 0;
  color: var(--on-dark-grey);
  font-size: 16px;
  line-height: 1.5;
}
.cta .btn {
  align-self: stretch;
  justify-self: stretch;
}

.row {
  display: grid;
  grid-template-columns: 6.4em minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
}
.row-k {
  font: 500 12px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
}
.row-v {
  font-size: 17px;
  font-weight: 560;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}


/* ── Узкие телефоны ───────────────────────────────────── */
@media (max-width: 359.98px) {
  .btn {
    gap: 8px;
    padding: 0 10px 1px;
    font-size: 15px;
  }
  .row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .row-k {
    grid-column: 1 / -1;
  }
}

/* Место, имя и роль — одним блоком (на компьютере идут столбиком, на телефоне — справа от фото) */
.intro-head {
  display: grid;
  gap: inherit;
  min-width: 0;
}
.photo picture {
  display: contents;
}

/* ── Телефон: фото вертикальной карточкой слева, рядом плотный блок место → имя → роль.
   Ритм 8/12/16 px; весь запас высоты — одна пауза перед кнопками, кнопки внизу под пальцем
   (решение по разбору с Codex, 2026-11-19). ── */
@media (max-width: 879.98px) {
  .card {
    display: grid;
    --pw: clamp(116px, min(40vw, 25svh), 190px);
    grid-template-columns: var(--pw) minmax(0, 1fr);
    /* первая строка (фото) забирает свободную высоту; остаток, если фото упёрлось в предел, — поровну сверху и снизу */
    /* высота фото: от 4:5 до 1:2, но не больше, чем оставляет экран остальным блокам (~318px) */
    --ph: min(calc(var(--pw) * 2), calc(100svh - 318px));
    grid-template-rows: minmax(auto, var(--ph)) auto auto auto auto;
    align-content: center;
    column-gap: 12px;
    row-gap: 8px;
  }
  .intro {
    display: contents;
  }
  .photo {
    grid-area: 1 / 1;
    align-self: stretch;
    flex: none;
    width: 100%;
    height: auto;
    min-height: calc(var(--pw) * 1.25);
    max-height: var(--ph);
    aspect-ratio: auto;
  }
  .photo img {
    object-position: 50% 28%;
  }
  .intro-head {
    grid-area: 1 / 2;
    align-self: start;
    align-content: start;
    gap: 12px;
    container-type: inline-size;
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.07em;
  }
  .name {
    font-size: min(15.4cqi, 38px);
  }
  .name-1,
  .name-2 {
    white-space: nowrap;
  }
  .name-2 {
    padding-left: 0;
  }
  .role {
    max-width: none;
    font-size: clamp(15px, 2.6svh, 18px);
    line-height: 1.24;
    text-wrap: pretty;
  }
  .areas {
    grid-area: 2 / 1 / 3 / -1;
    margin: 8px 0 0;
  }
  .promise {
    grid-area: 3 / 1 / 4 / -1;
    max-width: none;
  }
  .actions {
    grid-area: 4 / 1 / 5 / -1;
    margin-top: 8px;
    gap: 6px;
  }
  .actions .btn {
    min-height: clamp(44px, 6.4svh, 48px);
    padding: 0 12px;
    gap: 10px;
  }
  .more {
    grid-area: 5 / 1 / 6 / -1;
  }
  .more-link {
    min-height: 44px;
  }
}

/* ── Низкие экраны телефона (iPhone SE в Safari): ужимаем кнопки, чтобы всё влезло без прокрутки ── */
@media (max-width: 879.98px) and (max-height: 600px) {
  .card {
    gap: 8px;
  }
  .photo {
    min-height: 64px;
  }
  .actions {
    gap: 6px;
  }
  .btn {
    min-height: 42px;
  }
  .more-link {
    min-height: 42px;
  }
}

/* ── Компьютер и планшет в альбомной ориентации ───────── */
@media (min-width: 880px) {
  :root {
    --gutter: clamp(24px, 4.4vw, 56px);
  }
  .screen {
    max-width: calc(1120px + 2 * var(--gutter));
  }
  .card {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-rows: auto auto auto;
    align-content: center;
    column-gap: clamp(36px, 5vw, 72px);
    row-gap: 22px;
    padding-bottom: 32px;
  }
  .photo {
    grid-row: 1 / 4;
    justify-self: end;
    width: auto;
    max-width: 100%;
    height: min(620px, calc(100vh - 140px));
    min-height: 0;
    max-height: none;
    aspect-ratio: 4 / 5;
  }
  .photo img {
    object-position: 50% 50%;
  }
  .intro {
    align-self: end;
    gap: 14px;
  }
  .name {
    font-size: clamp(54px, 6.4vw, 92px);
  }
  .role {
    font-size: clamp(20px, 1.9vw, 25px);
  }
  .actions,
  .more {
    max-width: 520px;
  }
  .more {
    align-self: start;
  }
  .promise {
    font-size: 17px;
  }
  .btn {
    min-height: 54px;
  }

  .sheet {
    inset: 0 0 0 auto;
    width: min(480px, 100%);
    height: 100%;
    max-height: 100%;
    border-top: 0;
    border-left: 1.5px solid var(--ink);
  }
  .sheet-in {
    padding: 28px 32px 32px;
  }
  @media (prefers-reduced-motion: no-preference) {
    .sheet[open] {
      animation: sheet-left 320ms var(--settle);
    }
  }
}
/* Невысокий ноутбук: компактнее, чтобы правая колонка не уходила под край */
@media (min-width: 880px) and (max-height: 700px) {
  .card {
    row-gap: 14px;
  }
  .intro {
    gap: 10px;
  }
  .name {
    font-size: clamp(48px, 5.4vw, 80px);
  }
  .btn {
    min-height: 46px;
  }
}
@keyframes sheet-left {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
}

/* ── Шторки без прокрутки: плотнее список и блок «Расскажите о задаче» ── */
.sheet-in {
  gap: clamp(10px, 2svh, 18px);
  padding-top: 12px;
}
.todo li {
  gap: 12px;
  padding: clamp(7px, 1.3svh, 12px) 0;
  font-size: clamp(15px, min(4.2vw, 2.5svh), 17px);
  line-height: 1.32;
}
.box {
  margin-top: 1px;
}
.cta {
  gap: clamp(6px, 1.2svh, 10px);
  padding: clamp(12px, 2svh, 18px) 16px;
}
.cta-title {
  font-size: clamp(22px, min(6.4vw, 3.8svh), 28px);
}
.cta-text {
  font-size: 14px;
  line-height: 1.4;
}
@media (max-width: 879.98px) {
  .sheet {
    max-height: calc(100svh - 16px);
  }
}
@media (max-width: 879.98px) and (max-height: 600px) {
  .cta-text {
    display: none;
  }
}

/* ── Телефон, вариант B (выбор Артёма 2026-11-19): CTA, Telegram и WhatsApp столбиком рядом с фото ── */
@media (max-width: 879.98px) {
  .card {
    --pw: clamp(120px, min(42vw, 26.5svh), 220px);
    grid-template-columns: var(--pw) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto auto auto auto;
    align-content: space-between;
    row-gap: clamp(8px, 1.3svh, 12px);
  }
  .actions { display: contents; }
  .btn[hidden] { display: none; }
  .photo { grid-area: 1 / 1 / 5 / 2; min-height: 0; max-height: none; align-self: stretch; }
  .intro-head { grid-area: 1 / 2; }
  #btn-cta { grid-area: 2 / 2; }
  #btn-telegram { grid-area: 3 / 2; }
  #btn-whatsapp { grid-area: 4 / 2; }
  .actions .btn { min-height: clamp(40px, 6.6svh, 52px); padding: 0 10px 1px; gap: 8px; font-size: clamp(13.5px, 3.9vw, 15px); }
  .actions .btn .arrow { display: none; }
  .actions .btn .ico { width: 19px; height: 19px; }
  .areas { grid-area: 5 / 1 / 6 / -1; margin: 4px 0 0; }
  .promise { grid-area: 6 / 1 / 7 / -1; }
  #btn-save { grid-area: 7 / 1 / 8 / -1; margin-top: 4px; min-height: clamp(44px, 6.6svh, 52px); font-size: 16px; }
  .more { grid-area: 8 / 1 / 9 / -1; }
  .more-link { min-height: clamp(44px, 6.6svh, 52px); }
  .actions .btn, #btn-save, .more, .more-link { align-self: start; }
  .more-link { align-self: stretch; }
  .areas { font-size: clamp(10.5px, 2.6vw, 13px); }
  .promise { font-size: clamp(14px, 2.3svh, 17px); }
}
@media (max-width: 879.98px) and (max-height: 600px) {
  .actions .btn { min-height: 40px; }
  #btn-save, .more-link { min-height: 42px; }
}
@media (max-width: 879.98px) and (max-width: 370px) {
  .card { --pw: clamp(120px, 38vw, 220px); }
  .actions .btn { font-size: 14px; padding: 0 8px 1px; gap: 6px; }
  .actions .btn .ico { width: 17px; height: 17px; }
}
