/*
 * arrive · area styles: splash, onboarding, sign in, reset, sign up,
 * permissions, ready. Every class here starts with "ar-".
 */

/* ── Splash (the owner's Figma) ─────────────────────────────────────────── */
.view.ar-splash {
  justify-items: center;
  background: radial-gradient(120% 55% at 88% 0%, rgba(255, 255, 255, 0.1), transparent 62%),
    linear-gradient(180deg, #2b4a96 0%, #1b6994 52%, #0d8479 100%);
}
.ar-splash .splash-c {
  gap: 0;
  margin-top: -36px;
}
.ar-splash-mark {
  display: block;
  line-height: 0;
  animation: ar-rise 900ms var(--ease-out) both;
}
.ar-splash-name {
  margin-top: 40px;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1;
  animation: ar-rise 900ms 120ms var(--ease-out) both;
}
.ar-splash-tag {
  margin-top: 12px;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
  animation: ar-rise 900ms 220ms var(--ease-out) both;
}
.ar-splash-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--safe-bottom) + 18px);
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
}
@keyframes ar-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ar-splash-mark,
  .ar-splash-name,
  .ar-splash-tag {
    animation: none;
  }
}

/* ── Onboarding ──────────────────────────────────────────────────────────── */
.ar-onb {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  touch-action: pan-y;
  overflow-x: clip; /* the heroes' glow is wider than the screen; clip it at the edge */
}
.ar-onb-text {
  padding-top: var(--s6);
}
.ob-title {
  font-size: var(--fs-t1);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.ob-body {
  margin-top: var(--s3);
  font-size: var(--fs-body);
  line-height: 1.45;
  color: var(--text-2);
}

/* The heroes: the Figma's, in CSS. A soft teal light behind each. */
.ob-hero {
  position: relative;
  flex: none;
  height: 320px;
  margin: var(--s2) var(--gutter) 0;
  display: grid;
  place-items: center;
}
.ob-glow {
  position: absolute;
  inset: -40px -60px;
  background: radial-gradient(closest-side, rgba(13, 148, 136, 0.13), rgba(13, 148, 136, 0.05) 60%, transparent);
  pointer-events: none;
}
.hc .ob-glow {
  display: none;
}

/* 1 · a heart rate under an open sky */
.ob-sky {
  position: relative;
  width: min(330px, 100%);
  height: 276px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(162deg, #1d4f9c 0%, #3c78c4 46%, #8db7e4 100%);
  box-shadow: 0 22px 44px -26px rgba(29, 79, 156, 0.7);
}
.ob-sun {
  position: absolute;
  right: 20px;
  top: 16px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 16%, rgba(255, 255, 255, 0.75) 26%, rgba(255, 255, 255, 0) 70%);
}
.ob-sun::after {
  content: "";
  position: absolute;
  inset: 31px -26px auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: rotate(-35deg);
}
.ob-cloud {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  filter: blur(14px);
}
.ob-cloud.c1 {
  left: 40%;
  top: 34%;
  width: 150px;
  height: 90px;
}
.ob-cloud.c2 {
  left: -14%;
  bottom: -10%;
  width: 260px;
  height: 100px;
  background: rgba(255, 255, 255, 0.7);
}
.ob-cloud.c3 {
  right: -12%;
  bottom: 8%;
  width: 180px;
  height: 60px;
  background: rgba(255, 255, 255, 0.6);
}
.ob-glass {
  position: absolute;
  inset: 66px 28px 46px;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 14px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.52);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  color: var(--slate-900);
}
.hc .ob-glass {
  background: rgba(255, 255, 255, 0.92);
}
.ob-glass-k {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ob-glass-v {
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.ob-glass-v .metric {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1;
}
.ob-glass-v .unit {
  font-size: 17px;
  font-weight: 500;
}
.ob-ecg {
  width: 100%;
  height: 46px;
  margin-top: auto;
  overflow: visible;
}

/* 2 · three clinicians, staggered */
.ob-hero-2 {
  display: block;
}
.ob-pcard {
  position: absolute;
  width: 87%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: 0 16px 30px -18px rgba(13, 148, 136, 0.45);
}
.hc .ob-pcard {
  box-shadow: inset 0 0 0 1px var(--slate-400);
}
.ob-pc1 {
  left: 0;
  top: 8px;
}
.ob-pc2 {
  right: 0;
  top: 116px;
}
.ob-pc3 {
  left: 0;
  top: 224px;
}
.ob-pcard .grow {
  min-width: 0;
}
.ob-pc-t,
.ob-pc-s {
  display: block;
}
.ob-pc-t {
  font-size: var(--fs-sub);
  font-weight: 600;
}
.ob-pc-s {
  margin-top: 2px;
  font-size: var(--fs-cap);
  color: var(--text-2);
}
.ob-online {
  flex: none;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: #ddf1ee;
  color: var(--teal-800);
  font-size: var(--fs-cap);
  font-weight: 600;
}
/* the page's own footer: no rule above it, the Figma's continuous white */
.view[data-route^="onboard-"] .foot {
  box-shadow: none;
  background: var(--bg);
}

/* 3 · the shield */
.ob-hero-3 .ob-glow {
  inset: -70px -80px;
  background: radial-gradient(closest-side, rgba(13, 148, 136, 0.16), rgba(13, 148, 136, 0.06) 62%, transparent);
}
.ob-shield {
  position: relative;
  color: var(--navy-600);
  line-height: 0;
}

/* the larger text sizes: the heroes give their height to the words */
.ts-xl .ob-hero,
.ts-ax .ob-hero {
  height: 240px;
}
.ts-xl .ob-sky,
.ts-ax .ob-sky {
  height: 220px;
}
.ts-xl .ob-glass,
.ts-ax .ob-glass {
  inset: 40px 22px 26px;
}
/* at the largest sizes the cards grow taller than their stagger allows: they
   stack in flow instead, full width, so none can cover another */
.ts-xl .ob-hero-2,
.ts-ax .ob-hero-2 {
  height: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s2) 0;
}
.ts-xl .ob-pcard,
.ts-ax .ob-pcard {
  position: relative;
  inset: auto;
  width: 100%;
}

.ar-lockcard {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: calc(100% - 40px);
  max-width: 330px;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 28px -10px rgba(0, 0, 0, 0.45);
  color: var(--slate-900);
  text-align: left;
}
.ar-lockcard .grow {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ar-lc-t {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.ar-lc-b {
  font-size: 14px;
  line-height: 1.3;
  color: var(--slate-700);
}
.ar-lc-time {
  flex: none;
  font-size: 13px;
  color: var(--slate-600);
}

.ar-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.ar-dots span {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--slate-300);
  transition: width var(--d-base) var(--ease-ios), background var(--d-fast);
}
.ar-dots span.on {
  width: 32px;
  background: var(--slate-900);
}
.hc .ar-dots span {
  background: var(--slate-500);
}
.hc .ar-dots span.on {
  background: var(--brand);
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.ar-form {
  padding-top: var(--s3);
}
.ar-forgot {
  display: flex;
  justify-content: flex-end;
  margin: 2px -12px 0 0;
}
.ar-or {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--fs-foot);
  color: var(--text-2);
}
.ar-or::before,
.ar-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.ar-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 4px;
  margin: -12px 0;
  color: var(--text-link);
  font-weight: 600;
  font-size: inherit;
  border-radius: 6px;
}
.ar-ink {
  color: var(--brand-ink);
}
.ar-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: 6px;
}
.ar-label-row .field-label {
  margin-bottom: 0;
}
.ar-why {
  font-size: var(--fs-foot);
}
.ar-select {
  position: relative;
  display: block;
}
.ar-select select.input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
}
.ar-select > .ic {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-2);
  pointer-events: none;
}
.ar-dob {
  border: 0;
  margin: var(--s4) 0 0;
  padding: 0;
  min-width: 0;
}
.ar-dob legend {
  padding: 0;
}
.ar-dob-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: var(--s2);
}
.ts-ax .ar-dob-row,
.ts-xl .ar-dob-row {
  grid-template-columns: minmax(0, 1fr);
}
.ar-form .field + .field,
.ar-form .field + fieldset,
.ar-form fieldset + .field {
  margin-top: var(--s4);
}
.ar-fs {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.ar-fs legend {
  padding: 0;
}

/* Password rules: met rules carry a check and the word "done" for VoiceOver. */
.ar-rules {
  margin-top: var(--s4);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ar-rules li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-foot);
  color: var(--text-2);
}
.ar-rules .ic {
  width: 18px;
  height: 18px;
  color: var(--slate-400);
}
.ar-rules li.ok {
  color: var(--ok);
  font-weight: 600;
}
.ar-rules li.ok .ic {
  color: var(--ok-icon);
}
.hc .ar-rules .ic {
  color: var(--slate-600);
}

