@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  color-scheme: light;
  --ink: #11143f;
  --muted: #596579;
  --blue: #0965e8;
  --blue-deep: #0751d2;
  --cyan: #07bfd0;
  --mint: #10c4a4;
  --line: #b9c8d8;
  --paper: #eff8ff;
  font-family: 'Nunito Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: #e8f3fb;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: #e8f3fb;
}

button,
input { font: inherit; }
button { -webkit-appearance: none; appearance: none; }

.app-frame {
  isolation: isolate;
  position: relative;
  display: flex;
  width: min(100%, 520px);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 33%, rgba(255,255,255,.68), transparent 42%),
    linear-gradient(180deg, #eff8ff 0%, #f6fbff 67%, #edf8ff 100%);
  box-shadow: 0 16px 60px rgba(47, 89, 122, .13);
}

.bottom-wave {
  position: absolute;
  z-index: 0;
  inset: auto 0 0;
  height: 112px;
  overflow: hidden;
  pointer-events: none;
}

.wave {
  position: absolute;
  inset: auto -6% 0;
  display: block;
  height: 88px;
}

.wave--a {
  background: linear-gradient(115deg, #15c9d8, #02bfae);
  clip-path: polygon(0 17%, 13% 19%, 27% 46%, 43% 76%, 56% 88%, 67% 72%, 82% 38%, 100% 0, 100% 100%, 0 100%);
}

.wave--b {
  height: 62px;
  background: linear-gradient(105deg, #13c9d2, #13bba7);
  clip-path: polygon(0 0, 15% 24%, 34% 80%, 50% 89%, 69% 63%, 87% 34%, 100% 17%, 100% 100%, 0 100%);
  opacity: .86;
}

.screen {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
}

.screen[hidden] { display: none !important; }

.access-screen {
  --side: clamp(22px, 6.7vw, 38px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(18px, 3.1svh, 30px) var(--side) 78px;
}

.brand-block {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.brand-mark {
  display: block;
  width: clamp(82px, 22vw, 108px);
  height: auto;
  margin: 0 0 2px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.brand-name {
  margin: 1px 0 3px;
  color: var(--ink);
  font-size: clamp(36px, 10.2vw, 48px);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: 1.05;
}

.brand-tagline {
  max-width: 330px;
  margin: 7px 0 0;
  color: #202445;
  font-size: clamp(16px, 4.45vw, 20px);
  font-weight: 500;
  letter-spacing: .005em;
  line-height: 1.33;
}

.small-screen-break { display: none; }

.family-art {
  flex: 0 0 auto;
  width: calc(100% + var(--side) * 2);
  margin: clamp(12px, 2.3svh, 22px) calc(var(--side) * -1) 0;
  overflow: hidden;
  line-height: 0;
}

.family-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: saturate(.98);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 5%, #000 91%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 5%, #000 91%, transparent 100%);
}

.access-form {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  gap: 15px;
  margin: clamp(3px, .8svh, 8px) 0 0;
}

.input-shell {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: clamp(58px, 8.3svh, 68px);
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.input-shell:focus-within {
  border-color: #1681e7;
  background: rgba(255,255,255,.88);
  box-shadow: 0 0 0 3px rgba(22,129,231,.12);
}

.field-icon {
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  margin-right: 16px;
  color: #596477;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: #151a3d;
  background: transparent;
  font-size: clamp(18px, 5.2vw, 22px);
  font-weight: 500;
}

.input-shell input::placeholder {
  color: #596477;
  opacity: 1;
}

.visibility-toggle {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 44px;
  margin: 0 -10px 0 5px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: #596477;
  background: transparent;
  cursor: pointer;
}

.visibility-toggle:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: 3px solid rgba(9,101,232,.35);
  outline-offset: 3px;
}

.eye-icon { width: 29px; height: 29px; }

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  min-height: 66px;
  margin-top: 5px;
  padding: 12px 22px;
  border: 0;
  border-radius: 27px;
  color: #fff;
  background: linear-gradient(110deg, #087fe9 0%, #0751db 100%);
  box-shadow: 0 7px 16px rgba(7, 91, 218, .15), inset 0 1px 0 rgba(255,255,255,.22);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.primary-button:hover { filter: brightness(1.04); box-shadow: 0 9px 20px rgba(7, 91, 218, .22); }
.primary-button:active { transform: scale(.985); }
.primary-button:disabled { cursor: progress; opacity: .86; }
.arrow-icon { width: 30px; height: 30px; }

.maintenance-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(22px, env(safe-area-inset-top)) 26px max(78px, env(safe-area-inset-bottom));
  animation: screen-in .48s cubic-bezier(.2,.8,.2,1) both;
}

.compact-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.05em;
}

.compact-brand img {
  width: 42px;
  height: 45px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.maintenance-content {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 18px 0 20px;
  text-align: center;
}

.maintenance-art {
  display: block;
  width: min(84%, 300px);
  height: auto;
  margin: 0 auto 15px;
  filter: drop-shadow(0 15px 26px rgba(10, 101, 174, .10));
  animation: float-in 1.1s cubic-bezier(.2,.8,.2,1) both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 13px;
  color: #118878;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(16,196,164,.12);
}

.maintenance-content h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 8.8vw, 39px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: 1.11;
}

.maintenance-copy {
  max-width: 305px;
  margin: 15px 0 25px;
  color: #55647a;
  font-size: 16px;
  line-height: 1.55;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 20px;
  border: 1.5px solid rgba(9,101,232,.32);
  border-radius: 18px;
  color: var(--blue-deep);
  background: rgba(255,255,255,.62);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .16s ease, transform .16s ease;
}

.secondary-button:hover { background: #fff; }
.secondary-button:active { transform: scale(.98); }
.secondary-button svg { width: 20px; height: 20px; }

.maintenance-footnote {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: #526783;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.loading-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(234, 246, 255, .76);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fade-in .18s ease both;
}

.loading-layer[hidden] { display: none !important; }

.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 190px;
  padding: 25px 29px 22px;
  border: 1px solid rgba(185,200,216,.72);
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 16px 44px rgba(27,74,115,.12);
}

.loading-spinner {
  width: 43px;
  height: 43px;
  border: 4px solid rgba(9,101,232,.14);
  border-top-color: var(--blue);
  border-right-color: var(--mint);
  border-radius: 50%;
  animation: spin .82s linear infinite;
}

.loading-label { color: var(--ink); font-size: 16px; font-weight: 800; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.screen-enter { animation: screen-in .4s ease both; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 360px) {
  .access-screen { --side: 20px; padding-top: 16px; }
  .brand-mark { width: 74px; }
  .brand-name { font-size: 35px; }
  .brand-tagline { font-size: 16px; }
  .small-screen-break { display: initial; }
  .input-shell { padding-inline: 14px; border-radius: 19px; }
  .field-icon { width: 26px; height: 26px; margin-right: 12px; }
  .primary-button { min-height: 60px; }
}

@media (min-height: 850px) {
  .access-screen { padding-top: 28px; }
  .brand-mark { width: 112px; }
  .family-art { margin-top: 20px; }
  .access-form { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
