:root {
  --white: #ffffff;
  --bg: #f9fafb;
  --text: #111111;
  --sub: #6b7280;
  --border: #e5e7eb;
  --accent: #111111;
  --bg-main: #ffffff;
  --bg-sub: #f3f4f6;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.section {
  padding: 80px 0;

  &--light {
    background: var(--bg-sub);
  }
}

.section__title {
  font-size: 30px;
  margin-bottom: 12px;
  line-height: 1.2;
  font-weight: 600;

  display: inline-block;
  position: relative;
  padding-bottom: 14px;
}

.section__title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: #1e3a8a;
  border-radius: 999px;
}


.section__text {
  margin: 0 0 28px;
  color: var(--sub);
  white-space: normal;
}

.section__footer {
  text-align: center;
  padding: 15px;
}

.section .container {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
  padding: 28px;
}

.header {
  position: sticky;
  top: 0;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
  z-index: 20;

  &__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
  }
}

.logo {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

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

    &:hover {
      text-decoration: underline;
    }
  }
}

.nav a+a {
  margin-left: 14px;
}

.top {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: center;

  &__text h1 {
    font-size: 32px;
    margin: 0 0 10px;
    font-weight: 700;
  }

  &__buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 28px;
    justify-self: flex-start;
  }
}

.top__notetitle {
  font-size: 12px;
  font-weight: 700;
  color: var(--sub);
  margin: 0;
  margin-bottom: 2px;
}

.top__notetags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top__notetags span {
  background: #f1f5f9;
  padding: 6px 10px;
  border-radius: 8px;  
  font-size: 13px;
  color: #475569;
  border: 1px solid #e2e8f0;
}


.top__image img {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
}

.top__buttons {
  margin-top: 15px;
}


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

.btn {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;

  &:hover {
    opacity: 0.92;
    transform: translateY(-1px);
  }

  &--sub {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
  }
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  transition: transform .2s ease, box-shadow .2s ease;

  h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-weight: 600;
  }

  p {
    margin: 0;
    color: var(--sub);
  }

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  }
}

.cards--portfolio .card {
  padding: 12px;
}

a.card.card--link {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.card.card--link img {
  width: 100%;
  border-radius: 14px;
  display: block;
  margin-bottom: 8px;
  transition: transform .25s ease;
}

a.card.card--link:hover img {
  transform: scale(1.03);
}

a.card.card--link:hover h3 {
  color: var(--accent);
}

.form {
  background: var(--bg-sub);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--border);

  &__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
  margin-bottom: 12px;
  background: var(--white);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.small-note {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--sub);
}

.links__items {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 16px 40px;
  justify-content: start;
  margin-top: 20px;
}

.links__items a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: 0.2s;
}

.links__items i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--white);
}

.links__items a:hover i {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.links__items span {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: var(--sub);
  background: var(--bg);
}

#flow.section--light { background: #fff; }

#flow .steps {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

#flow .step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: start;
  position: relative;
}

#flow .step__badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #1e3a8a;
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 16px;
  justify-self: center;
  margin-top: 4px;
}

#flow .step__badge::after { display: none; }

#flow .step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 32px;     
  top: 68px;       
  bottom: -10px;  
  border-left: 2px dotted #e2e8f0;
}

#flow .step__body {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 22px;
}

#flow .step__title {
  margin: 0 0 8px;
  line-height: 1.2;
  font-size: 18px;
  font-weight: 700;
}

#flow .step__text {
  margin: 0;
  color: #6b7280;
  line-height: 1.9;
}

.section__head {
  text-align: center;
}


@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .top { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }

  .top__image img { max-width: 200px; }
  .top__buttons { justify-content: center; }

  .section .container { padding: 20px; }

  .header__inner {
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
  }

  .nav {
    display: flex;
    gap: 18px;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .nav a { flex: 0 0 auto; }

  #flow .step:not(:last-child)::before { bottom: 10px; }
}

