/* Shared styling for the Join-as-Nanny flow.

   Mobile-first, and aggressively short. The audience is on a low-end Android
   phone; every row of copy above the first input is a row that pushes the form
   off-screen. Target is that the first two fields are visible without
   scrolling on a 390x844 screen, so there is no hero, no marketing copy and no
   benefits list - the candidate arrived by tapping "Join as Nanny", she has
   already been sold.

   Other constraints:
   - No Tailwind CDN, no framework. Just this file.
   - Controls are >= 48px tall and the primary action sits in a fixed bottom
     bar, reachable one-handed.
   - Choices are visible tap targets, not <select>: an Android select opens a
     modal list that is easy to dismiss by accident. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #FF6B6B;
  --red-light: #FFF3F3;
  --ink: #0F1117;
  --ink-70: rgba(15, 17, 23, 0.7);
  --ink-45: rgba(15, 17, 23, 0.45);
  --ink-14: rgba(15, 17, 23, 0.14);
  --ink-07: rgba(15, 17, 23, 0.07);
  --white: #ffffff;
  --bg: #FAFAF8;
  --green: #0E9F6E;
  --green-light: #EAFBF5;
  --radius: 12px;
}

body {
  font-family: 'Andika', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* Clears the fixed action bar plus the iOS home indicator. */
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

.shell { max-width: 460px; margin: 0 auto; padding: 0 16px; }

/* ---- Header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.96);
  border-bottom: 1px solid var(--ink-07);
}

.site-header .bar {
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
}

.site-header .logo img { height: 26px; width: auto; display: block; }

.header-help {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
}

/* ---- Step progress --------------------------------------------------- */
/* Sits directly under the header. It is the only thing above the form, and
   doubles as the page's orientation - which is why there is no separate
   headline repeating "Step 1". */

.steps { display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; }

.steps-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-45);
  white-space: nowrap;
}

.steps-track { display: flex; gap: 4px; flex: 1; }

.steps-track span {
  flex: 1;
  height: 4px;
  border-radius: 100px;
  background: var(--ink-14);
}

.steps-track span.done { background: var(--red); }

/* ---- Landing pitch --------------------------------------------------- */
/* Only on index.html. This is the page that argues; every page after it is
   pure form, which is the whole reason this content is not sitting on top of
   step 1 any more. */

.pitch { padding: 22px 0 8px; }

.pitch h1 {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pitch h1 em { font-style: italic; color: var(--red); }

.pitch-sub {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-70);
}

.benefits { list-style: none; display: grid; gap: 8px; margin: 20px 0 14px; }

.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--white);
  border: 1px solid var(--ink-07);
  border-radius: 10px;
  padding: 12px 13px;
}

.benefits strong { display: block; font-size: 14px; margin-bottom: 1px; }
.benefits li > span:last-child { font-size: 13px; color: var(--ink-70); line-height: 1.4; }

.b-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--red-light);
  color: var(--red);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pitch-note { font-size: 13px; color: var(--ink-45); text-align: center; padding-bottom: 8px; }

/* ---- Card + fields --------------------------------------------------- */

.card {
  background: var(--white);
  border: 1px solid var(--ink-07);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.card h1 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 2px;
}

.card .card-sub {
  font-size: 13px;
  color: var(--ink-45);
  margin-bottom: 4px;
}

.field { margin-top: 14px; }

.field > label,
.field > .field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* Only for things a placeholder genuinely cannot say. Most fields should not
   have one - the placeholder carries the example. */
.field .hint {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-45);
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="date"],
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px; /* Below 16px makes iOS Safari zoom on focus. */
  line-height: 1.4;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--ink-14);
  border-radius: 10px;
  padding: 11px 13px;
  height: 48px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

/* Addresses run to two or three lines. Fixed height rather than auto-growing:
   a box that jumps as she types shifts the fields below it mid-tap. */
.field textarea { height: 68px; resize: none; }

.field input:focus,
.field textarea:focus { border-color: var(--red); }

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-45); }

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--red); background: var(--red-light); }

/* Age is a 2-digit answer; a full-width box invites a phone number. */
.field input.short { max-width: 130px; }

.phone-field { display: flex; }

.phone-field .prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-70);
  background: var(--bg);
  border: 1px solid var(--ink-14);
  border-right: none;
  border-radius: 10px 0 0 10px;
}

.phone-field input { border-radius: 0 10px 10px 0; flex: 1; min-width: 0; }

.field-error {
  display: none;
  margin-top: 5px;
  font-size: 12px;
  color: var(--red);
  font-weight: 700;
}

.field-error.show { display: block; }

/* ---- Choice chips ---------------------------------------------------- */

.choices { display: grid; gap: 8px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choices.wrap { grid-template-columns: 1fr 1fr; }

.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--white);
  border: 1px solid var(--ink-14);
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice .box {
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid var(--ink-14);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
}

.choice .box.round { border-radius: 50%; }
.choice .box.square { border-radius: 5px; }

.choice.selected { border-color: var(--red); background: var(--red-light); }
.choice.selected .box { background: var(--red); border-color: var(--red); color: var(--white); }

/* ---- Messages -------------------------------------------------------- */

.notice {
  display: none;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.notice.show { display: block; }
.notice.error { background: var(--red-light); border: 1px solid #FFD6D6; color: #B42318; }

/* ---- Fixed action bar ------------------------------------------------ */

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: rgba(250, 250, 248, 0.97);
  border-top: 1px solid var(--ink-07);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.action-bar .inner {
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
}

.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  height: 50px;
  padding: 0 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary { flex: 1; background: var(--red); color: var(--white); }
.btn-primary:disabled { background: #D1D5DB; cursor: not-allowed; }
.btn-ghost { flex: none; background: var(--white); color: var(--ink-70); border: 1px solid var(--ink-14); }

/* ---- Legal / footer -------------------------------------------------- */

.legal {
  font-size: 12px;
  color: var(--ink-45);
  text-align: center;
  padding-bottom: 16px;
}

.legal a { color: var(--ink-70); }

/* ---- Success --------------------------------------------------------- */

.success-wrap { padding: 28px 0 16px; text-align: center; }

.success-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  font-size: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-wrap h1 { font-size: 21px; font-weight: 700; line-height: 1.25; }
.success-wrap p { margin-top: 8px; font-size: 14px; color: var(--ink-70); }

.next-steps { text-align: left; display: grid; gap: 8px; margin-top: 20px; }

.next-step {
  display: flex;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--ink-07);
  border-radius: 10px;
  padding: 12px;
}

.next-step .num {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red-light);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.next-step strong { display: block; font-size: 14px; }
.next-step span { font-size: 13px; color: var(--ink-70); }
