:root {
  --black: #111111;
  --white: #ffffff;
  --green: #22c55e;
  --green-dark: #16a34a;
  --gray: #656565;
  --light-gray: #f3f4f3;
  --border: #d9ddd9;
  --page-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--black);
  background: var(--white);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

body > header,
main > section,
footer {
  padding-right: max(24px, calc((100vw - var(--page-width)) / 2));
  padding-left: max(24px, calc((100vw - var(--page-width)) / 2));
}

body > header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

header img,
footer img {
  display: block;
  width: auto;
}

header img {
  height: 48px;
}

footer img {
  height: 40px;
}

header > a {
  display: flex;
  align-items: center;
}

nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

nav a {
  color: var(--black);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--green-dark);
}

.menu-toggle {
  display: none;
}

main > section {
  padding-top: 110px;
  padding-bottom: 110px;
}

main > section:first-child {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 84px);
  padding-top: clamp(110px, 17vh, 190px);
  padding-bottom: 130px;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 20%, rgba(34, 197, 94, 0.2), transparent 32%),
    var(--black);
}

main > section:first-child::after {
  position: absolute;
  right: max(24px, calc((100vw - var(--page-width)) / 2));
  bottom: -150px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  border-radius: 50%;
  content: "";
}

section > p:first-child {
  margin: 0 0 20px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

main > section:first-child > p:first-child,
#sample > p:first-child {
  color: var(--green);
}

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

h1 {
  max-width: 850px;
  margin-bottom: 28px;
  font-size: clamp(3.25rem, 7vw, 6.8rem);
  font-weight: 750;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

h2 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(2.25rem, 4.5vw, 4.2rem);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

main > section:first-child > p:nth-of-type(2) {
  max-width: 650px;
  margin-bottom: 42px;
  color: #c9cec9;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

main > section:first-child > a {
  display: inline-block;
  padding: 16px 24px;
  border-radius: 4px;
  color: var(--black);
  background: var(--green);
  font-weight: 800;
  text-decoration: none;
}

main > section:first-child > a:hover,
main > section:first-child > a:focus-visible,
button:hover,
button:focus-visible {
  background: #4ade80;
  transform: translateY(-2px);
}

#service {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

#service > p,
#service > h2 {
  grid-column: 1 / -1;
}

#service > p:nth-of-type(2) {
  max-width: 680px;
  margin-bottom: 42px;
  color: var(--gray);
  font-size: 1.08rem;
}

article {
  min-height: 230px;
  padding: 32px;
  border-top: 3px solid var(--green);
  background: var(--light-gray);
}

article p,
li p {
  color: var(--gray);
}

#process {
  color: var(--white);
  background: var(--black);
}

#process ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 60px 0 0;
  padding: 0;
  counter-reset: process;
  list-style: none;
}

#process li {
  padding: 35px 35px 10px;
  border-top: 1px solid #454545;
  counter-increment: process;
}

#process li + li {
  border-left: 1px solid #454545;
}

#process li::before {
  display: block;
  margin-bottom: 65px;
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 800;
  content: "0" counter(process);
}

#process li p {
  color: #b7bcb7;
}

#sample {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(400px, 1fr);
  gap: clamp(50px, 10vw, 130px);
  color: var(--white);
  background: #191919;
}

#sample > p:first-child {
  grid-column: 1;
  align-self: end;
  margin-bottom: -35px;
}

#sample h2,
#sample > p:nth-of-type(2) {
  grid-column: 1;
}

#sample h2 {
  align-self: start;
}

#sample > p:nth-of-type(2) {
  color: #b7bcb7;
}

form {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 3;
  gap: 10px;
  padding: clamp(28px, 5vw, 50px);
  color: var(--black);
  background: var(--white);
}

label {
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 10px 2px 12px;
  color: var(--black);
  background: transparent;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--green-dark);
  outline: none;
}

button {
  margin-top: 22px;
  border: 0;
  border-radius: 4px;
  padding: 16px 22px;
  color: var(--black);
  background: var(--green);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.form-status {
  margin: 10px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-status.is-success {
  color: var(--green-dark);
}

.form-status.is-error {
  color: var(--black);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 130px;
  border-top: 1px solid var(--border);
}

footer p {
  margin-bottom: 0;
  color: var(--gray);
  font-size: 0.88rem;
}

@media (max-width: 760px) {
  #service,
  #process,
  #sample {
    scroll-margin-top: 72px;
  }

  body > header {
    min-height: 72px;
  }

  nav {
    position: absolute;
    top: 100%;
    right: 24px;
    left: 24px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--border);
    background: var(--white);
    box-shadow: 0 18px 45px rgba(17, 17, 17, 0.14);
  }

  nav.is-open {
    display: flex;
  }

  nav a {
    padding: 13px 12px;
  }

  button.menu-toggle {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--white);
    transform: none;
  }

  button.menu-toggle:hover,
  button.menu-toggle:focus-visible {
    background: var(--light-gray);
    transform: none;
  }

  button.menu-toggle:focus-visible {
    outline: 2px solid var(--green-dark);
    outline-offset: 2px;
  }

  .menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--black);
  }

  header img {
    height: 38px;
  }

  footer img {
    height: 32px;
  }

  main > section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  main > section:first-child {
    min-height: auto;
  }

  main > section:first-child::after {
    right: -110px;
    bottom: -160px;
    width: 240px;
    height: 240px;
  }

  #service,
  #process ol,
  #sample {
    grid-template-columns: 1fr;
  }

  #service > * {
    grid-column: 1;
  }

  #process li {
    padding-right: 0;
    padding-left: 0;
  }

  #process li + li {
    border-left: 0;
  }

  #process li::before {
    margin-bottom: 35px;
  }

  #sample > p:first-child,
  #sample h2,
  #sample > p:nth-of-type(2),
  form {
    grid-column: 1;
    grid-row: auto;
  }

  #sample > p:first-child {
    margin-bottom: -25px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-top: 35px;
    padding-bottom: 35px;
  }
}
