/* ===================================================================
   LANTERN COMMUNITIES — auth pages stylesheet (signup + login)
   =================================================================== */

:root {
  --paper: #FEF9FF;
  --card: #FFFFFF;
  --line: #E7DAD8;

  --plum: #573258;
  --plum-soft: #6B4A6E;
  --plum-deep: #3E2340;
  --marigold: #D9694E;
  --marigold-dark: #8C540D;
  --rose: #A33B50;
  --sage: #5E7A6C;
  --danger: #C9684F;
  --danger-soft: #FDEDE7;

  --lavender-soft: #ECE5EC;
  --mint-soft: #E5ECE7;

  --ink: #2A2028;
  --ink-soft: #635760;

  --radius: 18px;
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shadow-soft: 0 4px 20px rgba(87,50,88,0.06);
  --shadow-lift: 0 12px 32px rgba(87,50,88,0.12);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 70% 55% at 0% 0%, var(--bg-a33b50-22), transparent 60%),
    radial-gradient(ellipse 70% 60% at 100% 100%, var(--bg-d9694e-26), transparent 60%),
    linear-gradient(135deg, var(--bg-eadcf0) 0%, var(--bg-f8e4ea) 50%, var(--bg-fdebdd) 100%);
  background-attachment: fixed;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--plum);
  margin: 0;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

button, input, select, textarea {
  font-family: var(--font-sans);
}

:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 2px;
}

/* ============================== BRAND ============================== */
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 19px;
  color: var(--plum);
  position: relative;
  z-index: 2;
}

.brand-glow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--bg-f6c9b9), var(--marigold) 65%);
  flex-shrink: 0;
  box-shadow: 0 0 14px var(--sh-d9694e-50);
}

/* ============================== BACK TO HOME ============================== */
.auth-wrap { position: relative; }

.back-link {
  position: absolute;
  top: 22px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 20px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--plum);
  z-index: 3;
  transition: all 0.2s var(--ease-out);
}

.back-link:hover {
  border-color: var(--plum-soft);
  background: var(--paper);
  transform: translateY(-1px);
}

/* ============================== AUTH LAYOUT ============================== */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-shell {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}

/* ---- brand panel ---- */
.auth-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg-6b4a6e) 0%, var(--bg-573258) 30%, var(--bg-a33b50) 70%, var(--bg-d9694e) 115%);
  color: #fff;
  padding: 42px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* large lantern glow, top right */
.auth-panel::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--bg-f6c9b9-95), var(--bg-d9694e-55) 58%, transparent 72%);
  pointer-events: none;
}

/* small lantern glow, bottom left */
.auth-panel::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--bg-f6c9b9-50), var(--bg-d9694e-28) 60%, transparent 74%);
  pointer-events: none;
}

.auth-panel .brand {
  color: #fff;
  margin-bottom: 6px;
}

.auth-panel h1 {
  color: #fff;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.auth-panel h1 em {
  font-style: italic;
  color: var(--fg-f6c9b9);
}

.auth-panel-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.82);
  line-height: 1.65;
  position: relative;
  z-index: 2;
}

.auth-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
  position: relative;
  z-index: 2;
}

.auth-perks li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  line-height: 1.55;
}

.auth-perks .perk-glow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: radial-gradient(circle at 35% 30%, var(--bg-f6c9b9), var(--marigold) 65%);
  box-shadow: 0 0 10px var(--sh-d9694e-55);
}

.auth-perks strong {
  color: #fff;
}

.auth-panel-foot {
  margin-top: auto;
  font-size: 11.5px;
  color: var(--fg-ffffff-55);
  position: relative;
  z-index: 2;
  line-height: 1.6;
}

/* ---- form side ---- */
.auth-form-side {
  padding: 42px 40px;
}

.auth-form-side h1 {
  font-size: 26px;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ============================== FORM CONTROLS ============================== */
.field {
  margin-bottom: 15px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--plum-soft);
  margin-bottom: 6px;
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--bg-ffffff);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:not([type="checkbox"]):not([type="radio"]):hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ln-d4c4c1);
}

.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--plum);
  box-shadow: 0 0 0 3px var(--rg-573258-22);
}

/* ============================== PASSWORD SHOW/HIDE ============================== */
.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 42px;
}

.toggle-password {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--ink-soft);
  line-height: 1;
}

.toggle-password:hover {
  background: var(--paper);
  color: var(--plum);
}

.toggle-password:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 2px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-error {
  display: none;
  font-size: 12px;
  color: var(--danger);
  font-weight: 700;
  margin-top: 6px;
  line-height: 1.4;
}

.field-error.show { display: block; }

.field input.invalid,
.field select.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--rg-c9684f-15);
}

