/* Cat & Cut — styles for catandcut.app. Tokens mirror the Cat & Cut design system (tokens.json). */
:root {
  --cream: #f8efe2;
  --paper: #fffbf4;
  --sand: #efe2cf;
  --line: #e2d2bc;
  --ink: #2a1e17;
  --ink-muted: #6a574a;
  --cat: #b8461f;
  --cat-tint: #f7dccb;
  --cut: #1f5a8a;
  --cut-tint: #d8e6f1;
  --sun: #f2c14e;

  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Onest", system-ui, "Segoe UI", sans-serif;
  --font-ipa: "Noto Sans", "Segoe UI", "Arial Unicode MS", sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px; --space-20: 80px; --space-30: 120px;
  --radius-sm: 10px; --radius-md: 18px; --radius-lg: 28px; --radius-pill: 999px;
  --shadow-card: 0 1px 0 #e2d2bc, 0 18px 40px -26px rgba(42, 30, 23, 0.45);
  --shadow-press: 0 4px 0 #b8461f;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
b { font-weight: 600; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
section[id], main [id] { scroll-margin-top: 84px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--cut); outline-offset: 3px; border-radius: 6px; }

/* ---------- type ---------- */
.eyebrow {
  font: 600 13px/1.3 var(--font-body);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cat);
  margin-bottom: var(--space-4);
}
.h1 {
  font: 700 clamp(34px, 10vw, 88px)/0.98 var(--font-display);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
}
.h2 {
  font: 700 clamp(30px, 5.6vw, 50px)/1.08 var(--font-display);
  letter-spacing: -0.02em;
  max-width: 18em;
  margin-bottom: var(--space-6);
}
.h3 { font: 600 20px/1.3 var(--font-display); letter-spacing: -0.01em; margin-bottom: var(--space-2); }
.display {
  font: 800 clamp(54px, 14vw, 148px)/0.92 var(--font-display);
  letter-spacing: -0.04em;
}
.lead { font-size: clamp(18px, 2.1vw, 20px); line-height: 1.55; max-width: 36em; }
.ipa { font-family: var(--font-ipa); font-weight: 500; }
.ipa b { font-weight: 700; }
.v-cat { color: var(--cat); }
.v-cut { color: var(--cut); }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 28px;
  border: 2px solid var(--ink); border-radius: var(--radius-pill);
  background: var(--ink); color: var(--paper);
  font: 600 17px/1 var(--font-body); text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-press);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--cat); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cat); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.btn--ghost:hover { background: var(--paper); box-shadow: 0 6px 0 var(--ink); }
.btn--ghost:active { box-shadow: 0 1px 0 var(--ink); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 15px; box-shadow: 0 3px 0 var(--cat); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover, .btn:active { transform: none; } }

/* ---------- cat ---------- */
.c-body { fill: var(--ink); }
.c-chest { fill: var(--paper); }
.c-tail { fill: none; stroke: var(--ink); stroke-width: 15; stroke-linecap: round; }
.c-ear, .c-mouth { fill: var(--cat); }
.c-eye { fill: var(--sun); }
.c-pupil { fill: var(--ink); }
.c-nose { fill: var(--cat-tint); }
.c-whisker { fill: none; stroke: var(--paper); stroke-width: 2.5; stroke-linecap: round; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(248, 239, 226, 0.9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { display: flex; align-items: center; gap: var(--space-6); min-height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark { width: 34px; height: 34px; flex: none; }
.logo__word { font: 800 19px/1 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; }
.logo__amp { color: var(--cat); }
.nav { display: flex; gap: var(--space-6); margin-left: auto; }
.nav a { font-weight: 500; font-size: 16px; text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--cat); }
.nav__wide { display: none; }
@media (min-width: 900px) { .nav__wide { display: inline; } }

/* ---------- hero ---------- */
.hero { padding: var(--space-12) 0 var(--space-20); }
.hero__grid { display: grid; gap: var(--space-12); align-items: center; }
.hero__grid > *, .who > *, .pair > * { min-width: 0; }
@media (min-width: 960px) {
  .hero { padding: var(--space-20) 0 var(--space-30); }
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-8); }
}
.note { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); font-weight: 500; font-size: 16px; }
.note__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.3); flex: none; }

