:root {
  color-scheme: light;
  --ink: #162031;
  --muted: #687386;
  --paper: #f8fafc;
  --panel: #ffffff;
  --line: #dbe2ec;
  --blue: #27206f;
  --red: #ed1f28;
  --teal: #0d9488;
  --focus: rgba(13, 148, 136, 0.28);
  --shadow: 0 24px 70px rgba(22, 32, 49, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(39, 32, 111, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(237, 31, 40, 0.07), transparent 32%),
    var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.brand-panel,
.form-panel {
  min-width: 0;
}

.brand-panel {
  position: sticky;
  top: 32px;
  align-self: start;
}

.brand-card,
.form-panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(219, 226, 236, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.brand-card {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
  border-radius: 8px;
}

.logo {
  width: 156px;
  height: 156px;
  object-fit: contain;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 9ch;
  font-size: clamp(2.4rem, 6vw, 4.7rem);
  line-height: 0.96;
  color: var(--blue);
}

.brand-copy {
  max-width: 26rem;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.form-panel {
  padding: 34px;
  border-radius: 8px;
}

.form-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
}

form {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.section-title {
  padding-top: 6px;
  color: var(--blue);
  font-size: 0.95rem;
  font-weight: 800;
}

.grid {
  display: grid;
  gap: 18px;
}

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

label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

label span {
  color: #2b3547;
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--focus);
}

input:invalid:not(:placeholder-shown),
select:invalid:not(:focus) {
  border-color: rgba(237, 31, 40, 0.7);
}

.consent {
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.consent input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 4px;
}

button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(39, 32, 111, 0.24);
  transition:
    background 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

button:hover {
  background: #211a63;
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.76;
  transform: none;
}

.button-loader {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.status.success {
  color: #0f766e;
}

.status.error {
  color: #c81e2a;
}

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

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 18px 0;
  }

  .brand-panel {
    position: static;
  }

  .brand-card {
    min-height: auto;
    padding: 24px;
  }

  .logo {
    width: 112px;
    height: 112px;
    margin-bottom: 18px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2rem, 9vw, 3.4rem);
  }

  .brand-copy {
    margin-top: 16px;
  }

  .form-panel {
    padding: 22px;
  }
}

@media (max-width: 620px) {
  .grid.two {
    grid-template-columns: 1fr;
  }

  .form-heading {
    display: block;
  }

  .actions,
  button {
    width: 100%;
  }

  .status {
    width: 100%;
  }
}
