/* Cape Ann Symphony — Auth screens
   Used by /members/login, /members/register, /members/find,
   and the /members/forgot/* flow. Cream-and-ink, conversational,
   patron-friendly. Loaded by site.head.2026.php via page_css. */

/* =============== SHELL =============== */

.auth-main {
  background: var(--bg);
  min-height: calc(100vh - 220px);
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: 72px;
  align-items: start;
  padding: 72px 32px 96px;
  max-width: 1280px;
  margin: 0 auto;
}
.auth-shell--single {
  grid-template-columns: 1fr;
  max-width: 720px;
}

.auth-shell-form {
  max-width: 520px;
}

.auth-shell-aside {
  position: sticky;
  top: 160px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-eyebrow {
  color: var(--accent);
}
.auth-title {
  font-size: clamp(40px, 5vw, 64px);
  margin-top: 10px;
  line-height: 1.04;
}
.auth-title em {
  font-style: italic;
  color: var(--accent);
}
.auth-intro {
  font-size: 19px;
  color: var(--ink-2);
  margin-top: 20px;
  line-height: 1.55;
  max-width: 60ch;
  font-family: "Source Serif 4", Georgia, serif;
}

.auth-body {
  margin-top: 40px;
}

/* =============== FORMS =============== */

.auth-field {
  display: block;
  margin-bottom: 22px;
}
.auth-field-label {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  display: block;
}
.auth-field-hint {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 10px;
  line-height: 1.45;
  display: block;
}
.auth-field-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-3, rgba(0, 0, 0, 0.06));
  color: var(--ink-3);
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.auth-field input.input,
.auth-field .input {
  font-size: 18px;
  width: 100%;
}
.auth-field-error {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #C5432A;
  margin-top: 8px;
}
.auth-field-error::before {
  content: "✦ ";
}
.auth-field-success {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--success);
  margin-top: 8px;
}
.auth-field-success::before {
  content: "\2713\00a0";
}

/* Numeric / postcode style — large tracked digits */
.auth-input-zip {
  font-size: 20px !important;
  letter-spacing: 0.3em;
  font-family: "JetBrains Mono", monospace;
  max-width: 220px;
}

/* Password reveal toggle */
.auth-pw-wrap {
  position: relative;
}
.auth-pw-toggle {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  padding: 0 16px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--ink-3);
  border-radius: 2px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.auth-pw-toggle:hover {
  color: var(--ink);
}

/* Password strength meter */
.auth-pw-strength {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  align-items: center;
}
.auth-pw-bar {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--rule);
  transition: background 200ms;
}
.auth-pw-bar.is-weak    { background: var(--gold); }
.auth-pw-bar.is-medium  { background: var(--accent); }
.auth-pw-bar.is-strong  { background: var(--success); }
.auth-pw-strength-label {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: var(--ink-3);
  margin-left: 10px;
  min-width: 100px;
}

/* Inline label-row for "remember + forgot" pair */
.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
}
.auth-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
}
.auth-link {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.auth-link:hover {
  text-decoration-thickness: 2px;
}

/* Boxed checkbox (e.g. "keep me in the loop" on register) */
.auth-boxcheck {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 2px;
  margin-bottom: 20px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
}
.auth-boxcheck input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}
.auth-boxcheck-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.auth-boxcheck-body {
  font-size: 14px;
  color: var(--ink-3);
  margin-top: 4px;
  line-height: 1.5;
}

/* Submit / footer */
.auth-submit {
  width: 100%;
  font-size: 19px !important;
}
.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-foot {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--ink-3);
  text-align: center;
  margin-top: 32px;
}
.auth-foot strong,
.auth-foot a {
  color: var(--accent);
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0;
}
.auth-divider hr {
  flex: 1;
  height: 1px;
  background: var(--rule);
  border: 0;
}
.auth-divider span {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.auth-legal {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 20px;
  line-height: 1.55;
}
.auth-legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Two-column field grid (e.g. first/last name) */
.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* =============== ASIDE CARDS =============== */

.auth-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 28px;
}

.auth-card-accent {
  background: color-mix(in oklab, var(--accent) 8%, var(--bg-elev));
  border-color: color-mix(in oklab, var(--accent) 30%, var(--rule));
}

.auth-card-label {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 10px;
}
.auth-card-accent .auth-card-label {
  color: var(--accent);
}

.auth-card-title {
  font-family: "Playfair Display", "Source Serif 4", Georgia, serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  margin-top: 8px;
  color: var(--ink);
}

.auth-card-body {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-top: 12px;
}
.auth-card-body + .auth-card-body {
  margin-top: 10px;
}

.auth-card-cta {
  margin-top: 16px;
}

.auth-card-list {
  list-style: none;
  padding: 0;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}
.auth-card-list li::before {
  content: "✦ ";
  color: var(--accent);
  margin-right: 4px;
}

/* Box-office card — dark, warm reassurance */
.auth-boxoffice {
  background: var(--ink);
  color: var(--bg);
  padding: 28px;
  border-radius: 4px;
}
.auth-boxoffice .auth-card-label {
  color: var(--accent);
  margin-bottom: 12px;
}
.auth-boxoffice-h {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  color: var(--bg);
  margin-top: 8px;
}
.auth-boxoffice-num {
  font-family: "Inter", sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-top: 14px;
  color: var(--bg);
}
.auth-boxoffice-hours {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  opacity: 0.75;
  margin-top: 6px;
}
.auth-boxoffice-body {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  opacity: 0.85;
  margin-top: 16px;
  line-height: 1.55;
}