/* Checkbox and radio rows */
.ar-agree {
  /* aligned with the fields above it (the form's gutter), and clear of the rules */
  margin-inline: var(--gutter);
  margin-top: var(--s6);
}
.ar-check {
  align-items: flex-start;
  padding-top: 14px;
  padding-bottom: 14px;
}
.ar-box {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 2px var(--line-strong);
  color: #fff;
  transition: background var(--d-fast);
}
.ar-check[aria-checked="true"] .ar-box {
  background: var(--brand);
  box-shadow: none;
}
.invalid .ar-box,
[data-field].invalid .ar-check .ar-box {
  box-shadow: inset 0 0 0 2px var(--danger);
}
[data-field="su-agree"].invalid {
  box-shadow: 0 0 0 1.5px var(--danger), var(--e1);
}
[data-field="su-agree"] .field-err {
  padding: 0 var(--s4) var(--s3);
  margin-top: 0;
}
.ar-radio-dot {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--line-strong);
  transition: box-shadow var(--d-fast);
}
.ar-radio[aria-checked="true"] .ar-radio-dot {
  box-shadow: inset 0 0 0 7px var(--brand);
}

/* Insurance */
.ar-viewfinder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  padding: var(--s5) var(--s4);
  border-radius: var(--r-lg);
  background: var(--slate-900);
  color: rgba(255, 255, 255, 0.86);
}
.ar-vf-card {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1.586;
  border-radius: 14px;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  overflow: hidden;
}
.ar-vf-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--teal-300);
  box-shadow: 0 0 12px var(--teal-300);
  animation: ar-scanline 1.2s var(--ease-out) infinite alternate;
}
@keyframes ar-scanline {
  to {
    top: calc(100% - 2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ar-vf-line {
    animation: none;
    top: 50%;
  }
}
.ar-inscard {
  padding: var(--s4);
  border-radius: var(--r-lg);
  color: #fff;
  background: linear-gradient(150deg, #1d4ed8 0%, var(--navy-800) 70%);
  box-shadow: 0 16px 36px -18px rgba(19, 34, 79, 0.7);
}
.ar-insrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}
.ar-ins-payer {
  font-size: var(--fs-foot);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.ar-ins-name {
  margin-top: var(--s3);
  font-size: var(--fs-head);
  font-weight: 600;
}
.ar-insgrid {
  margin-top: var(--s3);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3) var(--s4);
}
.ar-insgrid dt {
  font-size: var(--fs-cap);
  color: rgba(255, 255, 255, 0.74);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.ar-insgrid dd {
  font-size: var(--fs-sub);
  font-weight: 600;
}
.ar-inscard .pill.ok {
  background: #fff;
}

/* ── Centred hero screens (reset sent, Face ID, ready) ───────────────────── */
.ar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: var(--s6);
}
.ar-center .callout {
  max-width: 32ch;
}
.ar-badge {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: var(--brand-tint);
  color: var(--brand-ink);
}
.ar-badge.ok {
  border-radius: 50%;
  background: var(--ok-tint);
  color: var(--ok);
}
.ar-faceid {
  width: 104px;
  height: 104px;
  border-radius: 30px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, var(--navy-600), var(--teal-700));
  box-shadow: 0 18px 40px -16px rgba(19, 34, 79, 0.6);
}

/* Lock-screen mock on the notification permission screen */
.ar-lock {
  margin: var(--s2) var(--s4) 0;
  padding: var(--s5) 0 var(--s6);
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: radial-gradient(90% 70% at 20% 0%, #3b5bdb 0%, transparent 60%), radial-gradient(80% 70% at 100% 100%, #0d9488 0%, transparent 60%), var(--navy-900);
  color: #fff;
}
.ar-lock-time {
  font-family: var(--font-round);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1;
}
.ar-lock-date {
  margin-top: 4px;
  margin-bottom: var(--s5);
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}

/* ── Overlays: Face ID scan, iOS system alert ────────────────────────────── */
.ar-scan,
.ar-alert-wrap {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: rgba(11, 21, 51, 0.36);
  opacity: 0;
  transition: opacity var(--d-fast) var(--ease-out);
}
.ar-scan.in,
.ar-alert-wrap.in {
  opacity: 1;
}
.ar-scan-card {
  width: 156px;
  height: 156px;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.86);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  color: #fff;
  transform: scale(0.92);
  transition: transform var(--d-base) var(--ease-ios);
}
.ar-scan.in .ar-scan-card {
  transform: none;
}
.ar-scan-ic {
  animation: ar-pulse 900ms var(--ease-out) infinite alternate;
}
.ar-scan.done .ar-scan-ic {
  animation: none;
  color: var(--teal-300);
}
.ar-scan-t {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 0 10px;
}
@keyframes ar-pulse {
  from {
    opacity: 0.55;
    transform: scale(0.94);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ar-scan-ic {
    animation: none;
  }
}
.ar-alert {
  width: 270px;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  background: rgba(242, 242, 247, 0.94);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.4);
}
.ar-alert-t {
  padding: 19px 16px 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}
.ar-alert-b {
  padding: 4px 16px 19px;
  font-size: 13px;
  line-height: 1.38;
  color: var(--slate-900);
}
.ar-alert-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 0.5px solid rgba(60, 60, 67, 0.36);
}
.ar-alert-btns button {
  min-height: 44px;
  font-size: 17px;
  color: #0a66d6;
}
.ar-alert-btns button + button {
  border-left: 0.5px solid rgba(60, 60, 67, 0.36);
}
.ar-alert-btns .strong {
  font-weight: 600;
}

