/* ============================================================
   Черновик — светлый «framed» стиль
   Диали: VARIANCE 7 / MOTION 6 / DENSITY 4
   Радиусы: рамка 28, карточки 20, поля 12, интерактив = pill
   Акцент: lime = действие; sky = второй тон (слово/точка в заголовке)
   ============================================================ */
:root {
  --bg: #FFFFFF;
  --bg-2: #F4F4F1;
  --card: #F1F1EE;
  --ink: #16181A;
  --ink-soft: #454B52;
  --muted: #6E747D;
  --line: rgba(22, 24, 26, 0.09);
  --lime: #C9F24D;
  --lime-strong: #D8F868;
  --on-lime: #17200A;
  --lime-dim: rgba(201, 242, 77, 0.18);
  --dark-card: #17191B;
  --dark-ink: #F2F1EC;
  --sky: #2E9FDB;
  --r-frame: 28px;
  --r-card: 20px;
  --r-input: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 40px;
}

h1, h2, h3 { font-family: var(--font-body); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--lime); color: var(--on-lime); }
.btn-primary:hover { background: var(--lime-strong); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--ink-soft); }

.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

.btn-arrow { width: 14px; height: 14px; flex: none; }

/* ============ Hero-рамка ============ */
.frame {
  margin: 12px;
  border-radius: var(--r-frame);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: clamp(680px, calc(100dvh - 24px), 980px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 24%),
    url("../assets/hero-blue.png") center / cover no-repeat;
  background-color: #2FA0D8;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 20px 28px;
}

.nav .topnav { margin-left: auto; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--lime);
  color: var(--on-lime);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.05rem;
  display: grid;
  place-items: center;
}

.topnav { display: flex; gap: 24px; }

.topnav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.85;
}

.topnav a:hover { opacity: 1; }

.nav .btn-sm { margin-left: 8px; }

.hero-copy {
  padding: clamp(48px, 7vh, 96px) clamp(24px, 4vw, 64px) 40px;
  max-width: clamp(360px, 46vw, 760px);
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4.6vw, 4.6rem);
  color: var(--ink);
}

.hero-copy .mark {
  background: var(--lime);
  color: var(--on-lime);
  border-radius: 0.18em;
  padding: 0 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.lede {
  color: var(--ink-soft);
  max-width: 42ch;
  margin-top: clamp(16px, 2.4vh, 26px);
  font-size: clamp(1.06rem, 1.35vw, 1.3rem);
  font-weight: 500;
}

.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.hero-actions .btn-ghost {
  border-color: rgba(22, 24, 26, 0.25);
}

/* ============ Лента карточек ============ */
.strip {
  margin-top: auto;
  padding: 24px 0 28px;
  overflow: hidden;
}

.strip-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: strip-run 48s linear infinite;
  padding: 4px 48px;
}

@keyframes strip-run { to { transform: translateX(calc(-50% - 8px)); } }

.strip:hover .strip-track { animation-play-state: paused; }

.strip-card {
  width: clamp(300px, 24vw, 380px);
  height: 236px;
  border-radius: var(--r-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: none;
  transition: transform 0.25s var(--ease);
}

.strip-card:hover { transform: translateY(-5px); }

.strip-gray { background: var(--card); color: var(--ink); }
.strip-dark { background: var(--dark-card); color: var(--dark-ink); }
.strip-lime { background: var(--lime); color: var(--on-lime); }
.strip-photo { padding: 0; position: relative; overflow: hidden; width: 320px; }

.strip-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.strip-photo figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.strip-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
}

.strip-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.strip-chips span {
  background: var(--bg);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 600;
}

.strip-lines { display: grid; gap: 7px; font-size: 0.9rem; font-weight: 500; }
.strip-lines span { opacity: 0.85; }

.strip-big {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-top: auto;
  margin-bottom: 6px;
}

.strip-note { font-size: 0.88rem; font-weight: 600; opacity: 0.85; }

.hero-typer {
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  line-height: 1.7;
  min-height: 8.5em;
  white-space: pre-wrap;
}

.hero-typer .mk {
  background: var(--lime);
  color: var(--on-lime);
  border-radius: 6px;
  padding: 0 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-typer .mk {
    animation: mk-pop 0.4s var(--ease) both;
    animation-delay: calc(0.9s + var(--hi, 0) * 0.5s);
  }
}

@keyframes mk-pop {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

.strip-sign {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.72;
}

.sign-ava {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--on-lime);
  font-weight: 800;
  font-size: 0.65rem;
  display: grid;
  place-items: center;
  flex: none;
}

/* ============ About + bento ============ */
.about { padding: clamp(72px, 12vh, 140px) 0 84px; }

.about-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 24px;
}

.about h2 {
  font-size: clamp(1.9rem, 3.6vw, 3.3rem);
  max-width: 26ch;
  margin: 0 auto clamp(48px, 8vh, 88px);
  text-align: center;
}

.about h2 .dot {
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  vertical-align: baseline;
  margin: 0 0.1em;
}

.about h2 .dot-lime { background: var(--lime); }
.about h2 .dot-sky { background: var(--sky); }