/* =============== FORGOT-PASSWORD STEP RAIL =============== */

.auth-steps {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  font-family: "Inter", sans-serif;
  list-style: none;
  padding-left: 0;
}
.auth-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.auth-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1.5px solid var(--rule-2);
  color: var(--ink-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.auth-step.is-current .auth-step-num {
  background: var(--ink);
  border-color: transparent;
  color: var(--bg);
}
.auth-step.is-done .auth-step-num {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}
.auth-step-num::before {
  content: attr(data-num);
}
.auth-step.is-done .auth-step-num::before {
  content: "\2713";
}
.auth-step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-4);
  white-space: nowrap;
}
.auth-step.is-current .auth-step-label {
  color: var(--ink);
  font-weight: 600;
}
.auth-step.is-done .auth-step-label {
  color: var(--ink);
}
.auth-step-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
  margin: 0 16px;
  min-width: 24px;
}
.auth-step-rule.is-done {
  background: var(--accent);
}

/* =============== EMAIL PREVIEW (forgot/sent) =============== */

.auth-email {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 32px;
}
.auth-email-head {
  padding: 16px 24px;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: var(--ink-3);
  flex-wrap: wrap;
  gap: 8px;
}
.auth-email-head strong {
  color: var(--ink);
}
.auth-email-body {
  padding: 28px;
}
.auth-email-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 600;
}
.auth-email-subject {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
  margin-top: 4px;
}
.auth-email-rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 20px 0;
}
.auth-email-text {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}
.auth-email-cta {
  margin-top: 16px;
}
.auth-email-fineprint {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.6;
  margin-top: 20px;
}

/* "Email not arriving?" trouble box */
.auth-trouble {
  padding: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 2px;
  margin-bottom: 24px;
}
.auth-trouble-list {
  list-style: none;
  padding: 0;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}
.auth-trouble-list li {
  counter-increment: trouble;
}
.auth-trouble-list li::before {
  content: counter(trouble) ". ";
  color: var(--accent);
  margin-right: 8px;
  font-weight: 600;
}
.auth-trouble-list { counter-reset: trouble; }

.auth-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =============== "FOUND YOU" + DONE STATES =============== */

.auth-confirm {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 28px;
  margin-bottom: 28px;
}
.auth-confirm-mail {
  font-family: "Inter", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 8px;
}
.auth-confirm-note {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--ink-3);
  margin-top: 12px;
  line-height: 1.5;
}

.auth-done {
  padding: 48px 32px;
  text-align: center;
  background: color-mix(in oklab, var(--success) 8%, var(--bg-elev));
  border: 1px solid color-mix(in oklab, var(--success) 30%, var(--rule));
  border-radius: 4px;
  margin-bottom: 32px;
}
.auth-done-tick {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 16px;
}
.auth-done h2 {
  font-size: 36px;
}
.auth-done p {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--ink-2);
  margin-top: 12px;
}

.auth-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =============== PERCH MEMBERS FORM ERROR/MESSAGE BLOCKS =============== */

.auth-message {
  padding: 14px 18px;
  border-radius: 2px;
  border: 1px solid;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.5;
}
.auth-message--error {
  background: color-mix(in oklab, #C5432A 10%, var(--bg-elev));
  border-color: color-mix(in oklab, #C5432A 35%, var(--rule));
  color: #C5432A;
}
.auth-message--success {
  background: color-mix(in oklab, var(--success) 10%, var(--bg-elev));
  border-color: color-mix(in oklab, var(--success) 35%, var(--rule));
  color: var(--success);
}

/* =============== RESPONSIVE =============== */

@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 24px 72px;
  }
  .auth-shell-aside {
    position: static;
    top: auto;
  }
  .auth-title {
    font-size: clamp(36px, 8vw, 48px);
  }
  .auth-intro {
    font-size: 17px;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    padding: 40px 20px 56px;
  }
  .auth-grid-2 {
    grid-template-columns: 1fr;
  }
  .auth-steps {
    flex-wrap: wrap;
    gap: 8px 0;
  }
  .auth-step-rule {
    display: none;
  }
  .auth-step {
    flex-basis: 50%;
  }
}


/* ============== ERROR STATES ============== */
/* Rendered by Perch <perch:error> blocks above the form, and by
   our own action-handler flash messages. Conversational, not shouty. */

.auth-error {
    padding: 14px 18px;
    background: color-mix(in oklab, #c0392b 8%, var(--bg-elev));
    border: 1px solid color-mix(in oklab, #c0392b 40%, var(--rule));
    border-radius: 8px;
    color: var(--ink);
    font-family: "Inter", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 18px;
}
.auth-error strong {
    color: #c0392b;
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}
.auth-error a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
}
.auth-error a:hover { color: var(--accent); }

/* "Forgot?" link tucked into the password label. */
.auth-label-link {
    float: right;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--ink-3);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.auth-label-link:hover { color: var(--accent); }

/* Sign-in / find / new — form chrome */
.auth-form { max-width: 440px; }
.auth-form .auth-field { margin-bottom: 16px; }

.auth-alts { margin: 28px 0 0; max-width: 440px; }
.auth-alts__primary {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.auth-alts__primary:hover { color: var(--ink); border-color: var(--ink); }
.auth-alts__small {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: var(--ink-3);
  margin: 12px 0 0;
}
.auth-alts__small a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.auth-alts__small a:hover { color: var(--ink); border-color: var(--ink); }
