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

:root {
  --bg: #ffffff;
  --bg-soft: #f7f6f3;
  --bg-card: #ffffff;
  --text: #1c1c1c;
  --text-muted: #6b6b6b;
  --accent: #3d6b9e;
  --accent-soft: #eef3f8;
  --border: #e8e6e1;
  --shadow: 0 1px 3px rgba(28, 28, 28, 0.06);
  --shadow-md: 0 8px 24px rgba(28, 28, 28, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 68px;
  --font: "Onest", system-ui, sans-serif;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1040px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.header--scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-transform: lowercase;
}

.logo--small {
  font-size: 1rem;
}

.logo__mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  position: relative;
}

.logo__mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 3px;
}

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

.nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav a:hover {
  color: var(--text);
}

.nav__cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent) !important;
  border: 1px solid #d6e3ef;
}

.nav__cta:hover {
  background: #e3edf6;
  color: var(--accent) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

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

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

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

/* Hero */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 4rem) 0 5rem;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.hero__glow {
  display: none;
}

.hero__badge {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #d6e3ef;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 14ch;
}

.hero__title span {
  color: var(--accent);
}

.hero__lead {
  max-width: 560px;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: #345f8d;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: #ccc9c2;
  background: var(--bg-soft);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.hero__stats li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero__stats strong {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}

.hero__stats span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.section--alt {
  background: var(--bg-soft);
}

.section__head {
  max-width: 560px;
  margin-bottom: 2.25rem;
}

.section__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section__head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.section__desc {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Cards */
.cards {
  display: grid;
  gap: 1rem;
}

.cards--4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.85rem;
  line-height: 1;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Tasks */
.tasks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.tasks__group {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tasks__group h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.tasks__group li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.55rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tasks__group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Works */
.works {
  display: grid;
  gap: 1rem;
}

.work {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.work:hover {
  box-shadow: var(--shadow-md);
}

.work__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.work__tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  padding: 0.25rem 0.55rem;
  background: var(--accent-soft);
  border-radius: 999px;
}

.work__link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

.work__link:hover {
  text-decoration: underline;
}

.work h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.work p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Payment */
.section--payment {
  background: var(--bg);
}

.payment {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.payment__content h2 {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  font-weight: 600;
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.payment__content > p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 500px;
  font-size: 0.95rem;
}

.payment__steps {
  display: grid;
  gap: 0.5rem;
}

.payment__steps li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.payment__steps span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.payment__card {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment__card-inner {
  text-align: center;
}

.payment__card-inner p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.payment__card-inner strong {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

/* Contact */
.section--contact {
  padding-bottom: 5rem;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact__text h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

.contact__text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact__actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.contact__actions .btn {
  width: 100%;
  padding-inline: 1rem;
}

.contact__actions .btn--email {
  grid-column: 1 / -1;
}

.btn--email {
  font-size: 0.95rem;
  word-break: break-all;
}

/* Footer */
.footer {
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.footer__contacts a {
  font-size: 0.9rem;
  color: var(--accent);
  transition: color var(--transition);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer__legal a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__legal a:hover {
  color: var(--accent);
}

/* Legal pages */
.legal {
  padding: calc(var(--header-h) + 2.5rem) 0 4rem;
}

.legal__inner {
  max-width: 720px;
}

.legal h1 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.legal__updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.legal h2 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.6rem;
}

.legal p,
.legal li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal ul {
  padding-left: 1.2rem;
  margin-bottom: 0.75rem;
}

.legal li {
  margin-bottom: 0.35rem;
  list-style: disc;
}

.legal a {
  color: var(--accent);
}

/* Chat */
.chat {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
}

.chat__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background var(--transition), transform var(--transition);
}

.chat__toggle:hover {
  background: #345f8d;
  transform: translateY(-1px);
}

.chat__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(340px, calc(100vw - 2rem));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.chat__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
}

.chat__header strong {
  display: block;
  text-transform: lowercase;
  font-size: 0.95rem;
}

.chat__header span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat__close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.chat__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.chat__messages {
  max-height: 240px;
  overflow-y: auto;
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.55rem;
}

.chat__msg {
  max-width: 90%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.chat__msg--bot {
  background: var(--bg-soft);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat__msg--user {
  justify-self: end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat__msg--status {
  justify-self: center;
  max-width: 100%;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0;
}

.chat__form {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem 1rem 1rem;
  border-top: 1px solid var(--border);
}

.chat__input,
.chat__textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}

.chat__input:focus,
.chat__textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: #b8cfe3;
}

.chat__send {
  width: 100%;
}

.chat__send:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

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

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

  .nav a {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .nav a:last-child {
    border-bottom: none;
    margin-top: 0.35rem;
    text-align: center;
  }

  .hero {
    padding-top: calc(var(--header-h) + 2.5rem);
  }

  .hero__title {
    max-width: none;
  }

  .hero__stats {
    gap: 1.25rem;
  }

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

  .payment__card {
    width: 100%;
    height: 120px;
  }

  .contact {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

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

  .chat {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .chat__toggle-text {
    display: none;
  }

  .chat__toggle {
    width: 52px;
    height: 52px;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(1040px, calc(100% - 1.25rem));
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .cards--4 {
    grid-template-columns: 1fr;
  }
}
