/* Страница входа в духе attio.com: белый лист с мягким серым ореолом, плашка «Новое», огромный плотный заголовок
   по центру, две кнопки и один большой скриншот продукта на тонкой сетке. Второй экран — форма входа. */
:root {
  --ink: #1f2023;
  --text: #3f4247;
  --muted: #6e7178;
  --line: #ececee;
  --line-2: #dedfe3;
  --soft: #f3f3f4;
  --blue: #266df0;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--text); font: 16px/1.55 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2 { color: var(--ink); margin: 0; }

/* Кнопки — как у Attio: тёмная с мягким объёмом и светлая с тонкой рамкой */
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; padding: 10px 18px; background: var(--ink); color: #fff; font: inherit; font-size: 15.5px; font-weight: 500; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(16, 24, 40, 0.3), 0 0 0 1px #000; transition: filter 0.15s, transform 0.1s; white-space: nowrap; }
.btn:hover { filter: brightness(1.25); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(16, 24, 40, 0.05); }
.btn.ghost:hover { filter: none; background: #fafafa; }
.btn.big { padding: 14px 24px; font-size: 17px; border-radius: 13px; }

/* Шапка */
.top { position: relative; z-index: 2; max-width: 1400px; margin: 0 auto; padding: 18px 28px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 48px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); letter-spacing: -0.02em; min-width: 0; }
.brand-logo { display: block; height: 34px; width: auto; }
.auth-card { background: #fff; border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 24px 60px -28px rgba(16, 24, 40, 0.25); overflow: hidden; }
.auth-card .login { border: 0; border-radius: 0; box-shadow: none; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); background: var(--soft); }
.auth-tab { border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500; padding: 13px 10px; color: var(--muted); cursor: pointer; }
.auth-tab[aria-selected="true"] { color: var(--ink); background: #fff; box-shadow: inset 0 -2px 0 var(--ink); }
.agree { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; line-height: 1.45; }
.agree a { text-decoration: underline; text-underline-offset: 2px; }
.root-link { display: block; padding: 10px 14px 12px; text-align: center; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--soft); }
.root-link:hover { color: var(--ink); }
.register-link { display: block; margin-top: 14px; text-align: center; font-size: 14.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.register-link:hover { color: var(--ink); }
.foot-about { display: grid; gap: 6px; }
.foot-about p { margin: 0; }
.foot-about a:not(.foot-brand) { color: var(--muted); }
.foot-brand img { display: block; height: 20px; width: auto; opacity: .85; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
.top-nav { display: flex; gap: 34px; font-size: 16px; font-weight: 500; color: var(--text); }
.top-nav a:hover { color: var(--ink); }
.top-actions { display: flex; gap: 12px; }
.short { display: none; }

/* Хлебные крошки и ссылки по сайту */
.crumbs { position: relative; z-index: 2; max-width: 1400px; margin: 0 auto; padding: 0 28px 6px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.crumbs li + li::before { content: '›'; margin-right: 6px; color: var(--line-2); }
.crumbs li[aria-current] { color: var(--ink); font-weight: 500; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* Экран 1 */
html, body { overflow-x: clip; }
main { position: relative; overflow-x: clip; }
main::before { content: ''; position: absolute; left: 50%; top: -140px; width: 1500px; height: 1100px; transform: translateX(-50%); background: radial-gradient(closest-side, #f4f4f5 0%, #f7f7f8 55%, rgba(255, 255, 255, 0) 100%); z-index: -1; pointer-events: none; }
.hero { max-width: 1200px; margin: 0 auto; padding: clamp(56px, 11vh, 128px) 24px 44px; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 15px; font-weight: 500; transition: background 0.15s; }
.pill:hover { background: #ebebed; }
.pill-tag { flex: none; background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 14px; }
.pill-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { max-width: 100%; }
.pill-arrow { flex: none; font-size: 20px; line-height: 1; color: var(--muted); margin-top: -2px; }
h1 { margin-top: 36px; font-size: clamp(44px, 7.6vw, 112px); line-height: 0.98; font-weight: 700; letter-spacing: -0.055em; text-wrap: balance; }
.sub { max-width: 760px; margin: 30px auto 0; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.45; color: var(--text); text-wrap: balance; }
.cta { display: flex; gap: 14px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }

/* Скриншот на сетке тонких линий */
.stage { position: relative; max-width: 1400px; margin: 0 auto; padding: 32px 28px 0; }
.grid-lines { position: absolute; inset: 0 28px; display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); pointer-events: none; }
.grid-lines i { border-left: 1px solid var(--line); }
.grid-lines i:last-child { border-right: 1px solid var(--line); }
.shot { position: relative; margin: 0 auto; max-width: 1180px; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 30px 80px -24px rgba(16, 24, 40, 0.22); -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
.shot img { display: block; width: 100%; height: auto; }

/* Экран 2: вход */
.login-screen { max-width: 1080px; margin: 0 auto; padding: 72px 24px 96px; min-height: 78vh; display: grid; grid-template-columns: 1fr 420px; gap: 64px; align-items: center; }
.login-copy h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.02; font-weight: 700; letter-spacing: -0.045em; }
.login-copy p { font-size: 18px; color: var(--text); margin: 18px 0 22px; max-width: 46ch; }
.login-copy ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: 15px; }
.login-copy li { display: flex; gap: 10px; align-items: center; }
.login-copy li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); flex: none; }
.login { background: #fff; border: 1px solid var(--line-2); border-radius: 18px; padding: 26px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 24px 60px -28px rgba(16, 24, 40, 0.25); }
.login label { display: block; margin-bottom: 14px; }
.login label span { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.login input { width: 100%; border: 1px solid var(--line-2); border-radius: 11px; padding: 12px 14px; font: inherit; background: #fff; color: var(--ink); }
.login input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px #e8f0ff; }
.login .btn { width: 100%; margin-top: 6px; }
.login .err { margin-top: 12px; color: #d93036; font-size: 14px; }

.foot { max-width: 1400px; margin: 0 auto; padding: 22px 28px 36px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.foot .links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* ——— Планшет ——— */
@media (max-width: 900px) {
  .top { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 14px 20px; }
  .top-nav { display: none; }
  .hero { padding: 56px 20px 32px; }
  .stage { padding: 24px 20px 0; }
  .grid-lines { display: none; }
  .login-screen { grid-template-columns: 1fr; gap: 28px; min-height: 0; max-width: 560px; padding: 56px 20px 72px; }
  .foot { padding: 20px; }
}

/* ——— Телефон ——— */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .top { padding: 12px 16px; gap: 12px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand-logo { height: 28px; }
  .logo { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
  .top-actions .btn.ghost { display: none; }
  .top-actions .btn { padding: 8px 14px; font-size: 14.5px; border-radius: 10px; }
  .long { display: none; }
  .short { display: inline; }

  .hero { padding: 36px 16px 20px; }
  .pill { font-size: 13px; gap: 8px; padding: 4px 10px 4px 4px; }
  .pill-tag { font-size: 12px; padding: 2px 9px; }
  h1 { margin-top: 24px; font-size: clamp(34px, 10.4vw, 46px); line-height: 1.02; letter-spacing: -0.045em; }
  .br-wide { display: none; }
  .sub { margin-top: 18px; font-size: 16.5px; line-height: 1.5; }
  .cta { flex-direction: column; gap: 10px; margin-top: 26px; }
  .cta .btn { width: 100%; padding: 14px 18px; font-size: 16px; }

  /* Скриншот: крупный фрагмент вместо уменьшенной копии всего экрана — цифры и графики читаются */
  .stage { padding: 20px 16px 0; }
  .shot { border-radius: 14px; aspect-ratio: 4 / 3.2; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
  .shot img { width: 230%; max-width: none; margin-left: -37%; }

  .login-screen { padding: 40px 16px 56px; gap: 24px; }
  .login-copy h2 { font-size: 30px; }
  .login-copy p { font-size: 16px; margin: 12px 0 16px; }
  .login-copy ul { font-size: 14px; gap: 8px; }
  .login { padding: 20px; border-radius: 16px; }
  .login input { font-size: 16px; } /* 16px — iOS не увеличивает страницу при фокусе */

  .foot { flex-direction: column; gap: 12px; padding: 20px 16px 28px; }
  .foot .links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
}
@media (max-width: 380px) {
  .brand { font-size: 15px; letter-spacing: -0.025em; }
  .brand-logo { height: 25px; }
  .top-actions .btn { padding: 8px 12px; }
  .shot img { width: 260%; margin-left: -42%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
