/* ============================================================
   RentBook · auth theme
   Calm, printed-brochure feel: warm neutrals, a serif headline,
   hairline rules, one very slow light wash in the background.
   ============================================================ */

@property --wash-x {
  syntax: '<percentage>';
  initial-value: 30%;
  inherits: false;
}
@property --shine {
  syntax: '<percentage>';
  initial-value: -140%;
  inherits: false;
}
@property --progress {
  syntax: '<percentage>';
  initial-value: 0%;
  inherits: true;
}

:root {
  --ink: #0f1215;
  --panel: #171b20;
  --line: #272d34;
  --fg: #e9e7e3;
  --fg-dim: #98a0a8;
  --accent: #c99a4b;
  --accent-ink: #1a1408;
  --accent-soft: rgba(201, 154, 75, 0.12);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --ink: #f7f4ef;
    --panel: #ffffff;
    --line: #e5dfd4;
    --fg: #1b1e22;
    --fg-dim: #6c7480;
    --accent: #9c6f24;
    --accent-ink: #ffffff;
    --accent-soft: rgba(156, 111, 36, 0.09);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
[hidden] { display: none !important; }

.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--sans);
  overflow-x: hidden;
}

.auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at var(--wash-x) 8%, var(--accent-soft) 0%, transparent 62%);
  animation: wash 70s ease-in-out infinite alternate;
}
@keyframes wash {
  to { --wash-x: 70%; }
}

/* ---------------- header ---------------- */
.auth-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  border-bottom: 1px solid var(--line);
}
.auth-nav .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.01em;
  color: var(--fg);
}
.auth-nav .glyph {
  width: 30px; height: 30px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.auth-nav .nav-actions { display: flex; gap: 8px; align-items: center; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent-ink);
  background: var(--accent);
  cursor: pointer;
  overflow: hidden;
  transition: filter 0.15s ease;
}
.btn-glow:hover { filter: brightness(1.06); }
.btn-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.28) 50%, transparent 100%);
  transform: translateX(var(--shine));
  pointer-events: none;
}
.btn-glow:hover::after { animation: shine 0.7s ease-out; }
@keyframes shine {
  from { --shine: -140%; }
  to   { --shine: 140%; }
}

/* ---------------- hero ---------------- */
.auth-hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 88px 24px 76px;
}
.auth-hero .eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.auth-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 5.2vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  max-width: 720px;
}
.auth-hero h1 em { font-style: italic; color: var(--accent); }
.auth-hero p.lede {
  font-size: 17px;
  color: var(--fg-dim);
  max-width: 520px;
  margin: 0 0 32px;
  line-height: 1.65;
}
.auth-hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.auth-hero .cta-row .btn-glow,
.auth-hero .cta-row .btn-ghost { padding: 13px 24px; font-size: 15px; }

/* ---------------- features ---------------- */
.feature-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}
.feature-strip .feature {
  padding: 30px 28px;
  border-right: 1px solid var(--line);
}
.feature-strip .feature:last-child { border-right: none; }
.feature-strip .feature h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--fg);
}
.feature-strip .feature p {
  font-size: 14px;
  color: var(--fg-dim);
  margin: 0;
  line-height: 1.6;
}
@media (max-width: 760px) {
  .feature-strip { grid-template-columns: 1fr; }
  .feature-strip .feature { border-right: none; border-bottom: 1px solid var(--line); }
  .auth-nav { padding: 18px 20px; }
  .auth-hero { padding: 56px 20px 48px; }
}

.auth-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 13px;
}

/* ---------------- login / signup card ---------------- */
.auth-form-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px 72px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px;
}
.auth-card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 6px;
}
.auth-card .sub {
  color: var(--fg-dim);
  font-size: 14px;
  margin: 0 0 24px;
  line-height: 1.55;
}

/* ---------------- wizard ---------------- */
.wizard-head { margin-bottom: 22px; }
.wizard-count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.wizard-bar {
  height: 3px;
  margin: 9px 0 14px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
  transition: --progress 0.35s ease;
}
.wizard-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--progress);
  background: var(--accent);
  transition: width 0.35s ease;
}
.wizard-title {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
}
.wizard-hint {
  font-size: 14px;
  color: var(--fg-dim);
  margin-top: 6px;
  line-height: 1.55;
}

.step { display: none; }
.step.is-active { display: block; animation: step-in 0.28s ease both; }
@keyframes step-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.wizard-nav {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.wizard-nav .btn-glow { flex: 1; padding: 12px; }
.wizard-nav .btn-ghost { padding: 12px 18px; }
.btn-done { display: none; }

/* value carried over from an earlier step */
.echo-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
  font-size: 14px;
}
.echo-line .echo-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.echo-line button {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--fg-dim);
}
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
.auth-card input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--fg);
  transition: border-color 0.15s ease;
}
.auth-card input::placeholder { color: var(--fg-dim); opacity: 0.65; }
.auth-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-note { font-size: 12.5px; color: var(--fg-dim); margin-top: 7px; }

.auth-card .switch-link {
  text-align: center;
  font-size: 14px;
  color: var(--fg-dim);
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.auth-card .switch-link a { color: var(--accent); font-weight: 600; }

.alert {
  padding: 11px 13px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error {
  background: rgba(185, 60, 45, 0.1);
  color: #d97a68;
  border: 1px solid rgba(185, 60, 45, 0.28);
}
@media (prefers-color-scheme: light) {
  .alert-error { color: #a8352a; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page::before, .btn-glow::after, .step.is-active { animation: none !important; }
}
