/* ── Ropstory AI — лендинг (только тёмная тема, сначала телефон) ─────────── */
:root {
  --bg: #0b0d0f;
  --bg-2: #101316;
  --card: #15181c;
  --card-2: #1a1e23;
  --ink: #eef0f2;
  --ink-2: #b4bbc4;
  --muted: #7c858f;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: #ee6a45;
  --accent-2: #ff9a4d;
  --accent-soft: rgba(238, 106, 69, 0.14);
  --green: #4fd68a;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --brand: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body.lp {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

.lp img,
.lp svg {
  display: block;
  max-width: 100%;
}
.lp a {
  color: inherit;
}
.lp h1,
.lp h2,
.lp h3,
.lp p,
.lp ul {
  margin: 0;
}
.lp ul {
  padding: 0;
  list-style: none;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 18px;
}

.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ── Кнопки ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 700 15px/1 var(--font);
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease;
}
.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}
.btn-lg {
  height: 56px;
  padding: 0 30px;
  font-size: 16px;
}
.btn-primary {
  color: #fff !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 28px -8px rgba(238, 106, 69, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -8px rgba(238, 106, 69, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary svg,
.btn-light svg {
  transition: transform 0.18s ease;
}
.btn-primary:hover svg,
.btn-light:hover svg {
  transform: translateX(3px);
}
.btn-ghost {
  color: var(--ink);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
}
.btn-line {
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-line:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.btn-light {
  color: #b53a1a !important;
  background: #fff;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.5);
}
.btn-light:hover {
  transform: translateY(-2px);
}
.cta-short {
  display: none;
}

/* ── Навигация ───────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 15, 0.72);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.is-stuck {
  border-bottom-color: var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo img {
  border-radius: 8px;
}
.logo-word {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-links {
  display: none;
  gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 28px 0 48px;
  overflow: clip;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  will-change: transform;
}
.b1 {
  top: -90px;
  right: -110px;
  width: 340px;
  height: 340px;
  background: rgba(238, 106, 69, 0.3);
  animation: drift 18s ease-in-out infinite alternate;
}
.b2 {
  bottom: -60px;
  left: -120px;
  width: 300px;
  height: 300px;
  background: rgba(79, 214, 138, 0.14);
  animation: drift 22s ease-in-out infinite alternate-reverse;
}
.grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 55% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.55;
}
@keyframes drift {
  to {
    transform: translate(36px, 26px) scale(1.08);
  }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}
.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(79, 214, 138, 0.6);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  70%,
  100% {
    box-shadow: 0 0 0 9px rgba(79, 214, 138, 0);
  }
}
.hero h1 {
  margin-top: 18px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(27px, 7.4vw, 62px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.lead {
  margin-top: 18px;
  max-width: 30em;
  color: var(--ink-2);
  font-size: 16.5px;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 26px;
}
.hero-cta .btn {
  width: 100%;
}
.notice {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

/* ── Макет чата ──────────────────────────────────────────────────────────── */
.hero-visual {
  position: relative;
  padding: 50px 0 26px;
}
.mock {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--card-2);
}
.dots {
  display: inline-flex;
  gap: 6px;
}
.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dots i:nth-child(1) {
  background: #ee6a5f;
}
.dots i:nth-child(2) {
  background: #f4bd4f;
}
.dots i:nth-child(3) {
  background: #61c554;
}
.mock-url {
  flex: 1;
  max-width: 220px;
  margin-inline: auto;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.mock-bar::after {
  content: "";
  width: 46px;
}
.mock-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: 350px;
}
.mock-side {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
  background: var(--card-2);
  font-size: 12px;
}
.side-new {
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 700;
}
.side-item {
  overflow: hidden;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-item.is-on {
  background: var(--accent-soft);
  color: var(--ink);
}
.mock-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.chip-model {
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}
.chip-soft {
  background: var(--accent-soft);
  color: var(--accent-2);
}
.spark {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px 8px 3px 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: rotate(45deg);
}
.chat-stream {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
}
.msg-user {
  align-self: flex-end;
  max-width: 86%;
  padding: 9px 14px;
  border-radius: 16px 16px 4px 16px;
  background: #e9ebee;
  color: #101215;
  font-size: 13.5px;
  font-weight: 600;
}
.msg-ai {
  max-width: 96%;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.55;
}
.ai-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.thinking {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 600;
}
.thinking[hidden] {
  display: none;
}
.thinking i {
  font-style: normal;
  animation: blink 1.2s infinite;
}
.thinking i:nth-child(2) {
  animation-delay: 0.2s;
}
.thinking i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.2;
  }
  40% {
    opacity: 1;
  }
}
.caret::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent-2);
  animation: blink 0.9s steps(2) infinite;
}
.ai-extra {
  margin-top: 10px;
}
.ai-extra:empty {
  display: none;
}
.code-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a0c0e;
  color: #d9dee5;
  font: 12px/1.6 var(--mono);
}
.code-name {
  padding: 5px 12px;
  border-bottom: 1px solid var(--line);
  color: #8a929c;
  font-size: 11px;
}
.code-card pre {
  margin: 0;
  padding: 10px 12px;
  overflow: hidden;
  white-space: pre;
}
.code-card .k {
  color: #f08a6b;
}
.code-card .f {
  color: #7ec8a4;
}
.code-card .s {
  color: #e6c07b;
}
.img-card {
  display: inline-block;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
}
.img-card figcaption {
  padding: 5px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.fade-in {
  animation: fadeUp 0.5s ease both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 12px 12px;
  padding: 7px 7px 7px 16px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.send {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.float {
  display: none;
  position: absolute;
  z-index: 2;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(21, 24, 28, 0.92);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
  font-size: 12.5px;
  font-weight: 800;
  animation: bob 6s ease-in-out infinite;
}
.f1 {
  top: 88px;
  right: -16px;
}
.f2 {
  bottom: 4px;
  left: 14%;
  animation-delay: -2s;
}
.f3 {
  bottom: 10px;
  right: 10%;
  animation-delay: -4s;
}
@keyframes bob {
  50% {
    transform: translateY(-9px);
  }
}
/* маскот выглядывает из-за верхнего края окна */
.mascot {
  position: absolute;
  z-index: 0;
  top: 2px;
  right: 12%;
  width: 84px;
  height: auto;
  animation: peek 5s ease-in-out infinite;
}
@keyframes peek {
  0%,
  100% {
    transform: translateY(6px) rotate(-2deg);
  }
  50% {
    transform: translateY(-4px) rotate(2deg);
  }
}

/* ── Секции ──────────────────────────────────────────────────────────────── */
.section {
  padding: 52px 0;
}
.section-tight {
  padding-top: 8px;
}
.head {
  max-width: 720px;
  margin-bottom: 26px;
}
.head h2,
.final h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(23px, 5.6vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.sub {
  margin-top: 14px;
  max-width: 34em;
  color: var(--ink-2);
}

/* семейства моделей */
.families {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.fam {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.fam:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
}
.fam h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 18px var(--c);
}
.fam-chatgpt {
  --c: #3ddc97;
}
.fam-claude {
  --c: #ff8a5c;
}
.fam-gemini {
  --c: #6ea8ff;
}
.fam-other {
  --c: #c58bff;
}
.fam ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fam li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 700;
}

/* возможности */
.feats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.feat {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.feat:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
}
.ic {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-2);
}
.feat h3 {
  margin: 14px 0 4px;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.feat p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}

/* финал */
.final {
  padding: 12px 0 56px;
}
.final-box {
  position: relative;
  overflow: hidden;
  padding: 32px 22px 34px;
  border-radius: 26px;
  background:
    radial-gradient(500px 280px at 90% 110%, rgba(255, 200, 130, 0.4), transparent 70%),
    linear-gradient(135deg, #c43f1f, #ec7a33);
  box-shadow: 0 30px 70px -26px rgba(236, 100, 40, 0.55);
}
.final-txt {
  position: relative;
  z-index: 1;
  max-width: 560px;
}
.final h2 {
  margin-bottom: 24px;
  color: #fff;
  font-size: clamp(22px, 5.4vw, 38px);
}
.lp .final-mascot {
  display: none;
}

.footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14.5px;
  font-weight: 600;
}
.footer-links a {
  color: var(--ink-2);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--accent-2);
}
.footer-note {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 13px;
}

/* появление при прокрутке */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.d1 {
  transition-delay: 0.08s;
}
.js .reveal.d2 {
  transition-delay: 0.16s;
}
.js .reveal.d3 {
  transition-delay: 0.24s;
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
.js .fam.reveal.in,
.js .feat.reveal.in {
  transition: opacity 0.65s ease, transform 0.25s ease, border-color 0.25s ease;
  transition-delay: 0s;
}

/* ── Планшет и выше ──────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .wrap {
    padding-inline: 28px;
  }
  .hero-cta {
    flex-direction: row;
  }
  .hero-cta .btn {
    width: auto;
  }
  .mock-body {
    grid-template-columns: 150px minmax(0, 1fr);
    height: 400px;
  }
  .mock-side {
    display: flex;
  }
  .cta-short {
    display: none;
  }
  .families {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .feats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .feat {
    padding: 22px;
  }
  .section {
    padding: 72px 0;
  }
  .final-box {
    padding: 48px 40px;
  }
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
  .nav-in {
    height: 68px;
  }
  .hero {
    padding: 56px 0 72px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
  }
  .hero h1 {
    font-size: clamp(36px, 4.5vw, 58px);
  }
  .lead {
    font-size: 18px;
  }
  .b1 {
    width: 560px;
    height: 560px;
    top: -140px;
    right: -100px;
  }
  .b2 {
    width: 460px;
    height: 460px;
  }
  .float {
    display: block;
  }
  .mascot {
    width: clamp(100px, 9vw, 120px);
  }
  .hero-visual {
    padding-top: 64px;
  }
  .families {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .final-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 56px 56px;
  }
  .lp .final-mascot {
    display: block;
    flex: none;
    width: 190px;
    height: auto;
    margin: -56px 0 -80px;
    transform: rotate(5deg);
    filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.3));
  }
}

@media (min-width: 1100px) {
  .head {
    margin-bottom: 36px;
  }
  .section {
    padding: 88px 0;
  }
  .feats {
    gap: 16px;
  }
}

@media (max-width: 639px) {
  .cta-long {
    display: none;
  }
  .cta-short {
    display: inline;
  }
}

@media (max-width: 420px) {
  .logo-word {
    font-size: 17px;
  }
  .nav-in {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
