:root {
  --blue: #1b3df5;
  --link-blue: #0c51fa;
  --blue-hover: #092fca;
  --border-blue: #0953fa;
  --light-blue: #dce6ff;
  --ink: #0e1430;
  --muted: #667085;
  --page-background: #e9e6df;
  --white: #ffffff;
  --field-background: #fbfcff;
  --field-border: #cbd6ef;
  --error: #c62828;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page-background);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.page-shell {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 40px;
}

.card {
  align-self: flex-start;
  width: min(760px, 100%);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 18px 44px rgba(20, 19, 16, 0.14);
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 36px;
  border-bottom: 1px solid var(--border-blue);
}

.rainfall-logo-link {
  display: inline-grid;
  width: 96px;
  height: 40px;
  align-items: center;
  text-decoration: none;
}

.rainfall-logo-link:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.rainfall-logo-animation,
.rainfall-logo-fallback {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
}

.rainfall-logo-animation {
  overflow: visible;
  opacity: 0;
}

.rainfall-logo-fallback {
  object-fit: contain;
}

.rainfall-logo-link.is-ready .rainfall-logo-animation {
  opacity: 1;
}

.rainfall-logo-link.is-ready .rainfall-logo-fallback {
  opacity: 0;
}

.rainfall-logo-animation svg {
  overflow: visible;
}

.rainfall-logo-animation svg path {
  fill: var(--blue) !important;
}

.page-label {
  margin: 0;
  padding: 6px 0;
  color: var(--link-blue);
  font-family: "Anton", sans-serif;
  font-size: 30px;
  font-weight: 400;
  text-transform: uppercase;
}

.card-content {
  padding: 46px 54px 56px;
}

/* Intro */

h1 {
  max-width: 590px;
  margin: 0 0 14px;
  color: var(--blue);
  font-family: "Anton", sans-serif;
  font-size: clamp(44px, 7vw, 62px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.subtitle {
  margin: 0 0 38px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border-blue);
  color: var(--link-blue);
  font-family: "Instrument Serif", serif;
  font-size: 20px;
  line-height: 1.35;
}

.subtitle span {
  display: block;
}

.subtitle span:first-child {
  font-style: italic;
}

/* Fields */

.field {
  margin-bottom: 25px;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 650;
}

.req {
  color: var(--blue);
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--field-border);
  border-radius: 0;
  outline: none;
  background: var(--field-background);
  color: var(--ink);
  font-size: 15px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}

input::placeholder,
textarea::placeholder {
  color: #8994a8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(27, 61, 245, 0.12);
}

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

select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230c51fa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  appearance: none;
}

.input-icon {
  position: relative;
}

.input-icon svg {
  position: absolute;
  top: 50%;
  left: 15px;
  color: var(--link-blue);
  transform: translateY(-50%);
}

.input-icon input {
  padding-left: 43px;
}

/* Attendance */

.attendance-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.radio-card {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 13px 15px;
  gap: 11px;
  border: 1px solid var(--field-border);
  background: var(--field-background);
  cursor: pointer;
  font-size: 14.5px;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}

.radio-card:hover {
  border-color: var(--border-blue);
}

.radio-card input {
  flex: none;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--blue);
}

.radio-card.selected {
  border-color: var(--blue);
  background: var(--light-blue);
  color: var(--blue);
}

/* Submit */

.submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
  padding: 19px 21px;
  border: 0;
  background: var(--blue);
  box-shadow: 0 8px 20px rgba(6, 26, 90, 0.2);
  color: var(--white);
  cursor: pointer;
  font-family: "Anton", sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.submit::after {
  content: "→";
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 20px;
  transition: transform 0.2s;
}

.submit:hover {
  background: var(--blue-hover);
  box-shadow: 0 11px 24px rgba(6, 26, 90, 0.28);
  transform: translateY(-2px);
}

.submit:hover::after {
  transform: translateX(6px);
}

.submit:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.submit:active {
  box-shadow: 0 3px 10px rgba(6, 26, 90, 0.2);
  transform: translateY(1px);
}

.submit:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

/* Inline validation */

.error-text {
  display: none;
  margin-top: 7px;
  color: var(--error);
  font-size: 13px;
}

.field.invalid input,
.field.invalid select,
.field.invalid .radio-card {
  border-color: var(--error);
}

.field.invalid .error-text {
  display: block;
}

/* Email gate */

.gate-banner {
  margin-bottom: 26px;
  padding: 15px 16px;
  border: 1px solid #ef9a9a;
  background: #fff4f2;
  color: #8f1d1d;
  font-size: 14px;
  line-height: 1.5;
}

.gate-banner a {
  color: #8f1d1d;
  font-weight: 700;
}

/* Adaptive bot challenge */

.challenge-wrap {
  margin-bottom: 26px;
  padding: 15px 16px;
  border: 1px solid var(--field-border);
  background: var(--field-background);
}

.challenge-wrap > p:first-child {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.challenge-error {
  margin: 10px 0 0;
  color: var(--error);
  font-size: 13px;
}

/* Confirmation states */

.result {
  min-height: 420px;
  padding: 66px 30px;
  text-align: center;
}

.result .icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
}

.result h2 {
  margin: 0 0 12px;
  color: var(--blue);
  font-family: "Anton", sans-serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
}

.result p {
  max-width: 490px;
  margin: 0 auto;
  color: var(--muted);
  font-family: "Instrument Serif", serif;
  font-size: 20px;
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .page-shell {
    padding: 16px;
  }

  .site-header {
    height: 58px;
    padding: 0 20px;
  }

  .rainfall-logo-link {
    width: 86px;
    height: 34px;
  }

  .page-label {
    font-size: 23px;
  }

  .card-content {
    padding: 34px 24px 40px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 56px);
  }

  .subtitle {
    margin-bottom: 30px;
    font-size: 18px;
  }

  .attendance-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .submit {
    padding: 18px 19px;
    font-size: 24px;
  }

  .result {
    min-height: 340px;
    padding: 46px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  input,
  select,
  textarea,
  .radio-card,
  .submit,
  .submit::after {
    transition-duration: 0.01ms;
  }
}
