* {
  box-sizing: border-box;
}

:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f6f8;
}

body {
  margin: 0;
  background: #f4f6f8;
}

.container {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 0 18px 40px;
}

.hero {
  min-height: 330px;
  margin: 0 -18px;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(12, 22, 40, .05), rgba(12, 22, 40, .78)),
    linear-gradient(135deg, #8c9aa8, #34495e);
  border-radius: 0 0 28px 28px;
  overflow: hidden;
}

.hero-overlay {
  color: white;
  padding: 34px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  opacity: .8;
}

h1 {
  margin: 8px 0;
  font-size: clamp(34px, 7vw, 58px);
  line-height: 1;
}

.hero p {
  max-width: 620px;
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.5;
  opacity: .92;
}

.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.photo {
  min-height: 125px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #657184;
  background: #dfe4e9;
  font-size: 13px;
}

.placeholder:first-child {
  min-height: 180px;
}

.card {
  background: white;
  border: 1px solid #e6e9ed;
  border-radius: 22px;
  padding: 26px;
  margin-top: 18px;
  box-shadow: 0 8px 30px rgba(20, 30, 45, .05);
}

.section-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eef2f6;
  font-size: 12px;
  font-weight: 800;
}

h2 {
  margin: 0;
  font-size: 23px;
}

.section-heading p {
  margin: 5px 0 0;
  color: #697386;
}

label {
  display: block;
  margin: 18px 0 8px;
  font-weight: 700;
}

label span {
  font-weight: 400;
  color: #8a94a6;
}

input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #d8dde5;
  border-radius: 12px;
  font: inherit;
  outline: none;
}

input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, .12);
}

.blocos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.bloco {
  padding: 14px 8px;
  border: 1px solid #d8dde5;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: .15s;
}

.bloco:hover {
  transform: translateY(-1px);
}

.bloco.selected {
  background: #172033;
  color: white;
  border-color: #172033;
}

.submit {
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  border: 0;
  border-radius: 12px;
  background: #172033;
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.submit:disabled {
  opacity: .55;
  cursor: wait;
}

.mensagem {
  min-height: 22px;
  margin: 12px 0 0;
  text-align: center;
  font-size: 14px;
}

.contagens {
  display: grid;
  gap: 12px;
}

.linha {
  display: grid;
  grid-template-columns: 90px 1fr 45px;
  align-items: center;
  gap: 12px;
}

.nome-bloco {
  font-weight: 700;
  font-size: 14px;
}

.barra {
  height: 10px;
  background: #edf0f3;
  border-radius: 999px;
  overflow: hidden;
}

.barra > div {
  height: 100%;
  width: var(--width);
  background: #172033;
  border-radius: inherit;
  transition: width .4s ease;
}

.quantidade {
  text-align: right;
  font-weight: 800;
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #edf0f3;
}

.total strong {
  font-size: 28px;
}

footer {
  text-align: center;
  color: #8a94a6;
  font-size: 12px;
  padding: 22px 10px;
}

@media (max-width: 620px) {
  .hero {
    min-height: 360px;
  }

  .hero-overlay {
    padding: 24px;
  }

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

  .photo:first-child {
    grid-column: 1 / -1;
  }

  .blocos {
    grid-template-columns: repeat(2, 1fr);
  }

  .card {
    padding: 20px;
  }
}