.stack {
  font-size: clamp(76px, 21vw, 168px);
  display: flex; flex-direction: column; align-items: flex-start;
  width: max-content; max-width: 100%;
  margin: 0 auto;
}
.stack .cat { width: 1.08em; height: auto; align-self: flex-end; margin: 0 0.42em -0.115em 0; position: relative; z-index: 1; }
.stack__row { display: flex; align-items: center; gap: 0.12em; }
.stack__word { font: 800 1em/0.86 var(--font-display); letter-spacing: -0.04em; }
.stack__gloss {
  display: flex; flex-direction: column; gap: 2px;
  font: 500 clamp(14px, 1.6vw, 17px)/1.25 var(--font-body); color: var(--ink-muted);
}
.stack__gloss .ipa { font-size: 1.25em; color: var(--ink); }

/* ---------- demo ---------- */
.demo {
  background: var(--paper);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: var(--space-20) 0;
}
@media (min-width: 960px) { .demo { padding: var(--space-30) 0; } }
.demo__head { text-align: center; margin-bottom: var(--space-12); }
.demo__head .display { margin-bottom: var(--space-6); }
.demo__head .lead { margin: 0 auto; }
.demo__head .ipa { white-space: nowrap; }

.pair { display: grid; gap: var(--space-3); align-items: center; max-width: 980px; margin: 0 auto; }
@media (min-width: 620px) { .pair { grid-template-columns: 1fr auto 1fr; gap: var(--space-4); } }
.word {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding: var(--space-8) var(--space-4) var(--space-6);
  border: 3px solid transparent; border-radius: var(--radius-lg);
  color: var(--ink); font: inherit; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.word--cat { background: var(--cat-tint); }
.word--cut { background: var(--cut-tint); }
.word:hover { transform: translateY(-2px); }
.word[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 6px 0 var(--ink); }
.word__big { font: 800 clamp(72px, 15vw, 132px)/0.9 var(--font-display); letter-spacing: -0.04em; }
.word__ipa { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.word--cat .word__ipa b { color: var(--cat); }
.word--cut .word__ipa b { color: var(--cut); }
.word__ru { font-size: 17px; font-weight: 500; color: var(--ink-muted); }
.pair__or {
  justify-self: center;
  font: 600 15px/1 var(--font-body); color: var(--ink-muted);
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-pill);
  padding: 10px 14px;
}
.pair__tip { text-align: center; color: var(--ink-muted); font-size: 15px; margin: var(--space-4) 0 var(--space-12); }

.schemes { display: grid; gap: var(--space-4); max-width: 980px; margin: 0 auto; }
@media (min-width: 760px) { .schemes { grid-template-columns: 1fr 1fr; } }
.scheme {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-4) var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.scheme svg { width: 100%; height: auto; max-height: 240px; }
.scheme figcaption { text-align: center; font: 600 15px/1.3 var(--font-display); }
.scheme__caption { text-align: center; max-width: 34em; margin: var(--space-6) auto var(--space-12); font-size: 17px; }

.lip { stroke: var(--ink); stroke-width: 3; }
.lip--cat { fill: var(--cat-tint); }
.lip--cut { fill: var(--cut-tint); }
.hole { fill: var(--ink); }
.teeth { fill: var(--paper); }
.tongue--cat, .dot--cat { fill: var(--cat); }
.tongue--cut, .dot--cut { fill: var(--cut); }
.lbl { font: 600 15px var(--font-body); fill: var(--ink); }
.ipa-t { font-family: var(--font-ipa); font-weight: 700; }
.trap { fill: var(--paper); stroke: var(--line); stroke-width: 2.5; stroke-linejoin: round; }
.trap-mid { stroke: var(--line); stroke-width: 2; stroke-dasharray: 5 6; }
.axis { font: 500 13px var(--font-body); fill: var(--ink-muted); }
.move { fill: none; stroke: var(--ink-muted); stroke-width: 2; stroke-dasharray: 4 5; }
.arrowhead { fill: var(--ink-muted); }
.dot-t { font: 700 20px var(--font-ipa); fill: var(--paper); }
.d-cat, .d-cut { transition: opacity .2s ease; }
[data-active="cat"] .d-cut, [data-active="cut"] .d-cat { opacity: 0.32; }

.hint { display: flex; flex-direction: column; align-items: center; gap: var(--space-8); }
.hint__msg { display: flex; align-items: flex-end; gap: var(--space-3); max-width: 660px; width: 100%; }
.hint__ava { width: 44px; height: 44px; flex: none; background: var(--cat-tint); border-radius: 50%; padding: 5px; }
.hint__card {
  background: var(--cream); border: 2px solid var(--ink);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 6px;
  padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
  font-size: 18px; line-height: 1.55;
}
.tag {
  align-self: flex-start;
  background: var(--sun); color: var(--ink);
  font: 600 13px/1 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase;
  padding: 7px 12px; border-radius: var(--radius-pill);
}
.drill { font-weight: 700; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .hint__msg:not([hidden]) { animation: pop .28s ease-out; }
  @keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ---------- sections ---------- */
.section { padding: var(--space-20) 0; }
@media (min-width: 960px) { .section { padding: var(--space-30) 0; } }
.section--paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--sand { background: var(--sand); }

.steps { list-style: none; padding: 0; display: grid; gap: var(--space-4); margin-top: var(--space-12); }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: var(--space-8) var(--space-6);
}
.step p { color: var(--ink-muted); }
.step__n { display: block; font: 800 64px/1 var(--font-display); letter-spacing: -0.04em; margin-bottom: var(--space-6); }
.step__n--cat { color: var(--cat); }
.step__n--cut { color: var(--cut); }

.who { display: grid; gap: var(--space-12); align-items: center; }
@media (min-width: 960px) { .who { grid-template-columns: 1.2fr 0.8fr; } }
.minipair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.mini {
  border-radius: var(--radius-lg); padding: var(--space-6) var(--space-4);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-1);
}
.mini--cut { background: var(--cut-tint); }
.mini--cat { background: var(--cat-tint); }
.mini__w { font: 800 clamp(34px, 9vw, 52px)/1 var(--font-display); letter-spacing: -0.03em; margin-bottom: var(--space-2); }
.mini .ipa { font-size: 22px; }
.mini__ru { color: var(--ink-muted); font-weight: 500; }

