/* Note: the mirrored site's cookie-consent banner is removed from the DOM by
   register.js (see HIDE_COOKIE_BANNER) because it is mounted deep inside the
   Next.js root, where a CSS rule cannot target it without hiding the page. */

/* --------------------------------------------------------------------------
   Homepage tweaks that belong to this landing page (not to the dialog):
   the React runtime re-renders the hero CTA from its own JSON props after
   hydration, so the Apple mark has to be suppressed in CSS.
   -------------------------------------------------------------------------- */
.styles_buttons__4y58b .styles_button__UViuC.styles_color-purple__gJ_kV > svg {
  display: none !important;
}
.styles_buttons__4y58b .styles_button__UViuC.styles_color-purple__gJ_kV {
  padding-left: 28px;
  padding-right: 28px;
}

/* ==========================================================================
   register.css — three-step sign-up dialog
   --------------------------------------------------------------------------
   Styled with the values read off the live aave.com stylesheet, not invented:

     --bg-1            #ffffff                 page / card surface
     --bg-4            #f7f6f6                 hover wash
     --bg-panel        #fbfbfb                 inset surface
     --fg-1            #211d1d                 ink (color(display-p3 .129 .114 .114))
     --fg-2            #636161                 secondary text
     --fg-3            #8f8e8e                 tertiary text
     --fg-4            #bcbbbb                 placeholder
     --border-1        #f1f1f0                 hairline
     --border-2        #e1e1e0                 input border
     --purple-1        #9896ff                 accent
     --primary bg      #252228                 dark pill (same as "Register Now")

   Cards on aave.com are white, radius 32px, elevation carried by a 1px
   rgba(37,34,40,.05) ring — no gradients, no glows, no coloured shadows.
   Buttons are 99px pills with no drop shadow. Type is Aave Repro.
   ========================================================================== */

.aa-modal {
  --aa-ink:        #211d1d;
  --aa-ink-2:      #636161;
  --aa-ink-3:      #8f8e8e;
  --aa-ink-4:      #bcbbbb;
  --aa-line:       #f1f1f0;
  --aa-line-2:     #e1e1e0;
  --aa-wash:       #f7f6f6;
  --aa-panel:      #fbfbfb;
  --aa-purple:     #9896ff;
  --aa-purple-ink: #6f66f0;
  --aa-purple-bg:  #e1e0ff;
  --aa-dark:       #252228;
  --aa-danger:     #b42318;

  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: 'Aave Repro', 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--aa-ink);
  -webkit-font-smoothing: antialiased;
}
.aa-modal[hidden] { display: none; }

.aa-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(33, 29, 29, 0.24);
  animation: aa-fade 0.2s ease-out both;
}

/* ---- panel ------------------------------------------------------------- */
.aa-modal__panel {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border-radius: 32px;
  background: #fff;
  background: color(display-p3 1 1 1);
  box-shadow:
    0 0 0 1px rgba(37, 34, 40, 0.06),
    0 18px 48px -16px rgba(37, 34, 40, 0.22);
  animation: aa-rise 0.24s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  scrollbar-width: thin;
  scrollbar-color: #e1e1e0 transparent;
}
.aa-modal__panel::-webkit-scrollbar { width: 8px; }
.aa-modal__panel::-webkit-scrollbar-thumb { background: var(--aa-line-2); border-radius: 99px; }

/* the old gradient hairline is not part of this design language */
.aa-modal__glow { display: none; }

/* ---- head -------------------------------------------------------------- */
.aa-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px 0;
}
.aa-modal__brand { color: var(--aa-ink); display: flex; align-items: center; }
.aa-modal__brand svg { display: block; height: 16px; width: auto; }

.aa-modal__close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  border: 1px solid var(--aa-line-2);
  background: #fff;
  color: var(--aa-ink-2);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.aa-modal__close:hover { background: var(--aa-wash); color: var(--aa-ink); border-color: var(--aa-ink-4); }

/* ---- progress ---------------------------------------------------------- */
.aa-progress {
  height: 2px;
  margin: 22px 32px 0;
  border-radius: 99px;
  background: var(--aa-line);
  overflow: hidden;
}
.aa-progress__bar {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--aa-purple);
  transition: width 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
}

/* ---- form / steps ------------------------------------------------------ */
.aa-form { padding: 26px 32px 4px; }

.aa-step {
  border: 0;
  margin: 0;
  padding: 0;
  animation: aa-step-in 0.22s ease-out both;
}
.aa-step[hidden] { display: none; }

.aa-step__legend,
.aa-step__legend > span { display: block; }

.aa-step__kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--aa-purple-ink);
  margin-bottom: 10px;
}
.aa-step__title {
  display: block;
  font-size: 27px;
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--aa-ink);
}
.aa-step__sub {
  display: block;
  margin-top: 8px;
  margin-bottom: 24px;
  font-size: 14.5px;
  color: var(--aa-ink-2);
}

