/* Sign-in and set-password pages (Sadie's login brief, 19 Oct evening). A 50/50 split: the form on a light ground,
   the brand pane in deep teal fading into moss, with a field of small soft lights that breathe on staggered 8-second loops. Floating labels,
   a password reveal, a lifting button with a loading spinner. Colours from tokens.css; motion stops under reduced motion. */
.signin { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); font-family: var(--font-body); background: var(--canvas); }

/* Left: the form */
.signin-form { display: flex; flex-direction: column; padding: 32px clamp(24px, 6vw, 88px); background: var(--white); }
.signin-brand { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; color: var(--ink-900); }
.signin-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(140deg, var(--suite), var(--violet-600) 60%, var(--fresh)); color: var(--on-tile); font-size: 17px; }
.signin-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; width: min(400px, 100%); margin: 40px auto; }
.signin-inner h1 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -.02em; color: var(--ink-900); animation: settle .6s ease both; }
.signin-inner .lead { margin: 0 0 28px; font-size: 15px; line-height: 1.55; color: var(--ink-500); }
@keyframes settle { from { opacity: 0; transform: translateY(6px); } }
.signin-foot { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: var(--ink-500); }
.signin-foot svg { width: 13px; height: 13px; flex: none; }
.signin-inner form { display: flex; flex-direction: column; gap: 16px; }

/* Floating labels: the label sits in the field, then slides up and shrinks into the accent on focus or once filled */
.float { position: relative; }
.float input {
  width: 100%; height: 56px; padding: 22px 16px 6px; border-radius: 8px; border: 1px solid var(--lavender-200); background: var(--white);
  color: var(--ink-900); font: inherit; font-size: 15.5px; outline: 0; transition: border-color .2s, box-shadow .2s;
}
.float--pw input { padding-right: 52px; }
.float label {
  position: absolute; left: 16px; top: 18px; font-size: 15.5px; color: var(--ink-500); pointer-events: none;
  transform-origin: 0 0; transition: transform .2s ease, color .2s ease;
}
.float input:focus { border-color: var(--violet-600); box-shadow: 0 0 0 4px var(--focus-ring); }
.float input:focus + label, .float input:not(:placeholder-shown) + label { transform: translateY(-11px) scale(.76); color: var(--violet-600); font-weight: 600; }
.float input:not(:focus):not(:placeholder-shown) + label { color: var(--ink-500); }
.reveal { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; cursor: pointer; color: var(--ink-500); transition: background .15s, color .15s; }
.reveal:hover { background: var(--lavender-100); color: var(--ink-900); }
.reveal svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reveal .eye-shut, .reveal[aria-pressed="true"] .eye-open { display: none; }
.reveal[aria-pressed="true"] .eye-shut { display: block; }

/* Remember and Forgot */
.signin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -2px; }
.remember { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-700); cursor: pointer; }
.remember input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; }
.remember .box { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--ink-300); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.remember input:checked + .box { background: var(--violet-600); border-color: var(--violet-600); }
.remember input:checked + .box::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: translateY(-1px) rotate(-45deg); }
.remember input:focus-visible + .box { outline: 3px solid var(--violet-400); outline-offset: 2px; }
.forgot { position: relative; border: 0; background: none; padding: 2px 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; color: var(--violet-600); }
.forgot::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; opacity: 0; transform: scaleX(.6); transition: opacity .25s, transform .25s; }
.forgot:hover::after, .forgot:focus-visible::after { opacity: 1; transform: none; }
.forgot-note { margin: -4px 0 0; padding: 10px 12px; border-radius: 6px; background: var(--lavender-50); border: 1px solid var(--lavender-100); font-size: 13.5px; line-height: 1.5; color: var(--ink-700); }

/* Sign in: substantial; lifts on hover, presses on click, spins while it works */
.signin-btn {
  position: relative; height: 54px; margin-top: 6px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--violet-600); color: var(--on-accent); font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 1px 2px rgba(16, 36, 58, .15); transition: background .2s, transform .15s, box-shadow .2s;
}
.signin-btn:hover { background: var(--violet-700); transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(31, 69, 96, .7); }
.signin-btn:active { transform: scale(.98); box-shadow: 0 1px 2px rgba(16, 36, 58, .15); }
.btn-label { display: inline-block; transition: opacity .2s, transform .2s; }
.spinner { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--on-accent) 30%, transparent); border-top-color: var(--on-accent); opacity: 0; transition: opacity .2s; }
.signin-btn.is-loading { cursor: progress; transform: none; }
.signin-btn.is-loading .btn-label { opacity: 0; transform: translateY(-4px); }
.signin-btn.is-loading .spinner { opacity: 1; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.signin-error { margin: 16px 0 0; padding: 10px 12px; border-radius: 6px; background: var(--rose-50); font-size: 14px; line-height: 1.5; color: var(--rose-700); }

/* Right: the brand pane, and the blob that breathes */
.signin-pane { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; padding: clamp(32px, 5vw, 72px);
  background: linear-gradient(155deg, #0D2E33 0%, #1B6B76 48%, #2C7558 100%); color: #FFFFFF; }
.blob { position: absolute; z-index: -2; aspect-ratio: 1; border-radius: 46% 54% 52% 48% / 50% 44% 56% 50%; filter: blur(18px); mix-blend-mode: screen;
  opacity: .55; animation: breath 8s ease-in-out infinite; }
.blob--a { background: radial-gradient(circle at 40% 40%, #A9DCDF, transparent 70%); }
.blob--b { background: radial-gradient(circle at 50% 50%, #9FDDB0, transparent 70%); }
.blob--c { background: radial-gradient(circle at 45% 45%, #CFE7EC, transparent 70%); }
@keyframes breath { 0%, 100% { transform: scale(.8); opacity: .4; } 50% { transform: scale(1.18); opacity: .7; } }
.pane-glass { position: absolute; z-index: -1; inset: 0; backdrop-filter: blur(2px); background: linear-gradient(180deg, transparent 40%, rgba(16, 28, 40, .35)); }
.pane-copy { max-width: 460px; }
.pane-kicker { margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.pane-line { margin: 0 0 22px; font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 2.8vw, 38px); line-height: 1.18; letter-spacing: -.02em; }
.pane-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; opacity: .92; }
.pane-points li { display: flex; align-items: center; gap: 10px; }
.pane-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--fresh); flex: none; }

@media (max-width: 900px) {
  .signin { grid-template-columns: minmax(0, 1fr); }
  .signin-pane { order: -1; min-height: 190px; padding: 24px; }
  .pane-points { display: none; }
  .pane-line { margin: 0; font-size: 22px; }
  .signin-form { padding: 24px 20px 28px; }
  .signin-brand { display: none; }
  .signin-inner { margin: 8px auto 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .blob, .signin-inner h1 { animation: none !important; }
}
