/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background-color: #ffffff;
  line-height: 1.5;
}

/* ---------- Header ---------- */
.site-header {
  background-color: #1f6fb8;   /* blue header, matches reference */
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-link {
  display: block;
  height: 40px;
}

.logo-img {
  display: block;
  height: 100%;
  width: auto;
  transition: opacity 0.15s ease;
}

.logo-link:hover .logo-img {
  opacity: 0.85;
}

/* ---------- Hero / Landing section ---------- */
/* Single centered column: image on top, welcome content below.
   Works the same way at every screen size, mobile included. */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 24px;
}

.hero-image {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;   /* scales to the image's real proportions — nothing gets cropped */
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.welcome-message {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1a1a1a;
}

.welcome-subtext {
  font-size: 15px;
  color: #555555;
  margin-bottom: 32px;
}

.enter-button {
  display: inline-block;
  background-color: #1f6fb8;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 32px;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}

.enter-button:hover {
  background-color: #185a95;
}

.enter-button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---------- Signup form (page 2) ---------- */
.form-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px;
}

.form-card {
  background-color: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 36px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.form-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.form-subtitle {
  font-size: 14px;
  color: #666666;
  margin-bottom: 30px;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
  min-width: 0; /* lets inputs shrink below their content width instead of overflowing */
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #333333;
}

/* The name row's "(optional)" tag always sits on its own line (rather than
   wrapping unpredictably depending on the browser's font metrics), and the
   First/Last labels reserve a matching blank second line via a hidden
   placeholder — so all three boxes in the row line up no matter what. */
.name-row .form-group label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.optional-tag {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #888888;
}

.optional-tag[aria-hidden="true"] {
  visibility: hidden;
}

/* Day / Month / Year fields */
.dob-row {
  gap: 12px;
}

.dob-row .sub-label {
  font-size: 12px;
  font-weight: 400;
  color: #777777;
}

.form-group input,
.form-group select {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.3;
  color: #1a1a1a;
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 6px;
  height: 44px;
  padding: 0 14px;
}

/* Native <select> elements render their own inconsistent internal padding
   across browsers/OSes, which is what made their text look off-centre
   compared to text inputs. Stripping the native appearance and adding a
   custom arrow puts selects on exactly the same box model as inputs. */
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23666666' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px;
  cursor: pointer;
}

.form-group input::placeholder {
  color: #a3a3a3;
}

.form-group input:hover,
.form-group select:hover {
  border-color: #b3b3b3;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #1f6fb8;
  box-shadow: 0 0 0 3px rgba(31, 111, 184, 0.15);
}

.form-submit {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Retry button sits above the Home link when both are shown, so give the
   pair a gap without relying on form-submit's own margin-top twice. */
#retryBtn {
  margin-bottom: 12px;
}

/* Inline success/error banner (used on the single-page variant, kept here
   in case you reintroduce inline validation messages anywhere). */
.status-banner {
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.status-banner-success {
  background-color: #eaf6ec;
  border: 1px solid #bfe3c5;
  color: #1e7a34;
}

.status-banner-error {
  background-color: #fdecec;
  border: 1px solid #f3c2c2;
  color: #b3261e;
}

/* ---------- Plan / user-count selection (page 3) ---------- */
.user-count-fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-count-fieldset legend {
  font-size: 13px;
  font-weight: 600;
  color: #333333;
  padding: 0;
  margin-bottom: 4px;
}

.radio-row {
  display: flex;
  gap: 12px;
}

.radio-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #cccccc;
  border-radius: 6px;
  font-size: 14px;
  color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.radio-option:hover {
  border-color: #b3b3b3;
}

.radio-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #1f6fb8;
  cursor: pointer;
}

.radio-option:has(input:checked) {
  border-color: #1f6fb8;
  background-color: rgba(31, 111, 184, 0.06);
}

/* Additional-user sections: hidden until a user-count option is chosen,
   then only the matching block (3 or 6 users) is shown. */
.extra-users {
  display: none;
  flex-direction: column;
  gap: 18px;
  padding-top: 4px;
  border-top: 1px solid #eeeeee;
}

.form-card:has(#count20:checked) .extra-users-20 {
  display: flex;
}

.form-card:has(#count32:checked) .extra-users-32 {
  display: flex;
}

.section-heading {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
}

.section-heading .optional-tag {
  display: inline;
  font-weight: 400;
  font-size: 12px;
  margin-left: 4px;
}

.user-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background-color: #fafafa;
  border: 1px solid #eeeeee;
  border-radius: 6px;
}

.user-block-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #888888;
}

/* ---------- Processing / confirmation (page 4) ---------- */
.processing-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.status-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1f6fb8;
  border-radius: 50%;
  margin-bottom: 20px;
  transition: background-color 0.15s ease;
}

.status-icon-sending {
  background-color: #6b7c8f;
}

.status-icon-success {
  background-color: #1e7a34;
}

.status-icon-error {
  background-color: #b3261e;
}

.processing-title {
  margin-bottom: 10px;
}

.processing-subtitle {
  max-width: 420px;
  margin-bottom: 28px;
}

.reference-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 20px;
  margin-bottom: 28px;
  background-color: #f5f8fc;
  border: 1px solid #dce7f2;
  border-radius: 8px;
  text-align: left;
}

.reference-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7c8f;
}

/* The submitted-fields summary, shown as preformatted text so multi-line
   content (one field per line) keeps its line breaks. */
.summary-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #1a1a1a;
  white-space: pre-wrap;
  word-break: break-word;
}

.processing-home-link {
  text-decoration: none;
  text-align: center;
}

/* ---------- Responsive ---------- */
/* The layout is already a single centered column at every width,
   so mobile just needs tighter spacing and a full-width button. */
@media (max-width: 700px) {
  .hero {
    gap: 24px;
    padding: 32px 16px;
  }

  .enter-button {
    width: 100%;
  }

  .form-page {
    padding: 24px 16px;
  }

  .form-card {
    padding: 24px 20px;
  }

  .form-row {
    flex-direction: column;
    gap: 20px;
  }
}
