/* Крабобот landing — palette from krabobot web chat */
:root {
  --navy: #003366;
  --navy-deep: #001a33;
  --accent: #007bff;
  --cyan: #00e5ff;
  --bg-page: #f0f6fc;
  --surface: #ffffff;
  --border: #c5d9ef;
  --border-soft: #e4eef8;
  --text: #0d2137;
  --muted: #5a6f85;
  --user: #0d8f4a;
  --assistant-bg: #e8f0fb;
  --shadow: 0 8px 32px rgba(0, 51, 102, 0.1);
  --radius: 14px;
  --header-h: 6.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-page);
  background-image: radial-gradient(
    ellipse 120% 70% at 50% -15%,
    rgba(0, 229, 255, 0.1),
    transparent 55%
  );
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  font-size: 0.88em;
  background: rgba(0, 51, 102, 0.06);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-wrap {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 1px 0 rgba(0, 51, 102, 0.04);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-brand:hover {
  text-decoration: none;
  opacity: 0.88;
}

.site-brand__logo {
  display: block;
  height: 6rem;
  width: auto;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--navy);
  text-decoration: none;
}

.site-nav__cta {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 55%, #004080 100%);
  color: #fff !important;
}

.site-nav__cta:hover {
  filter: brightness(1.08);
}

.site-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.site-nav-toggle__bar {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin-inline: auto;
  background: var(--navy);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  padding: 3rem 0 4rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.hero__badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 123, 255, 0.2);
  border-radius: 999px;
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--navy-deep);
}

.hero__title-accent {
  display: block;
  background: linear-gradient(90deg, var(--navy) 0%, var(--accent) 55%, #00a8cc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 0 0 1.5rem;
  max-width: 36rem;
  color: var(--muted);
}

.hero__lead strong {
  color: var(--text);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.35rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: linear-gradient(180deg, #1a8cff 0%, var(--accent) 100%);
  color: #fff;
  border-color: #0066d6;
  box-shadow: 0 4px 14px rgba(0, 123, 255, 0.35);
}

.btn--primary:hover {
  filter: brightness(1.05);
}

.btn--ghost {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card__head {
  display: flex;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 100%);
}

.hero-card__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.hero-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hero-card__line {
  margin: 0;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.95rem;
}

.hero-card__line--user {
  align-self: flex-end;
  max-width: 85%;
  background: #dcf3e8;
  color: #0d4f24;
}

.hero-card__line--bot {
  align-self: flex-start;
  max-width: 92%;
  background: var(--assistant-bg);
  color: var(--text);
}

.hero-card__crab {
  margin-right: 0.25rem;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section--alt {
  background: rgba(255, 255, 255, 0.65);
  border-block: 1px solid var(--border-soft);
}

.section__head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.section__head h2 {
  margin: 0 0 0.5rem;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--navy);
}

.section__head p {
  margin: 0;
  color: var(--muted);
}

/* Features */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 51, 102, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.feature-card__icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.65rem;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Channels */
.channels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.channel-card {
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
}

.channel-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--navy);
}

.channel-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.channel-card__tag {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

/* Access */
.access {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.access h2 {
  margin: 0 0 0.75rem;
  font-size: 1.65rem;
  color: var(--navy);
}

.access p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.access__list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text);
}

.access__list li {
  margin-bottom: 0.4rem;
}

.access__commands {
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.access__commands-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy);
}

.cmd-list {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.cmd-list div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.9rem;
}

.cmd-list dt {
  margin: 0;
  font-weight: 800;
  color: var(--navy);
}

.cmd-list dd {
  margin: 0;
  color: var(--muted);
}

/* Start */
.code-block {
  margin: 0 0 1rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e8f4ff;
  background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 229, 255, 0.15);
  box-shadow: var(--shadow);
}

.code-block code {
  background: none;
  padding: 0;
  color: inherit;
}

.start__hint {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.mode-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.mode-card h3 {
  margin: 0 0 0.35rem;
  font-family: ui-monospace, monospace;
  font-size: 1rem;
  color: var(--accent);
}

.mode-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: rgba(255, 255, 255, 0.85);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--cyan);
}

.site-footer a:hover {
  color: #fff;
}

.donate {
  display: flex;
  justify-content: center;
}

.donate__form {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
  padding: 2rem 1.75rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.donate__head {
  margin-bottom: 1.5rem;
}

.donate__title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
}

.donate__lead {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--muted);
}

.donate__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.85rem 1rem;
}

.donate__field {
  flex: 0 1 auto;
  min-width: 9rem;
}

.donate__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.donate__input {
  box-sizing: border-box;
  width: 100%;
  min-width: 9rem;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--navy);
  text-align: center;
  background: var(--bg-page);
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(0, 51, 102, 0.06);
  appearance: textfield;
  -moz-appearance: textfield;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.donate__input::-webkit-outer-spin-button,
.donate__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.donate__input:hover {
  border-color: #9eb8d4;
}

.donate__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 2px rgba(0, 51, 102, 0.06),
    0 0 0 3px rgba(0, 123, 255, 0.2);
}

.donate__submit {
  flex: 0 0 auto;
  align-self: flex-end;
  min-height: 3.05rem;
  border: none;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
  }

  .access {
    grid-template-columns: 1fr;
  }

  .modes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .donate__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .donate__field {
    min-width: 0;
  }

  .donate__submit {
    width: 100%;
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .site-nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.75rem 1rem;
    border-radius: 10px;
  }

  .site-nav a:hover {
    background: var(--bg-page);
  }

  .site-nav__cta {
    text-align: center;
    margin-top: 0.5rem;
  }

  .cmd-list div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}