/* Screens whose heading lives in the content: the bar keeps its back button
   but not a second copy of the title (visibility also hides it from
   VoiceOver, so the heading is announced once). */
.view[data-route^="onboard-"] .nav-title,
.view[data-route="sign-in"] .nav-title,
.view[data-route="forgot-sent"] .nav-title,
.view[data-route="ready"] .nav-title {
  visibility: hidden;
}
.ar-fs + .ar-fs {
  margin-top: var(--s6);
}
.hc .ar-agree {
  box-shadow: inset 0 0 0 1px var(--slate-400);
}

.ar-cardcap .ar-link {
  padding: 0 1px;
}

/* ── Sign in (the owner's Figma) ─────────────────────────────────────────── */
.si-head {
  padding-top: var(--s2);
}
.si-head .mark {
  display: block;
}
.si-title {
  margin-top: var(--s6);
  font-size: var(--fs-large);
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.1;
}
.si-form {
  padding-top: var(--s6);
}
.si-new {
  color: var(--text-2);
  padding-bottom: var(--s4);
}
/* Sign in with Apple / Google, each on its maker's terms: Apple's black button
   with the logo and "Sign in with Apple"; Google's white one with its #747775
   border, the four-colour G and "Sign in with Google". The Figma set them side
   by side titled "Sign In"; with the titles both companies require they don't
   fit two to a row at 402pt, so they stack (the usual layout, and bigger targets). */
