/* ============ Whazu — abertura, login e recuperar senha ============ */
:root {
  --bg: #F4F7FD;
  --navy: #0F1B3D;
  --text: #3A4661;
  --muted: #56627D;
  --soft: #7D89A3;
  --line: #DCE3F0;
  --blue: #0B5BE8;
  --blue-2: #1E86FF;
  --cyan: #35C6FF;
  --tile: #EAF0FB;
  --radius: 14px;
  --field-h: clamp(48px, 6.4vh, 56px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --wave-h: clamp(110px, 20vw, 190px);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  font-family: var(--font);
  color: var(--navy);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Ondas ---------- */
.wave-top { position: fixed; top: 0; left: 0; width: min(100vw, 520px); height: auto; pointer-events: none; z-index: 0; }
.wave-bottom { position: fixed; left: 0; bottom: 0; width: 100vw; height: calc(var(--wave-h) + var(--safe-bottom)); pointer-events: none; z-index: 0; }
.wave-bottom { animation: wave 7s ease-in-out infinite; }
body.on-form .wave-bottom { height: calc(var(--wave-h) * .72 + var(--safe-bottom)); }

/* ---------- Telas ---------- */
.screen {
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-top) + 16px) 24px calc(var(--safe-bottom) + var(--wave-h) * .72);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  height: 100dvh;
}
.screen.is-leaving { animation: fade-out .45s ease-in both; pointer-events: none; }
.screen.is-entering { animation: fade-in .45s ease-out both; }
.content { width: 100%; max-width: 420px; margin: auto 0; display: flex; flex-direction: column; align-items: center; padding: 12px 0 8px; }