.aa-grid { display: grid; gap: 14px; }
.aa-grid--2 { grid-template-columns: 1fr 1fr; }

.aa-field { margin-bottom: 16px; min-width: 0; }
.aa-field > label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--aa-ink-2);
  margin-bottom: 8px;
}
.aa-optional { color: var(--aa-ink-4); font-weight: 400; }

.aa-field input,
.aa-field select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--aa-line-2);
  background: #fff;
  color: var(--aa-ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  -webkit-appearance: none;
  appearance: none;
}
.aa-field input::placeholder { color: var(--aa-ink-4); }
.aa-field input:hover,
.aa-field select:hover { border-color: var(--aa-ink-4); }
.aa-field input:focus,
.aa-field select:focus {
  border-color: var(--aa-purple);
  box-shadow: 0 0 0 3px rgba(152, 150, 255, 0.22);
}
.aa-field input[aria-invalid='true'] {
  border-color: var(--aa-danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

/* phone: dial code + number */
.aa-phone { display: grid; grid-template-columns: 132px 1fr; gap: 10px; }

.aa-select { position: relative; }
.aa-select select { padding-right: 36px; cursor: pointer; }
.aa-select > svg {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--aa-ink-3);
}
.aa-select option { background: #fff; color: var(--aa-ink); }

/* ---- errors ------------------------------------------------------------ */
.aa-error {
  margin: 7px 0 0;
  font-size: 12.5px;
  color: var(--aa-danger);
  min-height: 0;
}
.aa-error:empty { display: none; }
.aa-error--form { margin-top: 14px; text-align: center; }

/* ---- buttons ----------------------------------------------------------- */
.aa-actions { margin-top: 24px; }
.aa-actions > .aa-btn--primary { width: 100%; }
.aa-actions--split { display: flex; gap: 10px; }
.aa-actions--split .aa-btn--primary { flex: 1; width: auto; }
.aa-actions--split .aa-btn--ghost { flex: 0 0 auto; }

.aa-btn {
  height: 48px;
  padding: 0 24px;
  border-radius: 99px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}
.aa-btn:active { transform: translateY(1px); }
.aa-btn[disabled] { opacity: 0.55; cursor: progress; }
.aa-btn--wide { width: 100%; margin-top: 24px; }

/* same treatment as the header "Register Now" pill */
.aa-btn--primary {
  color: #fff;
  background: var(--aa-dark);
}
.aa-btn--primary:hover { background: #37333b; }

.aa-btn--ghost {
  color: var(--aa-ink);
  background: #fff;
  border-color: var(--aa-line-2);
  padding: 0 22px;
}
.aa-btn--ghost:hover { background: var(--aa-wash); border-color: var(--aa-ink-4); }

.aa-fineprint {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--aa-ink-3);
}

/* ---- done state -------------------------------------------------------- */
.aa-step--done { padding-top: 4px; }
.aa-done { text-align: center; padding: 8px 0 4px; }
.aa-done__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  color: #fff;
  background: var(--aa-dark);
}
.aa-done__title {
  margin: 10px 0 10px;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--aa-ink);
}
.aa-done__text {
  margin: 0 auto;
  max-width: 40ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--aa-ink-2);
}
.aa-done__text strong { color: var(--aa-ink); font-weight: 500; }

/* ---- foot -------------------------------------------------------------- */
.aa-modal__foot {
  padding: 18px 32px 24px;
  margin-top: 10px;
  border-top: 1px solid var(--aa-line);
  font-size: 12px;
  color: var(--aa-ink-3);
  text-align: center;
}

/* ---- honeypot ---------------------------------------------------------- */
.aa-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- open/close motion ------------------------------------------------- */
body.aa-locked { overflow: hidden; }

@keyframes aa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes aa-rise {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to   { opacity: 1; transform: none; }
}
@keyframes aa-step-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aa-modal__scrim,
  .aa-modal__panel,
  .aa-step { animation: none; }
  .aa-progress__bar { transition: none; }
}

/* ---- small screens ----------------------------------------------------- */
@media (max-width: 560px) {
  .aa-modal { padding: 0; align-items: flex-end; }
  .aa-modal__panel {
    width: 100%;
    max-height: 94vh;
    border-radius: 28px 28px 0 0;
    animation: aa-sheet 0.26s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  }
  .aa-modal__head { padding: 24px 22px 0; }
  .aa-progress { margin: 18px 22px 0; }
  .aa-form { padding: 22px 22px 0; }
  .aa-step__title { font-size: 23px; }
  .aa-done__title { font-size: 23px; }
  .aa-grid--2 { grid-template-columns: 1fr; gap: 0; }
  .aa-phone { grid-template-columns: 118px 1fr; }
  .aa-modal__foot { padding: 16px 22px 22px; }
}

@keyframes aa-sheet {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
