/* Pet Space — лендинг в языке студии Kombato: системный шрифт с плотным
   трекингом, тёплый светлый фон, пастельные «плитки» и тёмные панели.
   Бренд Pet Space остаётся в зелёном: точка в заголовке, лапка, аватар бота. */

:root {
  color-scheme: light only;

  --bg:        #f3f3ef;
  --fg:        #171817;
  --muted:     #565b55;
  --line:      #d5d8ce;
  --card:      #fbfbf8;

  --dark:      #151615;
  --dark-2:    #1f201f;
  --dark-line: rgba(255, 255, 255, 0.09);
  --dark-mute: #a3a79f;

  --lime:      #d4ef72;
  --violet:    #b6a0ed;
  --blue:      #a8cef4;
  --coral:     #ffb499;
  --cyan:      #a9ded8;
  --yellow:    #f0df85;

  --green:      #2C7856;
  --green-deep: #1F5C42;

  --r:     28px;
  --space: clamp(24px, 5vw, 80px);
  --maxw:  1260px;
  --font:  -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease:  cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space); }

.label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.dot { color: var(--green); }

/* ── Кнопки ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 20px; border-radius: 12px;
  font-size: 14px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s;
}
.btn-dark { background: var(--fg); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-1px); }
.btn-line { border: 1px solid var(--line); }
.btn-line:hover { border-color: var(--fg); }

/* ── Шапка ──────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 243, 239, .84);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { height: 68px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.tile {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; background: var(--fg); color: #fff;
}
.tile svg { width: 20px; height: 20px; }
.brand b { font-size: 19px; font-weight: 750; letter-spacing: -.045em; }
.brand .sub {
  margin-left: 4px; padding-left: 14px; border-left: 1px solid var(--line);
  font-size: 12px; line-height: 1.25; color: var(--muted);
}
.menu { margin: 0 auto; display: flex; gap: 24px; font-size: 14px; font-weight: 450; }
.menu a { transition: opacity .2s; }
.menu a:hover { opacity: .55; }
.nav .btn { height: 40px; padding: 0 16px; font-size: 13.5px; border-radius: 12px; margin-left: auto; }
.menu + .btn { margin-left: 0; }

/* ── Первый экран ───────────────────────────────────── */
.hero { padding-top: 22px; }
.hero-top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 4px 0 22px; font-size: 13px; color: var(--muted);
}
.crumbs span + span::before { content: "·"; margin: 0 10px; color: #a9ada4; }
.hero-top .label { font-size: 10.5px; color: var(--muted); letter-spacing: .14em; }

.h1 {
  font-size: clamp(40px, 7.2vw, 104px); font-weight: 780;
  letter-spacing: -.075em; line-height: .9;
}

.stage { position: relative; height: clamp(420px, 40vw, 540px); margin-top: 0; }
.orbit-line { position: absolute; inset: 6% 2% 0; width: 96%; height: 94%; pointer-events: none; }

.core {
  position: absolute; left: 50%; top: 50%;
  width: min(34vw, 400px); transform: translate(-50%, -50%);
}
.paw3d { width: 100%; height: auto; animation: hover 8s ease-in-out infinite; }
@keyframes hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.core-cap {
  position: absolute; left: 50%; bottom: -4%; transform: translateX(-50%);
  padding: 5px 12px; border-radius: 8px; background: var(--bg);
  text-align: center; font-size: 10.5px; font-weight: 750; letter-spacing: .12em;
  text-transform: uppercase; white-space: nowrap;
}
.core-cap span { display: block; margin-top: 3px; color: var(--muted); font-weight: 600; }

.chip {
  position: absolute; left: var(--x); top: var(--y); z-index: 2;
  transform: translate(var(--px, 0px), var(--py, 0px)) rotate(var(--rot));
  transition: transform .7s var(--ease);
}
.slab {
  width: clamp(138px, 12vw, 168px); padding: 11px 13px 15px; border-radius: 14px;
  background: var(--c);
  box-shadow:
    inset 0 -7px 0 rgba(23, 24, 23, .09),
    inset 0 1px 0 rgba(255, 255, 255, .6),
    0 30px 42px -26px rgba(23, 24, 23, .5);
  animation: bob 6.5s ease-in-out infinite; animation-delay: var(--d, 0s);
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.slab .k { font-size: 9.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: rgba(23, 24, 23, .7); }
.slab .w {
  margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: clamp(18px, 1.7vw, 23px); font-weight: 800; letter-spacing: -.05em; line-height: 1;
}
.slab .g { font-size: 16px; font-weight: 500; opacity: .75; letter-spacing: 0; }

.hero-foot {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 40px; align-items: end;
  margin-top: 8px; padding: 28px 0 clamp(52px, 6vw, 84px); border-top: 1px solid var(--line);
}
.lead { font-size: 17px; line-height: 1.5; max-width: 44ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.trust { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.trust span + span::before { content: "·"; margin: 0 10px; color: #a9ada4; }

/* ── Секции ─────────────────────────────────────────── */
.sec { padding: clamp(52px, 6vw, 92px) 0; }
.sec-head {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px 48px; align-items: end;
  margin-bottom: clamp(26px, 3vw, 40px);
}
.sec-head .label { margin-bottom: 14px; }
.sec-head.solo { grid-template-columns: 1fr; }
.h2 { font-size: clamp(30px, 4vw, 56px); font-weight: 760; letter-spacing: -.055em; line-height: 1; }
.sec-head p { font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 42ch; }

/* Возможности */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat {
  display: flex; flex-direction: column; gap: 10px; min-height: 250px; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.feat:hover { transform: translateY(-4px); border-color: #c5c9bd; box-shadow: 0 32px 60px -40px rgba(23, 24, 23, .45); }
.tag {
  align-self: flex-start; padding: 5px 9px; border-radius: 8px; background: var(--c);
  font-size: 10.5px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase;
  box-shadow: inset 0 -3px 0 rgba(23, 24, 23, .08);
}
.feat h3 { margin-top: 6px; font-size: clamp(20px, 1.7vw, 23px); font-weight: 750; letter-spacing: -.045em; line-height: 1.06; }
.feat p { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.feat .meta {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}

/* Сводка в MAX — тёмная панель */
.panel {
  display: grid; grid-template-columns: 1fr 1.02fr; gap: clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(24px, 4vw, 52px); border-radius: var(--r);
  background: var(--dark); color: #f2f3ee;
}
.panel .label { color: var(--lime); }
.panel .h2 { margin: 14px 0 16px; font-size: clamp(30px, 3.4vw, 48px); color: #f5f6f1; }
.panel .h2 em { font-style: normal; color: var(--lime); }
.panel-copy > p { font-size: 15.5px; line-height: 1.55; color: var(--dark-mute); max-width: 42ch; }
.steps { margin-top: 24px; display: grid; gap: 10px; }
.step {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: center;
  padding: 11px 14px; border: 1px solid var(--dark-line); border-radius: 14px;
}
.step .n {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .07); font-size: 12px; font-weight: 700; color: #d8dbd3;
}
.step:first-child { background: rgba(212, 239, 114, .07); border-color: rgba(212, 239, 114, .35); }
.step:first-child .n { background: var(--lime); color: var(--fg); }
.step b { display: block; font-weight: 650; color: #f5f6f1; }
.step span { font-size: 12.5px; color: var(--dark-mute); }

.chat { padding: 18px; border-radius: 22px; background: var(--dark-2); border: 1px solid var(--dark-line); }
.chat-top {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 14px; border-bottom: 1px solid var(--dark-line);
  font-size: 12px; color: var(--dark-mute);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #4a4c48; }
.bot { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; font-size: 13.5px; font-weight: 650; }
.bot .av { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--green); color: #fff; }
.bot .av svg { width: 18px; height: 18px; }
.bubble {
  padding: 15px 17px; border-radius: 6px 18px 18px 18px; background: #2a2c29;
  font-size: 13.5px; line-height: 1.55; color: #e7e9e3;
}
.bubble b { color: #fff; font-weight: 650; }
.bubble .gp { margin-top: 10px; font-weight: 700; color: #fff; }
.bubble .end { margin-top: 10px; color: var(--dark-mute); }
.kbd { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.kbd span {
  display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 11px;
  background: #2f312e; border: 1px solid var(--dark-line); font-size: 12.5px; font-weight: 600; color: #eceee8;
}
.stamp { margin-top: 8px; text-align: right; font-size: 11px; color: #72766f; }

/* Виды */
.species { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.sp {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  aspect-ratio: auto; min-height: 138px; padding: 13px 14px; border-radius: 18px; background: var(--c);
  box-shadow: inset 0 -6px 0 rgba(23, 24, 23, .08), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform .4s var(--ease);
}
.sp:hover { transform: translateY(-4px) rotate(-1.5deg); }
.sp .n { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: rgba(23, 24, 23, .58); }
.sp .e { font-size: clamp(28px, 2.6vw, 38px); line-height: 1; }
.sp b { font-size: 15px; font-weight: 750; letter-spacing: -.035em; }

/* Принципы */
.rows { border-top: 1px solid var(--fg); }
.row {
  display: grid; grid-template-columns: 110px 1fr 1.15fr; gap: 16px 32px; align-items: start;
  padding: clamp(18px, 2.2vw, 26px) 0; border-bottom: 1px solid var(--line);
}
.row .n { padding-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.row h3 { font-size: clamp(20px, 2vw, 28px); font-weight: 750; letter-spacing: -.05em; line-height: 1.05; }
.row p { font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 50ch; }

/* Финал */
.final-box {
  position: relative; overflow: hidden;
  padding: clamp(28px, 4.5vw, 60px); border-radius: var(--r);
  background: var(--lime); box-shadow: inset 0 -10px 0 rgba(23, 24, 23, .07);
}
.final-box .h2 { position: relative; max-width: 15ch; font-size: clamp(32px, 4.6vw, 64px); }
.final-box p { margin-top: 16px; max-width: 44ch; font-size: 16px; line-height: 1.5; color: #2f3329; }
.final-box .cta-row { justify-content: flex-start; margin-top: 24px; }
.final-box .btn-line { border-color: rgba(23, 24, 23, .25); }
.final-box .btn-line:hover { border-color: var(--fg); }
.final-paw {
  position: absolute; right: 5%; top: 50%; width: min(26%, 300px); aspect-ratio: 1;
  color: rgba(23, 24, 23, .08); transform: translateY(-50%) rotate(-16deg); pointer-events: none;
}

/* Подвал */
.foot { margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); padding: 30px 0 44px; }
.foot-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px 28px; font-size: 13px; color: var(--muted);
}
.foot .brand b { font-size: 17px; color: var(--fg); }
.foot .tile { width: 30px; height: 30px; border-radius: 9px; }
.foot .tile svg { width: 18px; height: 18px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { transition: color .2s; }
.foot a:hover { color: var(--fg); }
.foot .studio a { color: var(--fg); font-weight: 600; }

/* Юридические страницы */
.legal { max-width: 780px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) 0 24px; }
.back-link { display: inline-block; margin-bottom: 28px; font-size: 14px; color: var(--muted); transition: color .2s; }
.back-link:hover { color: var(--fg); }
.legal h1 { margin-bottom: 16px; font-size: clamp(30px, 5vw, 56px); font-weight: 760; letter-spacing: -.06em; line-height: 1; overflow-wrap: break-word; hyphens: auto; }
.legal .updated { margin-bottom: 22px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.legal .intro { margin-bottom: 8px; padding-bottom: 24px; border-bottom: 1px solid var(--fg); font-size: 17px; line-height: 1.5; color: var(--fg); }
.legal h2 { margin: 34px 0 10px; font-size: clamp(19px, 1.8vw, 23px); font-weight: 750; letter-spacing: -.04em; line-height: 1.15; }
.legal p, .legal li { font-size: 15px; line-height: 1.65; color: var(--muted); }
.legal b { font-weight: 650; color: var(--fg); }
.legal ul { margin: 10px 0; padding-left: 22px; }
.legal li { margin: 8px 0; }
.legal a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

/* Появление при прокрутке — только когда JS точно работает */
.js .rv { transform: translateY(18px); transition: transform .6s var(--ease); }
.js .rv.in { transform: none; }

/* ── Адаптив ────────────────────────────────────────── */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .species { grid-template-columns: repeat(4, 1fr); }
  .sp { min-height: 132px; }
}

@media (max-width: 880px) {
  .menu { display: none; }
  .nav .btn { margin-left: auto; }

  .hero-top .label { display: none; }

  .stage {
    height: auto; margin-top: 26px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  }
  .orbit-line { display: none; }
  .core-cap { position: static; transform: none; margin: 2px auto 0; width: max-content; font-size: 10px; }
  .core { position: relative; left: auto; top: auto; transform: none; grid-column: 1 / -1; width: min(62vw, 260px); margin: 0 auto 4px; }
  .chip { position: relative; left: auto; top: auto; transform: rotate(var(--rot-m, 0deg)); }
  .slab { width: auto; }

  .hero-foot { grid-template-columns: 1fr; }
  .cta-row { justify-content: flex-start; }

  .sec-head { grid-template-columns: 1fr; }
  .panel { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .row .n { padding-top: 0; }
}

@media (max-width: 620px) {
  .brand .sub { display: none; }
  .grid { grid-template-columns: 1fr; }
  .feat { min-height: 0; }
  .species { grid-template-columns: repeat(3, 1fr); }
  .sp { aspect-ratio: auto; min-height: 132px; }
  .sp:last-child { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; }
  .sp:last-child .n { order: 3; margin-left: auto; }
  .btn { height: 48px; }
  .cta-row .btn { flex: 1 1 100%; }
  .kbd span { font-size: 12.5px; }
  .trust span { display: block; }
  .trust span + span::before { content: none; }
  .final-paw { width: 62%; right: -16%; top: auto; bottom: -10%; transform: rotate(-16deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .paw3d, .slab { animation: none; }
  .chip { transition: none; }
  .js .rv { transform: none; transition: none; }
}