.sso-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}
.sso {
  flex: 1 1 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: var(--r-field);
  font-size: var(--fs-sub);
  font-weight: 600;
  letter-spacing: -0.1px;
  white-space: nowrap;
  transition: transform var(--d-press) var(--ease-out), filter var(--d-press);
}
.sso:active {
  transform: scale(0.98);
}
.sso-logo {
  flex: none;
  width: 18px;
  height: 18px;
}
.sso-apple {
  background: #000;
  color: #fff;
}
.sso-apple .sso-logo {
  margin-top: -2px;
}
.sso-google {
  background: #fff;
  color: #1f1f1f;
  box-shadow: inset 0 0 0 1px #747775;
}
.ts-xl .sso,
.ts-ax .sso {
  white-space: normal;
}

/* ── Face ID setup (the owner's Figma) ───────────────────────────────────── */
.fi-hero {
  position: relative;
  overflow-x: clip;
  height: 240px;
  display: grid;
  place-items: center;
}
.fi-glyph {
  position: relative;
  color: var(--teal-600);
  line-height: 0;
}
.fi-tick {
  position: absolute;
  right: -30px;
  top: -30px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal-600);
  color: #fff;
}
.fi-feats {
  margin: var(--s6) var(--gutter) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.fi-feat {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 12px var(--s4);
  border-radius: var(--r-lg);
  background: var(--card);
}
.hc .fi-feat {
  box-shadow: inset 0 0 0 1px var(--slate-400);
}
.fi-feat-t,
.fi-feat-s {
  display: block;
}
.fi-feat-t {
  font-size: var(--fs-sub);
  font-weight: 600;
}
.fi-feat-s {
  margin-top: 2px;
  font-size: var(--fs-foot);
  line-height: 1.35;
  color: var(--text-2);
}
.ts-xl .fi-hero,
.ts-ax .fi-hero {
  height: 180px;
}