.about h2 .w-lime { color: var(--ink); background: var(--lime); border-radius: 10px; padding: 0 0.12em; }
.about h2 .w-sky { color: var(--sky); }

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.bento-card {
  border-radius: var(--r-card);
  padding: 22px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bento-gray { background: var(--card); color: var(--ink); }
.bento-lime { background: var(--lime); color: var(--on-lime); }
.bento-dark { background: var(--dark-card); color: var(--dark-ink); }
.bento-photo { padding: 0; position: relative; overflow: hidden; }

.bento-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.bento-photo figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.bento-foot { margin-top: auto; color: var(--muted); font-size: 0.84rem; }
.bento-dark .bento-foot { color: rgba(242, 241, 236, 0.6); }
.bento-lime .bento-foot { color: rgba(23, 32, 10, 0.72); }

.bento-num {
  font-size: clamp(2.6rem, 3.2vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-top: auto;
  margin-bottom: 8px;
}

.bento-statement { font-size: 1.25rem; font-weight: 700; line-height: 1.4; margin-top: auto; }

/* ============ Лента-маршрут ============ */
.flow {
  border-block: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
}

.flow-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: flow-run 30s linear infinite;
}

.flow:hover .flow-track { animation-play-state: paused; }

@keyframes flow-run { to { transform: translateX(-50%); } }

.flow-track span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============ Форма ============ */
.compose { padding: 88px 0; }

.compose > .container > h2 { margin-bottom: 26px; }

.compose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.pane {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 22px;
  display: grid;
  gap: 14px;
}

.pane-head p { color: var(--ink-soft); font-size: 0.88rem; margin-top: 4px; }

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.94rem;
  line-height: 1.6;
  padding: 14px 16px;
  resize: vertical;
}

textarea::placeholder { color: var(--muted); }
textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; }

.field { display: grid; gap: 6px; }

.field-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field-opt { color: var(--muted); }

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.94rem;
  padding: 11px 14px;
}

.field input::placeholder { color: var(--muted); }
.field input:focus { outline: 2px solid var(--ink); outline-offset: 0; }

.dropzone {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 20px 14px;
  border: 1px dashed rgba(22, 24, 26, 0.28);
  border-radius: var(--r-input);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.dropzone:hover, .dropzone.dragover {
  background: var(--lime-dim);
  border-color: var(--ink);
}

.dz-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(22, 24, 26, 0.3);
  position: relative;
}

.dz-mark::before, .dz-mark::after {
  content: "";
  position: absolute;
  background: var(--ink);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.dz-mark::before { width: 11px; height: 1.5px; }
.dz-mark::after { width: 1.5px; height: 11px; }

.dz-title { font-weight: 700; font-size: 0.9rem; }
.dz-hint { color: var(--muted); font-size: 0.78rem; }
.dz-status { color: var(--ink-soft); font-size: 0.78rem; }
.dz-status:empty { display: none; }

.dz-filename {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-soft);
  word-break: break-all;
}

.compose-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.compose-status, .compose-error { margin-top: 14px; }
.compose-status { color: var(--ink-soft); font-size: 0.9rem; }
.compose-status:empty { display: none; }
.compose-error { color: #C24E2F; font-weight: 700; }

/* ============ Результат ============ */
.result { margin-top: 48px; }

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.letter-sheet {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 36px;
  position: relative;
}

.letter-body {
  font-size: clamp(1.03rem, 1.25vw, 1.16rem);
  line-height: 1.8;
  min-height: 120px;
  white-space: pre-wrap;
}

.letter-body .hl {
  background: var(--lime);
  color: var(--on-lime);
  border-radius: 5px;
  padding: 0 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Индикатор «печатает…» */
.typing { display: inline-flex; gap: 5px; padding: 6px 0; }

.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.35;
  animation: tdot 1.1s infinite ease-in-out;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes tdot {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.letter-stamp {
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--bg);
}

.strengths { margin-top: 30px; }
.strengths h3 { margin-bottom: 14px; color: var(--ink-soft); }

.strengths-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }

.strengths-list li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.strengths-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  flex: none;
}

/* ============ Футер ============ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
}

/* ============ Вход/появление ============ */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.7s var(--ease) both; }
  .hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
  .hero-copy > *:nth-child(2) { animation-delay: 0.15s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.25s; }

  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  [data-reveal].in { opacity: 1; transform: none; }
}

/* ============ Адаптив ============ */
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .frame { margin: 8px; min-height: 0; }
  .nav { flex-wrap: wrap; gap: 14px; }
  .topnav { display: none; }
  .hero-copy { padding: 40px 24px 28px; max-width: none; }
  .hero-copy h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .strip { overflow-x: auto; }
  .strip-track { animation: none; padding: 4px 24px; }
  .compose { padding: 64px 0; }
  .compose-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .about h2 { margin-bottom: 40px; }
  .letter-sheet { padding: 24px 20px; }
  .letter-stamp { position: static; display: inline-block; margin-top: 16px; }
  .container { padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .strip-track, .flow-track { animation: none; }
  .strip { overflow-x: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
