/* ═══════════════════════════════════════════════
   Bassline — login.css
   Design system: Uberzoot (Fraunces + Inter,
   Cream/Bone/Ink/Monstera palette, zero radius)

   Standalone from app.css: the login page is the one
   thing served before a session exists, so it stays
   self-contained and small.
═══════════════════════════════════════════════ */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}

/* `hidden` must actually hide. The UA stylesheet's [hidden]{display:none} is a
   single attribute selector, so any class rule here that sets `display` beats
   it — which silently showed the Face ID button with no passkey enrolled. */
[hidden] { display: none !important; }

:root {
  --cream:         #F4EFE8;
  --bone:          #EBE3D7;
  --sand:          #D9CBB5;
  --ink:           #1A1614;
  --espresso:      #2B2420;
  --monstera:      #4A6B4E;
  --monstera-deep: #3A5440;
  --monstera-soft: #6B8F6F;
  --cognac:        #A8774D;
  --font-display:  'Fraunces', Georgia, serif;
  --font-ui:       'Inter', sans-serif;
  --tr:            0.3s ease;
}

html, body {
  min-height: 100%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Safe-area padding keeps the card clear of the notch and the home bar when
     this runs as a home-screen app. */
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;   /* dvh so iOS Safari's collapsing toolbar cannot clip it */
}

.shell {
  width: 100%;
  max-width: 360px;
}

/* ── brand ── */
.brand { text-align: center; margin-bottom: 36px; }
.brand-mark { width: 56px; height: 56px; object-fit: contain; margin-bottom: 14px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 38px;
  letter-spacing: 0.01em;
  line-height: 1;
}
.brand-sub {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244,239,232,0.42);
}

/* ── buttons ── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;              /* comfortable thumb target */
  padding: 14px 18px;
  border: 1px solid rgba(244,239,232,0.22);
  background: transparent;
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr), opacity var(--tr);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) { background: rgba(244,239,232,0.06); border-color: rgba(244,239,232,0.4); }
.btn:active:not(:disabled) { background: rgba(244,239,232,0.1); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--monstera-soft); outline-offset: 2px; }

.btn-primary {
  background: var(--monstera);
  border-color: var(--monstera);
  margin-bottom: 4px;
}
.btn-primary:hover:not(:disabled) { background: var(--monstera-deep); border-color: var(--monstera-deep); }
.btn-primary:active:not(:disabled) { background: var(--monstera-deep); }

/* ── divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: rgba(244,239,232,0.3);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(244,239,232,0.14);
}

/* ── form ── */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: block; }
.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244,239,232,0.5);
}
.field input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid rgba(244,239,232,0.22);
  background: var(--espresso);
  color: var(--cream);
  font-family: var(--font-ui);
  /* 16px exactly: anything smaller and iOS Safari zooms on focus. */
  font-size: 16px;
  transition: border-color var(--tr);
}
.field input:focus {
  outline: none;
  border-color: var(--monstera-soft);
}

/* ── messages ── */
.msg {
  margin-top: 18px;
  min-height: 18px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: var(--cognac);
}
.msg.ok { color: var(--monstera-soft); }

.hint {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(244,239,232,0.12);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  color: rgba(244,239,232,0.45);
}
.hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--sand);
  word-break: break-all;
}

/* Taller phones get a little more breathing room above the card. */
@media (min-height: 700px) {
  .brand { margin-bottom: 48px; }
}
