/* Project Wind sign-in, register, forgot and reset pages.
   Needs tokens.css first. No inline styles anywhere (the app's CSP blocks them). */

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: var(--font-mono); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout: navy brand panel + form. Wraps to a stacked layout on phones. */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }

.auth-brand {
  flex: 1 1 420px;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  background: var(--nav);
  color: #fff;
}
.auth-logo { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; align-self: flex-start; }
.auth-logo svg { width: 36px; height: 36px; flex: none; }
.auth-word { font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.auth-word span { color: var(--nav-accent); }
.auth-logo:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--nav), 0 0 0 4px var(--focus); }

.auth-foot { display: flex; flex-direction: column; gap: 12px; max-width: 360px; }

/* Rotating statements: all stacked in one grid cell, so the panel keeps the
   height of the longest one and never jumps. */
.statements { display: grid; align-items: end; margin: 0; padding: 0; list-style: none; }
.statement {
  grid-area: 1 / 1;
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  text-wrap: balance;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .6s ease, transform .6s ease;
}
.statement.is-active { opacity: 1; transform: none; }
.ticks { display: flex; flex-wrap: wrap; gap: 5px; }
.tick { width: 12px; height: 3px; background: rgb(255 255 255 / .25); transition: background .6s ease; }
.tick.is-active { background: var(--nav-accent); }

.auth-main {
  position: relative;
  flex: 999 1 480px;
  min-width: 0;
  padding: 48px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.auth-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 20px; }
.auth-form.wide { max-width: 440px; }
.auth-head { display: flex; flex-direction: column; gap: 8px; }
.auth-form h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; }
.lede { margin: 0; color: var(--text-2); }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-2); }
.hint { font-size: 12px; line-height: 16px; color: var(--muted); }
.hint.err { color: var(--crit-fg); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 20px 16px; }

.input {
  height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.input::placeholder { color: var(--muted); }
.input:hover { border-color: var(--text-2); }
.input:focus-visible { outline: none; border-color: var(--focus-inner); box-shadow: 0 0 0 2px var(--focus); }
.input[aria-invalid="true"] { border-color: var(--crit-fg); box-shadow: inset 0 -2px 0 var(--crit-fg); }
.input.mono { font-family: var(--font-mono); }

.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle {
  position: absolute; right: 4px; top: 4px; height: 36px; padding: 0 10px;
  border: 0; border-radius: var(--radius-control); background: transparent;
  color: var(--text-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.pw-toggle:hover { background: var(--sunken); }

.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
.select svg { position: absolute; right: 12px; top: 14px; width: 16px; height: 16px; pointer-events: none; color: var(--text-2); }

.check { display: flex; align-items: center; gap: 10px; min-height: 28px; cursor: pointer; }
.cb {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; flex: none;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-control); background: var(--surface);
  display: grid; place-content: center; cursor: pointer;
}
.cb:checked { background: var(--primary); border-color: var(--primary); }
.cb:checked::after {
  content: ""; width: 9px; height: 5px;
  border-left: 2px solid var(--on-primary); border-bottom: 2px solid var(--on-primary);
  transform: translateY(-1px) rotate(-45deg);
}

/* Buttons and links */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-control);
  font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-press); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text-2); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; }

.link { color: var(--primary); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.link:hover { color: var(--primary-hover); }
.link.small { font-size: 13px; }
.link.start { align-self: flex-start; }

.alt { margin: 8px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-2); }

/* Sign in with Google: a line with "or" above its button. */
.or { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn:focus-visible, .link:focus-visible, .pw-toggle:focus-visible, .cb:focus-visible, .theme-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-inner), 0 0 0 4px var(--focus);
}

/* Messages */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-control); border: 1px solid; }
.alert[hidden] { display: none; }
.alert-crit { background: var(--crit-bg); color: var(--crit-fg); border-color: color-mix(in srgb, var(--crit-fg) 30%, transparent); }
.alert-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: color-mix(in srgb, var(--ok-fg) 30%, transparent); }
.alert p { margin: 0; color: var(--text); }

.status-icon { width: 44px; height: 44px; display: grid; place-content: center; border-radius: var(--radius-control); background: var(--ok-bg); color: var(--ok-fg); }
.status-icon svg { width: 22px; height: 22px; }

/* Light / dark switch */
.theme-btn {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px;
  display: grid; place-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--radius-control);
  background: var(--surface); color: var(--text-2); cursor: pointer;
}
.theme-btn:hover { background: var(--sunken); color: var(--text); }
.theme-btn svg { width: 18px; height: 18px; }

[hidden] { display: none !important; }

@media (max-width: 760px) {
  .auth { flex-direction: column; }
  .auth-brand { flex: none; padding: 20px; }
  .auth-foot { display: none; }
  .auth-main { flex: 1 1 auto; padding: 72px 20px 32px; align-items: flex-start; }
  .input, .btn { height: 48px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .statement, .tick { transition: none; }
}
