/* Auth pages — same visual language as the landing page (views/home.ejs):
   warm-neutral "Stone" palette, Schibsted Grotesk + IBM Plex Mono, hairline
   rules instead of cards, and the underlined-field treatment from the
   "New listing" form mock on the landing page. */

:root {
  --ink: #1a1917;
  --dark: #131211;
  --cream: #f4f2ee;
  --panel: #faf6f0;
  --paper: #fbfaf8;
  --brass: #ab8f5e;        /* on dark */
  --brass-deep: #735726;   /* on cream — 6.02:1 */
  --line: rgba(26, 25, 23, .2);
  --line-soft: rgba(26, 25, 23, .09);
  --muted: rgba(26, 25, 23, .64);
  --faint: rgba(26, 25, 23, .72);   /* micro labels need more, not less */
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brass); color: var(--dark); }
:focus-visible { outline: 1px solid var(--brass-deep); outline-offset: 3px; }

/* ---- split layout ------------------------------------------------------ */

.auth-split { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }

/* Left: the cinematic panel, carrying the landing page's hero photograph */
.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 48px;
  background: var(--dark) center/cover no-repeat;
  background-image:
    linear-gradient(190deg, rgba(19, 18, 17, .62) 0%, rgba(19, 18, 17, .38) 42%, rgba(19, 18, 17, .88) 100%),
    url('/public/img/demo-listing/01-hero-living-late-light.jpg');
  color: #f1efea;
  isolation: isolate;
  overflow: hidden;
}

.auth-brand {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: #f1efea;
  text-decoration: none;
}

.auth-visual-copy { position: relative; }

.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brass);
  white-space: nowrap;
}
.auth-eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--brass);
  flex: none;
}

.auth-visual-copy h2 {
  margin: 0;
  max-width: 15ch;
  font-weight: 600;
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 1.08;
  letter-spacing: -.032em;
}
.auth-visual-lede {
  margin: 18px 0 0;
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.72;
  color: rgba(241, 239, 234, .58);
}

.auth-demo { margin-top: 26px; }

.auth-demo-kicker {
  margin: 0 0 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brass);
}

.auth-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid rgba(241, 239, 234, .34);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #f7f5f3;
  text-decoration: none;
  transition: border-color 420ms var(--ease), background 420ms var(--ease);
}
.auth-demo-btn:hover { border-color: rgba(241, 239, 234, .72); background: rgba(241, 239, 234, .07); }

.auth-livedot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
  animation: authLiveDot 2.4s cubic-bezier(.16, 1, .3, 1) infinite;
}

@keyframes authLiveDot {
  0%   { box-shadow: 0 0 0 0 rgba(171, 143, 94, .55); opacity: 1; }
  70%  { box-shadow: 0 0 0 7px rgba(171, 143, 94, 0); opacity: .82; }
  100% { box-shadow: 0 0 0 0 rgba(171, 143, 94, 0); opacity: 1; }
}

/* Right: the form */
.auth-form-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 40px;
  background: var(--panel);
}

.auth-form-inner { width: 100%; max-width: 372px; }

.auth-form-inner h1 {
  margin: 0 0 10px;
  font-weight: 600;
  font-size: clamp(27px, 2.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -.032em;
}

.auth-lede {
  margin: 0 0 34px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---- fields ------------------------------------------------------------ */

.auth-form-inner form { margin: 0; }

.auth-field { display: block; margin-bottom: 24px; }
.auth-field[hidden] { display: none; }

.auth-field > span {
  display: block;
  margin-bottom: 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.auth-field .opt { text-transform: none; letter-spacing: .02em; color: rgba(26, 25, 23, .55); }

.auth-field input {
  width: 100%;
  padding: 0 0 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 420ms var(--ease);
}
.auth-field input::placeholder { color: rgba(26, 25, 23, .55); }
.auth-field input:focus {
  outline: none;
  border-bottom-color: var(--brass-deep);
}

.auth-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.auth-hint-weak { color: #963a28; }
.auth-hint-good { color: var(--brass-deep); }

.auth-toggle {
  display: block;
  margin: -10px 0 24px;
  padding: 0;
  border: 0;
  background: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--brass-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.auth-toggle:hover { color: #5e451e; }
.auth-toggle[hidden] { display: none; }

.auth-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px 18px;
  border: 0;
  border-radius: 0;
  background: var(--brass-deep);
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 420ms var(--ease), transform 420ms var(--ease);
}
.auth-submit:hover { background: #5e451e; }
.auth-submit:active { transform: translateY(1px); }

/* ---- Google sign-in ----------------------------------------------------- */

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 420ms var(--ease), border-color 420ms var(--ease);
}
.auth-google-btn:hover { background: var(--panel); border-color: var(--faint); }
.auth-google-icon { flex-shrink: 0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }

/* ---- supporting text --------------------------------------------------- */

.auth-alt {
  margin: 26px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}
.auth-alt + .auth-alt { margin-top: 8px; padding-top: 0; border-top: 0; }

.auth-alt a, .auth-lede a { color: var(--brass-deep); text-decoration: none; border-bottom: 1px solid rgba(115, 87, 38, .3); }
.auth-alt a:hover, .auth-lede a:hover { border-bottom-color: var(--brass-deep); }

.auth-note {
  margin: 0 0 30px;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.65;
  border-left: 2px solid;
}
.auth-note-error { background: rgba(150, 58, 40, .07); border-left-color: #963a28; color: #7d2f20; }
.auth-note-ok { background: rgba(115, 87, 38, .08); border-left-color: var(--brass-deep); color: #5e451e; }

/* ---- responsive -------------------------------------------------------- */

@media (max-width: 880px) {
  .auth-split { grid-template-columns: 1fr; min-height: 0; }
  .auth-visual {
    min-height: 262px;
    padding: 26px 26px 30px;
    background-position: center 62%;
  }
  .auth-visual-copy h2 { font-size: 25px; }
  /* the short panel keeps the eyebrow + headline; the supporting line would
     crowd it, and the same copy is on the landing page anyway */
  .auth-visual-lede { display: none; }
  .auth-form-col { padding: 44px 26px 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