/* ---------- Abertura ---------- */
.screen--splash { justify-content: space-between; padding-bottom: calc(var(--safe-bottom) + var(--wave-h) * .6); overflow: hidden; }
.splash__center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.splash__logo { width: clamp(118px, 34vw, 190px); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 90px 40px rgba(60,140,255,.14); }
.splash__logo img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 18px 30px rgba(10,92,255,.35)); }
.splash__name { margin-top: clamp(18px, 3vh, 30px); font-size: clamp(36px, 11vw, 56px); font-weight: 800; letter-spacing: 1px; line-height: 1; color: var(--navy); }
.splash__tagline { margin-top: 12px; font-size: clamp(14px, 3.8vw, 18px); font-weight: 500; color: var(--text); text-align: center; }
.splash__loader { margin-top: clamp(32px, 6vh, 56px); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bar { width: clamp(130px, 38vw, 180px); height: 6px; border-radius: 6px; background: #DCE5F5; overflow: hidden; }
.bar__fill { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--blue-2), var(--cyan)); box-shadow: 0 0 10px rgba(30,134,255,.6); animation: fill var(--splash-ms, 2600ms) cubic-bezier(.4,0,.2,1) .6s both; }
.splash__loading-text { font-size: 12.5px; font-weight: 600; letter-spacing: .3px; color: #6B7894; }
.splash__features { width: 100%; max-width: 400px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.feature { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text); }
.feature__icon { width: 46px; height: 46px; border-radius: 13px; background: var(--tile); color: #1E6BFF; display: flex; align-items: center; justify-content: center; }
.feature__icon svg { width: 22px; height: 22px; }

/* ---------- Ilustração / hero ---------- */
.hero { position: relative; width: clamp(130px, min(50vw, 26vh), 230px); aspect-ratio: 1; flex-shrink: 0; margin-bottom: clamp(14px, 2.6vh, 26px); }
.hero--small { width: clamp(110px, min(40vw, 20vh), 170px); }
.hero__glow { position: absolute; inset: -8%; border-radius: 50%; background: radial-gradient(circle, rgba(60,140,255,.16) 0%, rgba(60,140,255,0) 70%); }
.hero__ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed #B9D1F7; }
.hero__ring2 { position: absolute; inset: 10%; border-radius: 50%; border: 1px solid #DCE7F8; }
.hero__img { position: absolute; left: 7%; top: 11%; width: 86%; height: 77%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(20,70,160,.18)); }
.hero__disc { position: absolute; inset: 15%; border-radius: 50%; background: #fff; box-shadow: 0 12px 30px rgba(20,70,160,.12); }
.lock { position: absolute; inset: 29%; border-radius: 28%; background: linear-gradient(135deg, var(--cyan), #0B55F0); box-shadow: 0 10px 20px rgba(11,85,240,.35); display: flex; align-items: center; justify-content: center; }
.lock svg { width: 45%; height: 45%; }
.chip { position: absolute; width: 20%; aspect-ratio: 1; min-width: 32px; border-radius: 50%; background: #fff; box-shadow: 0 6px 16px rgba(20,70,160,.14); display: flex; align-items: center; justify-content: center; }
.chip svg, .chip img { width: 50%; height: 50%; display: block; }
.chip img { width: 60%; height: 60%; }
.chip--1 { left: -11%; top: 15%; }
.chip--2 { right: -11%; top: 11%; }
.chip--3 { left: -5%; bottom: 9%; }
.chip--4 { right: -6%; bottom: 15%; }

/* ---------- Texto ---------- */
.heading { text-align: center; width: 100%; }
.heading h1 { margin: 0; font-size: clamp(22px, 6.6vw, 30px); font-weight: 800; letter-spacing: -.5px; line-height: 1.2; color: var(--navy); }
.heading p { margin: 8px 0 0; font-size: 14px; font-weight: 500; line-height: 1.55; color: var(--muted); }

/* ---------- Formulário ---------- */
.form { width: 100%; margin-top: clamp(16px, 2.6vh, 24px); display: flex; flex-direction: column; gap: 12px; }
.form input[type=text], .form input[type=email], .form input[type=password] {
  width: 100%; height: var(--field-h); padding: 0 18px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff;
  font: 500 16px var(--font); color: var(--navy); /* 16px evita zoom automático no iPhone */
  transition: border-color .15s, box-shadow .15s;
}
.form input::placeholder { color: #8F9AB2; }
.form input:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(30,134,255,.15); }
.form input.is-invalid { border-color: #D93A3A; }
.field-pass, .field-icon { position: relative; }
.field-pass input { padding-right: 54px !important; }
.eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.eye svg { width: 20px; height: 20px; }
.field-icon > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--soft); pointer-events: none; }
.field-icon input { padding-left: 46px !important; }

.btn { height: var(--field-h); border-radius: var(--radius); font: 700 16px var(--font); display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { border: 0; color: #fff; background: linear-gradient(90deg, var(--blue), var(--blue-2)); box-shadow: 0 10px 22px rgba(11,91,232,.3); }
.btn--primary[disabled] { filter: saturate(.6) brightness(1.05); cursor: default; }
.btn--outline { border: 1.5px solid var(--line); background: #fff; color: #26324F; font-weight: 600; font-size: 15px; }
.btn--blue { color: var(--blue); font-weight: 700; }
.g-badge { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #C5CFE2; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); }
.link { color: var(--blue); font-size: 14px; font-weight: 700; text-decoration: none; padding: 12px 0; }
.link--strong { font-weight: 800; padding: 0; }
.divider { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; color: var(--soft); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.center-text { margin: 4px 0 0; text-align: center; font-size: 14px; font-weight: 500; color: var(--text); }
#recover .center-text { margin-top: 18px; }

.back { align-self: flex-start; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; font-size: 13.5px; }
.back svg { width: 16px; height: 16px; }

/* ---------- Etapas ---------- */
.steps { list-style: none; margin: 22px 0 0; padding: 0; width: 100%; display: flex; justify-content: space-between; position: relative; }
.steps::before, .steps::after { content: ''; position: absolute; top: 13px; height: 2px; border-radius: 2px; background: var(--line); }
.steps::before { left: 34px; right: calc(50% + 20px); }
.steps::after { left: calc(50% + 20px); right: 34px; }
.steps.is-step-2::before { background: var(--blue); }
.step { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; color: var(--soft); width: 68px; }
.step b { width: 28px; height: 28px; border-radius: 50%; background: #E6ECF7; color: var(--soft); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.step.is-done b { background: var(--blue); color: #fff; box-shadow: 0 0 0 5px rgba(11,91,232,.14); }

.sent { width: 100%; margin-top: 20px; display: flex; flex-direction: column; gap: 12px; animation: up .45s ease-out both; }
.sent__card { padding: 16px; border-radius: 16px; background: #fff; border: 1.5px solid #CDEBD8; display: flex; gap: 12px; align-items: flex-start; }
.sent__card strong { font-size: 14.5px; font-weight: 800; }
.sent__card p { margin: 4px 0 0; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--muted); }
.sent__icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: #DDF7E7; display: flex; align-items: center; justify-content: center; }
.sent__icon svg { width: 18px; height: 18px; }

/* ---------- Rodapé ---------- */
.brand-footer { position: fixed; left: 0; right: 0; bottom: calc(var(--safe-bottom) + var(--wave-h) * .1); z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-size: 13px; font-weight: 500; pointer-events: none; }
.brand-footer img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.brand-footer strong { font-weight: 800; letter-spacing: .6px; }
.brand-footer i { width: 1px; height: 18px; background: rgba(255,255,255,.5); margin: 0 6px; }

/* ---------- Telas baixas (iPhone SE, Androids pequenos): mais compacto ---------- */
@media (max-height: 700px) {
  :root { --wave-h: 120px; }
  .form { gap: 10px; }
  .splash__features { display: none; }
  /* Em telas baixas o rodapé da marca some para não cobrir o formulário */
  .brand-footer { display: none; }
}
/* Tablets: tudo um pouco maior */
@media (min-width: 700px) and (min-height: 900px) {
  :root { --wave-h: 220px; }
  .content { max-width: 440px; }
}

/* ---------- Animações ---------- */
.anim-pop { animation: pop .9s cubic-bezier(.2,.9,.3,1.2) var(--d, 0s) both; }
.anim-up { animation: up .7s ease-out var(--d, 0s) both; }
.float { animation: float 3.4s ease-in-out var(--fd, 1s) infinite; }
.spin { animation: spin 40s linear infinite; }
@keyframes pop { 0% { transform: scale(.55); opacity: 0 } 60% { transform: scale(1.07); opacity: 1 } 100% { transform: scale(1) } }
@keyframes up { 0% { transform: translateY(14px); opacity: 0 } 100% { transform: none; opacity: 1 } }
@keyframes fill { from { width: 0 } to { width: 100% } }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-5px) } }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes wave { 0%,100% { transform: translateX(0) } 50% { transform: translateX(-14px) } }
@keyframes fade-out { to { opacity: 0; transform: scale(1.03) } }
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }

/* Quem ativou "reduzir movimento" no celular vê tudo sem animação */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
}
