:root {
  --brand-red: #c7192d;
  --brand-red-dark: #a70f21;
  --button-blue: #1a7efb;
  --black: #202020;
  --grey: #666666;
  --border: #d9d9d9;
  --white: #ffffff;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--black);
  background: #19cde5;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background-image: url("/assets/water-ripples.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px 20px;
}

.form-wrapper {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 36px rgba(0, 82, 106, 0.22);
}

.site-logo {
  display: block;
  width: min(100%, 330px);
  height: auto;
  margin: 0 auto 30px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--black);
  font-size: 15px;
  font-weight: 700;
}

.field label span {
  color: var(--brand-red);
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--black);
  background: var(--white);
}

.field input,
.field select {
  padding: 0 13px;
}

.field select {
  cursor: pointer;
}

.field input:focus,
.field select:focus {
  border-color: var(--brand-red);
  outline: 2px solid rgba(199, 25, 45, 0.14);
  outline-offset: 1px;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  min-height: 0;
  margin: 6px 0 0;
  color: var(--error);
  font-size: 13px;
}

.field-error:not(:empty) {
  min-height: 16px;
}

.consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--black);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
}

.consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--brand-red);
}

.consent-error {
  margin-left: 28px;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-alert {
  display: none;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.45;
}

.form-alert.is-visible {
  display: block;
}

.form-alert.is-error {
  color: #7a1710;
  background: #fef3f2;
}

.form-alert.is-success {
  color: #165b2f;
  background: #ecfdf3;
}

.submit-button {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  border: 0;
  border-radius: 4px;
  color: var(--white);
  background: var(--button-blue);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.submit-button:hover {
  background: var(--brand-red);
}

.submit-button:focus-visible {
  outline: 3px solid rgba(199, 25, 45, 0.22);
  outline-offset: 3px;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-loader {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.submit-button.is-loading .button-loader {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .page-shell {
    padding: 24px 14px;
  }

  .form-wrapper {
    padding: 28px 20px;
    border-radius: 8px;
  }

  .site-logo {
    width: min(100%, 280px);
    margin-bottom: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button-loader {
    animation: none;
  }
}