.plans { display: grid; gap: var(--space-4); margin-top: var(--space-12); }
@media (min-width: 720px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan {
  background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: var(--space-8) var(--space-6) var(--space-6);
  border-top: 10px solid var(--cat);
}
.plan--cut { border-top-color: var(--cut); }
.plan__name { font: 700 30px/1.1 var(--font-display); letter-spacing: -0.02em; margin-bottom: var(--space-6); }
.plan__slots { display: grid; gap: var(--space-3); }
.slot { border: 2px dashed var(--line); border-radius: var(--radius-md); padding: var(--space-4); }
.slot dt { font: 600 13px/1.3 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--space-1); }
.slot dd { font-size: 17px; color: var(--ink-muted); }

.faq__list { max-width: 860px; margin-top: var(--space-8); border-top: 2px solid var(--ink); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-6) 0;
  font: 600 clamp(17px, 2.2vw, 20px)/1.35 var(--font-display); letter-spacing: -0.01em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2.5px 14px no-repeat,
    var(--cat-tint);
  transition: transform .2s ease;
}
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { padding: 0 48px var(--space-6) 0; color: var(--ink-muted); font-size: 17px; }

.final { padding: 0 0 var(--space-20); }
.final__panel {
  background: var(--cat-tint); border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-6) 0;
  display: grid; gap: var(--space-6); align-items: end; overflow: hidden;
}
@media (min-width: 860px) {
  .final__panel { grid-template-columns: 1fr auto; padding: var(--space-20) var(--space-20) 0; }
}
.final__text { padding-bottom: var(--space-12); }
@media (min-width: 860px) { .final__text { padding-bottom: var(--space-20); } }
.display--final { font-size: clamp(40px, 8vw, 92px); margin-bottom: var(--space-6); }
.final__text .lead { margin-bottom: var(--space-8); }
.cat--final { width: clamp(160px, 40vw, 260px); height: auto; justify-self: center; margin-bottom: -4px; }

.footer { border-top: 1px solid var(--line); padding: var(--space-8) 0; }
.footer__in { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); align-items: center; justify-content: space-between; }
.footer p { color: var(--ink-muted); font-size: 15px; }
.logo--small .logo__mark { width: 28px; height: 28px; }
.logo--small .logo__word { font-size: 16px; }