.form-alert {
  display: none;
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-left: 4px solid var(--danger);
  color: var(--fg-7a2f1e);
  font-weight: 700;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12.5px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.form-alert.show { display: block; }

.form-switch {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 18px;
}

.form-switch a {
  color: var(--plum);
  font-weight: 700;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  cursor: pointer;
}

.checkbox-row input {
  margin-top: 3px;
  accent-color: var(--marigold);
}

/* ============================== PRIVACY CALLOUT ============================== */
.privacy-callout {
  background: var(--bg-f4ece3);
  border: 1px solid var(--ln-e6d3bc);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--fg-6b5636);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ============================== BUTTONS ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.btn.marigold {
  background: linear-gradient(135deg, var(--bg-a33b50), var(--bg-d9694e));
  color: #fff;
  box-shadow: 0 4px 14px var(--sh-d9694e-25);
}

.btn.marigold:hover {
  background: linear-gradient(135deg, var(--bg-8f3045), var(--bg-c15a41));
  transform: translateY(-1px);
}

.btn.block { width: 100%; }

/* ============================== FOOTER ============================== */
.site-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px 50px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.site-footer a {
  color: var(--plum);
  font-weight: 700;
}

.hint {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

/* ============================== RESPONSIVE ============================== */
@media (max-width: 820px) {
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  .auth-panel {
    padding: 26px 24px;
    gap: 10px;
  }
  .auth-panel h1 { font-size: 22px; }
  .auth-panel-sub { font-size: 13px; }
  .auth-perks { display: none; }
  .auth-panel-foot { margin-top: 0; }
  .auth-form-side { padding: 26px 22px 30px; }
  .auth-wrap { padding: 24px 14px; align-items: flex-start; }
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
  .back-link { top: 12px; left: 12px; padding: 6px 12px; font-size: 12.5px; }
  .auth-wrap { padding-top: 56px; }
}
/* ============================== COMPACT SIGNUP ============================== */
.auth-wrap:has(.compact-form) { padding: 24px 20px; }
.auth-shell:has(.compact-form) { max-width: 920px; }
.auth-shell:has(.compact-form) .auth-panel { padding: 30px 30px; gap: 14px; }
.auth-shell:has(.compact-form) .auth-panel h1 { font-size: 26px; }
.auth-shell:has(.compact-form) .auth-perks { gap: 10px; }
.auth-form-side:has(.compact-form) { padding: 28px 32px 24px; }
.auth-form-side:has(.compact-form) h1 { font-size: 23px; margin-bottom: 2px; }
.auth-form-side:has(.compact-form) .auth-sub { font-size: 13px; margin-bottom: 10px; }
.auth-form-side:has(.compact-form) .privacy-callout { padding: 8px 12px; font-size: 12px; margin-bottom: 14px; line-height: 1.4; }
.auth-form-side:has(.compact-form) .form-switch { margin-top: 12px; }
.compact-form .field { margin-bottom: 11px; }
.compact-form .field-row { gap: 12px; }
.compact-form .field label { font-size: 12.5px; margin-bottom: 4px; }
.compact-form .field input:not([type="checkbox"]):not([type="radio"]),
.compact-form .combobox input { padding: 9px 12px; font-size: 13.5px; }
.compact-form .combobox::after { top: 9px; }
.compact-form .field-error { margin-top: 4px; font-size: 11.5px; }
.compact-form .checkbox-row { font-size: 12.5px; line-height: 1.4; }
.compact-form .btn.block { margin-top: 6px; padding: 11px 18px; }
.label-note { font-weight: 500; color: var(--ink-soft); font-size: 11.5px; }

@media (max-width: 820px) {
  .auth-form-side:has(.compact-form) { padding: 22px 20px 24px; }
}
@media (max-width: 560px) {
  .compact-form .field-row { grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (max-width: 440px) {
  .compact-form .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* let the gender dropdown extend past the card edge; keep the panel's rounded corners */
.auth-shell:has(.compact-form) { overflow: visible; }
.auth-shell:has(.compact-form) .auth-panel { border-radius: 24px 0 0 24px; }
@media (max-width: 820px) {
  .auth-shell:has(.compact-form) .auth-panel { border-radius: 24px 24px 0 0; }
}
.compact-form .field label.checkbox-row { display: flex; font-weight: 500; margin-bottom: 0; }

/* phones: get to the form faster — trim the brand panel */
@media (max-width: 820px) {
  .auth-shell:has(.compact-form) .auth-panel { padding: 16px 20px; gap: 6px; }
  .auth-shell:has(.compact-form) .auth-panel h1,
  .auth-shell:has(.compact-form) .auth-panel-sub,
  .auth-shell:has(.compact-form) .auth-panel-foot { display: none; }
  .auth-wrap:has(.compact-form) { padding-top: 64px; }
}
