/* ============================================
   RiverReady — login screen
   Palette:
     --mist      #f2f8fd   page top
     --shallow   #d3e8f8   page bottom
     --current   #8cc4e8   mid water
     --deep      #2b6ca3   primary blue
     --riverbed  #12354f   darkest text
   ============================================ */

:root {
  --mist:     #f2f8fd;
  --shallow:  #d3e8f8;
  --current:  #8cc4e8;
  --deep:     #2b6ca3;
  --riverbed: #12354f;
  --white:    #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--riverbed);
  background: linear-gradient(180deg, var(--mist) 0%, var(--shallow) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ---------- Background ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Measuring stick down the left edge */
.gauge {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 74px;
  border-right: 1px solid rgba(43, 108, 163, 0.16);
}

.tick {
  position: absolute;
  right: 0;
  width: 22px;
  border-top: 1px solid rgba(43, 108, 163, 0.28);
}

.tick span {
  position: absolute;
  right: 28px;
  top: -9px;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: rgba(43, 108, 163, 0.5);
}

/* Water layers */
.water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 42vh;
}

/* Distinct fills, not just opacities — three flat tints read as
   three layers; three opacities of one colour read as one blob. */
.w3 { fill: #b9dbf2; }
.w2 { fill: #93c6e8; }
.w1 { fill: #6fb0dd; }

/* ---------- Foreground ---------- */

.screen {
  position: relative;
  z-index: 1;
  padding-bottom: 12vh;   /* keeps the footer above the waterline */
  width: 100%;
  max-width: 360px;
  padding: 0 28px;
  text-align: center;
}

/* Logo */
.mark {
  width: 60px;
  height: 60px;
  margin-bottom: 22px;
}

.mark-ring {
  fill: none;
  stroke: var(--deep);
  stroke-width: 2.5;
  opacity: 0.28;
  /* 170 is roughly this circle's circumference (2 x pi x 27).
     Setting the dash that long means one dash covers the whole
     ring, so animating the offset draws it. */
  stroke-dasharray: 170;
}

.mark-wave {
  fill: none;
  stroke: var(--deep);
  stroke-width: 4;
  stroke-linecap: round;
}

.mark-road {
  fill: none;
  stroke: var(--riverbed);
  stroke-width: 3.5;
  stroke-linecap: round;
}

.mark-pier {
  fill: none;
  stroke: var(--riverbed);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.45;
}

h1 {
  font-family: "Sora", sans-serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.sub {
  font-size: 15px;
  color: rgba(18, 53, 79, 0.6);
  margin: 0 0 34px;
}

/* Inputs */
.form { display: block; }

input {
  display: block;
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 12px;
  font-family: inherit;
  font-size: 16px;
  color: var(--riverbed);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(43, 108, 163, 0.18);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}

input::placeholder { color: rgba(18, 53, 79, 0.42); }

input:focus {
  background: var(--white);
  border-color: var(--deep);
}

/* Buttons */
.btn-primary {
  position: relative;   /* so .shine can sit inside it */
  overflow: hidden;     /* clips the shine at the button edges */
  width: 100%;
  padding: 16px;
  margin-top: 10px;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  background: var(--deep);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  /* No transform transition here — Motion owns scale now.
     Two systems animating one property fight each other. */
  transition: background 0.18s;
}

.btn-primary:hover { background: #245c8c; }

.btn-skip {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--deep);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-skip:hover { color: var(--riverbed); }

/* Footer */
.foot {
  margin-top: 32px;
  font-size: 14px;
  color: rgba(18, 53, 79, 0.55);
}

.foot a {
  color: var(--deep);
  font-weight: 500;
  text-decoration: none;
}

.foot a:hover { text-decoration: underline; }

/* Keyboard focus visibility */
:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 3px;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}


/* Light sweep across the Sign in button on hover.
   Sits off-screen at rest; Motion slides it across. */
.shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 100%;
  transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

/* Focus ring on inputs, layered under the Motion scale */
input:focus {
  box-shadow: 0 0 0 4px rgba(43, 108, 163, 0.13);
}


/* ---------- Rain ---------- */

.rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.drop {
  position: absolute;
  top: -12vh;
  width: 1px;
  border-radius: 1px;
  /* Fades at both ends so a drop reads as a streak, not a stick */
  background: linear-gradient(
    to bottom,
    rgba(43, 108, 163, 0) 0%,
    rgba(43, 108, 163, 0.4) 45%,
    rgba(43, 108, 163, 0) 100%
  );
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}

/* Falls past the bottom of the screen. The slight x shift is wind —
   without it rain looks like it's dropping in a vacuum. */
@keyframes fall {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(22px, 122vh, 0); }
}


/* ============================================
   Signup-specific
   ============================================ */

/* Taller screens sit higher instead of dead-centre,
   or the form runs off the bottom on small phones */
.screen--tall {
  padding-top: 8vh;
  padding-bottom: 8vh;
}

/* Back arrow */
.back {
  position: absolute;
  top: -6vh;
  left: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(43, 108, 163, 0.16);
  border-radius: 999px;
  text-decoration: none;
}

/* First name + last name side by side */
.row {
  display: flex;
  gap: 10px;
}

.row input { margin-bottom: 12px; }

/* Wrapper so the eye button can sit inside the input */
.field {
  position: relative;
}

.field input {
  padding-right: 52px;   /* leaves room for the button */
}

.peek {
  position: absolute;
  top: 0;
  right: 6px;
  height: 54px;          /* matches input height */
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(18, 53, 79, 0.45);
  background: none;
  border: none;
  cursor: pointer;
}

.peek:hover { color: var(--deep); }

.hint {
  margin: 2px 0 0;
  padding-left: 20px;
  font-size: 13px;
  text-align: left;
  color: rgba(18, 53, 79, 0.5);
}

/* The `hidden` attribute isn't reliably applied to SVG elements
   by browser default styles, so state it explicitly. */
.is-hidden { display: none !important; }

/* "Create account" is longer than "Welcome" — size it down
   so it doesn't crowd the screen edges */
.screen--tall h1 { font-size: 29px; }

/* Error state for the hint line under a field */
.hint--error { color: #b03030; }

/* Small underlined "Forgot password?" button */
.link-quiet {
  display: block;
  margin: 2px 0 0 auto;
  padding: 4px 20px 4px 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--deep);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
