/* Sign up, sign in, forgot password, and the reset page the link opens.
   Astra's design, moved across as it was drawn. The font @import was
   dropped - the head <link>s it, like every other page here, and an
   @import inside a stylesheet blocks rendering until it resolves.

   FOUR PAGES, NOT FOUR VIEWS. The mockup switches between them in
   JavaScript and keeps the state in the URL hash. These are real routes:
   the back button works, a failed sign-in can come back from the server
   with a message, and none of it needs JavaScript to work at all. The
   only script left is the show-password toggle, which is a genuine
   enhancement rather than the thing holding the page together.

   Everything below the ADDITIONS marker is mine. */
:root {
  --blue: #0b5cf6;
  --blue-dark: #084bd0;
  --blue-soft: #edf4ff;
  --blue-soft-2: #f5f8ff;
  --ink: #07112f;
  --text: #18213b;
  --muted: #637091;
  --line: #d9e1ee;
  --line-strong: #c9d4e5;
  --page: #f8faff;
  --card: #ffffff;
  --shadow: 0 16px 44px rgba(25, 48, 87, 0.09);
  --soft-shadow: 0 8px 24px rgba(25, 48, 87, 0.055);
  --radius: 14px;
  --header-height: 66px;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--page);
  font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: var(--blue);
  text-underline-offset: 2px;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  height: var(--header-height);
  flex: 0 0 auto;
  position: relative;
  z-index: 20;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner {
  width: min(1120px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.brand span:last-child {
  color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-text-link {
  appearance: none;
  border: 0;
  padding: 9px 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.header-text-link:hover,
.header-text-link:focus-visible {
  color: var(--blue);
}

.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 9px;
  min-height: 46px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(11, 92, 246, 0.2);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--blue-dark);
  box-shadow: 0 10px 24px rgba(11, 92, 246, 0.26);
}

.button-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--line-strong);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: #aebbd1;
  background: #fbfcff;
}

.header-cta {
  min-height: 44px;
  padding-inline: 20px;
  font-size: 14px;
}

.main {
  flex: 1 0 auto;
  position: relative;
  overflow: hidden;
  padding: 46px 24px 54px;
}

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

.hero-wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-page {
  width: min(980px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.auth-intro {
  text-align: center;
  margin-bottom: 28px;
}

.auth-intro h1 {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(38px, 4vw, 50px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.auth-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.benefits {
  width: min(850px, 100%);
  margin: 26px auto 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.benefit {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
}

.benefit-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
}

.benefit-icon svg {
  width: 22px;
  height: 22px;
}

.benefit strong,
.benefit span {
  display: block;
}

.benefit strong {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}

.benefit span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.auth-card {
  width: min(500px, 100%);
  margin: 0 auto;
  padding: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 18px;
}

.form-row-head {
  min-height: 22px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

label {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.forgot-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.input-shell {
  height: 48px;
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input-shell:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 92, 246, 0.12);
}

.input-icon {
  width: 46px;
  height: 100%;
  display: grid;
  place-items: center;
  color: #556587;
  flex: 0 0 auto;
}

.input-icon svg {
  width: 18px;
  height: 18px;
}

input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 12px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

input::placeholder {
  color: #8b96ad;
  opacity: 1;
}

.password-toggle {
  width: 46px;
  height: 100%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: #556587;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--blue);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.helper {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.submit-button {
  width: 100%;
  margin-top: 2px;
}

.submit-button svg {
  width: 17px;
  height: 17px;
}

.divider {
  margin: 22px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.google-button {
  width: 100%;
  min-height: 48px;
}

.google-logo {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.auth-switch {
  margin: 22px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.auth-switch button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-view[hidden] {
  display: none !important;
}

.reset-card .auth-card {
  width: min(500px, 100%);
}

.reset-card .auth-intro {
  margin-bottom: 22px;
}

.reset-note {
  margin: -4px 0 20px;
  padding: 14px 15px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  border: 1px solid #cfe0ff;
  border-radius: 9px;
  background: var(--blue-soft-2);
  color: var(--muted);
  font-size: 12px;
}

.reset-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--blue);
  margin-top: 1px;
}

.sent-state {
  text-align: center;
}

.sent-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
}

.sent-icon svg {
  width: 30px;
  height: 30px;
}

.sent-state h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.sent-state p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  min-height: 72px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--line);
}

.footer-inner {
  min-height: 72px;
}

.footer-brand-group {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.footer-brand-group .brand {
  font-size: 18px;
}

.footer-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}

.footer-tagline,
.copyright {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.copyright {
  white-space: nowrap;
}

@media (max-width: 760px) {
  :root { --header-height: 62px; }

  .header-inner,
  .footer-inner {
    width: min(100% - 28px, 1120px);
  }

  .brand {
    font-size: 19px;
  }

  .header-actions {
    gap: 12px;
  }

  .header-text-link {
    display: none;
  }

  .header-cta {
    min-height: 40px;
    padding-inline: 15px;
    font-size: 12px;
  }

  .main {
    padding: 30px 14px 38px;
  }

  .hero-wave {
    height: 188px;
  }

  .auth-intro {
    margin-bottom: 22px;
  }

  .auth-intro h1 {
    font-size: clamp(33px, 10vw, 42px);
  }

  .auth-intro p {
    font-size: 14px;
  }

  .benefits {
    margin: 22px auto 24px;
    gap: 9px;
  }

  .benefit {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 7px;
    text-align: center;
  }

  .benefit-icon {
    width: 40px;
    height: 40px;
  }

  .benefit strong {
    font-size: 11px;
  }

  .benefit span {
    font-size: 10px;
  }

  .auth-card {
    padding: 22px 18px;
    border-radius: 12px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .site-footer {
    min-height: 86px;
  }

  .footer-inner {
    min-height: 86px;
    padding: 14px 0;
    align-items: flex-start;
  }

  .footer-brand-group {
    display: grid;
    gap: 3px;
  }

  .footer-divider {
    display: none;
  }

  .footer-tagline {
    max-width: 210px;
    line-height: 1.35;
  }

  .copyright {
    padding-top: 5px;
  }
}

@media (max-width: 420px) {
  .header-inner,
  .footer-inner {
    width: calc(100% - 22px);
  }

  .header-cta {
    padding-inline: 12px;
  }

  .auth-intro h1 {
    font-size: 34px;
  }

  .benefit span {
    display: none;
  }

  .auth-card {
    padding: 20px 16px;
  }

  .copyright {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ------------------------------------------------------------ ADDITIONS
   What a mockup has no need of: the error a failed sign-in comes back
   with, and the flash carried over from another page. */

.auth-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #f3c9cf;
  border-radius: 9px;
  background: #fffafa;
  color: #8f1626;
  font-size: 13px;
  line-height: 1.45;
}

.auth-error svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.auth-flash {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #cfe0ff;
  border-radius: 9px;
  background: var(--blue-soft-2);
  color: #1c3b73;
  font-size: 13px;
  line-height: 1.45;
}

/* The design's Google button is a <button>; ours is a link to the OAuth
   route, because it navigates rather than submitting this form. */
a.google-button { text-decoration: none; }

/* An input that is not inside an .input-shell - the reset page's two
   password fields have no leading icon. */
.plain-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
}

.plain-input:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 92, 246, .12);
}
