@font-face { font-family: Manrope; src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: Manrope; src: url("fonts/manrope-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 200 800; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

@view-transition { navigation: auto; }

:root {
  --ink: #25231e;
  --muted: #6f6b62;
  --serif: "New York", ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --tone: #efece6;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f7f5f1; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: #f7f5f1;
  color: var(--ink);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

.page { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 0;
  text-align: center;
}

.icon {
  width: 144px;
  height: 144px;
  margin-bottom: 26px;
  filter: drop-shadow(0 22px 22px rgba(70, 55, 30, 0.3));
  animation: appear 0.7s var(--ease) both;
}

h1 {
  max-width: 600px;
  font-family: var(--serif);
  font-size: clamp(34px, 7vw, 56px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
  animation: appear 0.7s 0.06s var(--ease) both;
}

.lead {
  max-width: 520px;
  margin-top: 18px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: balance;
  animation: appear 0.7s 0.12s var(--ease) both;
}

.join {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin-top: 26px;
  animation: appear 0.7s 0.18s var(--ease) both;
}

.email {
  display: block;
  width: 100%;
  height: 42px;
  padding: 0 116px 0 16px;
  border: 0;
  border-radius: 14px;
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.email::placeholder { color: #a29d92; }
.email { box-shadow: 0 6px 18px rgba(70, 55, 30, 0.12); }
.email:focus { background: #fffdf9; box-shadow: 0 10px 26px rgba(70, 55, 30, 0.24); }
.email[aria-invalid="true"] { background: #f7e6e3; animation: shake 0.4s ease; }

.button {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #f7f5f1;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.3, 1), opacity 0.2s ease;
  will-change: transform;
}

.button span { position: relative; }
.button:hover:not(:disabled) { transform: scale(1.04); }
.button:active:not(:disabled) { transform: scale(0.97); transition-duration: 0.12s; }
.button:disabled { opacity: 0.6; cursor: default; }
.button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.platforms {
  display: flex;
  gap: 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  animation: appear 0.7s 0.24s var(--ease) both;
}

.platforms li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.platforms svg { width: 18px; height: 18px; fill: currentColor; }

.swap { display: grid; justify-items: center; align-items: start; width: 100%; }
.swap > * { grid-area: 1 / 1; }

.join-block, .done {
  transition: opacity 0.45s ease, transform 0.6s var(--ease), visibility 0s linear 0.6s;
}

.join-block { display: flex; flex-direction: column; align-items: center; width: 100%; }

.done {
  margin-top: 28px;
  opacity: 0;
  transform: scale(0.97);
  visibility: hidden;
  pointer-events: none;
}

.swap[data-state="done"] .join-block {
  opacity: 0;
  transform: scale(0.97);
  visibility: hidden;
  pointer-events: none;
}

.swap[data-state="done"] .done {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0.25s, 0.25s, 0.25s, 0s;
}
.done h2 { font-family: var(--serif); font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }
.done p { max-width: 420px; margin-top: 10px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.done b { color: var(--ink); overflow-wrap: anywhere; }

.demo { padding: 0 0 96px; text-align: center; }

.demo-tabs { display: inline-flex; gap: 4px; margin: 0 0 18px; padding: 4px; border-radius: 14px; background: var(--tone); }
.demo-tab { height: 34px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease); }
.demo-tab:hover { transform: scale(1.03); }
.demo-tab[aria-selected="true"] { background: #fffdf9; color: var(--ink); box-shadow: 0 4px 12px rgba(70, 55, 30, 0.14); }
.demo-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.demo-card { position: relative; height: 430px; max-width: 600px; margin: 0 auto; border-radius: 28px; background: #fffdf9; box-shadow: 0 30px 70px rgba(70, 55, 30, 0.2), 0 4px 14px rgba(70, 55, 30, 0.08); overflow: hidden; text-align: left; }
.demo-app { position: absolute; inset: 0 0 92px 0; padding: 22px 22px 0; display: flex; flex-direction: column; }
.demo-who { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14px; font-weight: 700; }
.demo-who i { width: 30px; height: 30px; border-radius: 50%; background: #e9e5dc; color: var(--ink); display: grid; place-items: center; font-style: normal; font-size: 13px; }
.demo-thread { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; }
.demo-bubble { max-width: 82%; padding: 10px 15px; border-radius: 18px 18px 18px 6px; background: #efece6; font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -0.005em; opacity: 0; transform: scale(0.96); transition: opacity 0.35s ease, transform 0.45s var(--ease); }
.demo-bubble.me { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--ink); color: #f7f5f1; }
.demo-bubble.in { opacity: 1; transform: none; }
.demo-bubble[hidden] { display: none; }
.demo-field { min-height: 52px; margin-top: 10px; padding: 14px 18px; border-radius: 20px; background: #efece6; font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -0.005em; transition: opacity 0.3s ease; }
.demo-placeholder { color: #a29d92; }
.demo-word { display: inline-block; white-space: pre; opacity: 0; transition: opacity 0.35s ease, filter 0.35s ease; filter: blur(5px); }
.demo-word.in { opacity: 1; filter: none; }
.demo-mail { padding: 14px 16px; border-radius: 16px; background: #efece6; }
.demo-mail small { display: block; font-size: 12.5px; font-weight: 600; color: #8c887e; }
.demo-mail b { display: block; margin-top: 2px; font-size: 15px; }
.demo-mail p { margin-top: 6px; font-size: 14px; font-weight: 500; line-height: 1.45; color: #5a564d; }
.demo-reply { margin-top: 10px; flex: 1; min-height: 0; }
.demo-reply .demo-field { min-height: 110px; margin-top: 0; font-size: 15.5px; }
.demo-toasts { display: flex; flex-direction: column; gap: 10px; }
.demo-note { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 20px; background: #fffdf9; box-shadow: 0 1px 2px rgba(70, 55, 30, 0.08), 0 12px 28px rgba(70, 55, 30, 0.14); opacity: 0; transform: scale(0.96); transition: opacity 0.35s ease, transform 0.45s var(--ease); }
.demo-note.in { opacity: 1; transform: none; }
.demo-note img { flex: none; width: 40px; height: 40px; }
.demo-note b { display: block; font-size: 15px; font-weight: 700; }
.demo-note span { display: block; margin-top: 2px; font-size: 14px; font-weight: 500; color: var(--muted); }

.demo-say { position: absolute; left: 26px; right: 26px; bottom: 78px; min-height: 26px; text-align: center; font-size: 15px; font-weight: 600; color: #8c887e; opacity: 0; transition: opacity 0.3s ease; }
.demo-say.in { opacity: 1; }

.demo-dock { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; }
.demo-pill { position: relative; width: 40px; height: 40px; border-radius: 20px; background: #f7f5f1; box-shadow: inset 0 0 0 1px rgba(37, 35, 30, 0.34), 0 6px 18px rgba(70, 55, 30, 0.18); overflow: hidden; opacity: 0; transform: scale(0.6); transition: width 0.55s var(--ease), opacity 0.3s ease, transform 0.45s var(--ease); }
.demo-pill.open { width: 256px; opacity: 1; transform: none; }
.demo-pill.closing { width: 40px; opacity: 0; transform: scale(0.8); transition: width 0.45s var(--ease), opacity 0.38s ease 0.3s, transform 0.6s var(--ease); }
.demo-pill-body { position: absolute; left: 0; bottom: 0; width: 256px; height: 40px; padding: 6px; display: flex; align-items: center; gap: 7px; opacity: 0; transition: opacity 0.25s ease; }
.demo-pill.open .demo-pill-body { opacity: 1; transition-delay: 0.12s; }
.demo-round { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.demo-round svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-cancel { background: #25231e; color: #f7f5f1; }
.demo-send { background: #e9e5dc; color: #25231e; }
.demo-wave { flex: 1; height: 28px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.demo-wave i { display: block; width: 2px; height: 3px; border-radius: 1px; background: #25231e; }

.demo-steps { display: flex; justify-content: center; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: step; }
.demo-steps li { counter-increment: step; display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); transition: background-color 0.3s ease, color 0.3s ease; }
.demo-steps li::before { content: counter(step); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(70, 55, 30, 0.06); font-size: 12px; }
.demo-steps li.on { background: #fffdf9; color: var(--ink); }

.toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(340px, calc(100vw - 32px));
  padding: 12px 16px 12px 12px;
  border-radius: 22px;
  background: #fffdf9;
  box-shadow: 0 1px 2px rgba(70, 55, 30, 0.08), 0 12px 32px rgba(70, 55, 30, 0.16), inset 0 0 0 1px rgba(70, 55, 30, 0.06);
  animation: toast-in 0.55s var(--ease) both;
}

.toast.leaving { animation: toast-out 0.3s ease both; }
.toast img { flex: none; width: 40px; height: 40px; }
.toast b { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; }
.toast span { display: block; margin-top: 1px; font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--muted); }

@keyframes toast-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: scale(0.96); }
}

@keyframes appear {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .email { padding-right: 120px; }
  .demo-card { height: 450px; }
  .demo-pill.open { width: min(256px, calc(100vw - 80px)); }
  .demo-steps { gap: 4px; }
  .demo-steps li { padding-right: 10px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .icon, h1, .lead, .join, .platforms { animation: none; }
  .join-block, .done, .button { transition: opacity 0.3s ease; transform: none !important; filter: none !important; }
  .toast { animation-name: fade-only; }
  .toast.leaving { animation-name: fade-out-only; }
}

@keyframes fade-only { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out-only { to { opacity: 0; } }


@keyframes shake {
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.js .reveal { opacity: 0; transform: scale(0.98); transition: opacity 0.5s ease, transform 0.6s var(--ease); transition-delay: calc(var(--reveal-order, 0) * 90ms); }
.js .reveal.in-view { opacity: 1; transform: none; }
