/* ByFrame auth pages — tokens and layout per the ByFrame Design Guide v2.0.
   Applies to the account flows (login, reset password, invitations). */

:root {
  /* Brand */
  --brand-black: #5c5c5c;
  --brand-red: #e63946;
  --brand-gray: #4a4a4a;
  --brand-petrol: #1e3a45;
  --brand-rust: #a84a32;

  /* Nordic */
  --nordic-sand: #f8f7f2;
  --nordic-stone: #e5e2dd;
  --nordic-charcoal: #1a1a1a;
  --nordic-sage: #cbd5cd;

  /* Type */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Motion */
  --ease-out-brand: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 200ms;
  --duration-medium: 400ms;

  /* Shadows (petrol-tinted) */
  --shadow-rest: 0 1px 3px rgba(30, 58, 69, 0.05), 0 8px 32px rgba(30, 58, 69, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--nordic-sand);
  color: var(--brand-black);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.bf-auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
}

.bf-auth-logo {
  height: 48px;
  width: auto;
  margin-bottom: 40px;
}

/* Card with dashed frame corners (Dogma 4.4) */
.bf-auth-card {
  position: relative;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: var(--shadow-rest);
  padding: 48px;
  width: 100%;
  max-width: 460px;
}
.bf-auth-card::before,
.bf-auth-card::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1px dashed var(--brand-black);
  pointer-events: none;
}
.bf-auth-card::before { top: -12px; left: -12px; border-right: none; border-bottom: none; }
.bf-auth-card::after { bottom: -12px; right: -12px; border-left: none; border-top: none; }

.bf-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.25em;
  color: var(--brand-gray);
  margin: 0 0 16px;
}

.bf-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 5vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--nordic-charcoal);
  margin: 0 0 24px;
}

.logo-dot { color: var(--brand-red); }

.bf-lead {
  font-size: 16px;
  line-height: 1.7;
  color: var(--brand-black);
  margin: 0 0 32px;
}

/* Form fields — bottom border only (guide §7.6) */
.bf-field { margin-bottom: 24px; }

.bf-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.15em;
  color: var(--brand-gray);
  margin-bottom: 4px;
}

.bf-input {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--nordic-stone);
  border-radius: 0;
  padding: 10px 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--brand-black);
  transition: border-color var(--duration-fast) var(--ease-out-brand), box-shadow var(--duration-fast) var(--ease-out-brand);
  outline: none;
}
.bf-input:focus {
  border-bottom-color: var(--brand-black);
  box-shadow: 0 1px 0 0 var(--brand-black);
}

.bf-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  font-size: 14px;
  color: var(--brand-gray);
}
.bf-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-black);
}
.bf-checkbox-row label { margin: 0; cursor: pointer; }

/* Primary button (guide §7.1) */
.bf-button {
  display: block;
  width: 100%;
  background: var(--brand-black);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  padding: 18px 36px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--duration-fast) ease-out;
}
.bf-button:hover {
  background: var(--nordic-charcoal);
  transform: translateY(-2px);
}

a.bf-button {
  text-decoration: none;
  text-align: center;
  color: #ffffff;
}

.bf-error,
.bf-error ul {
  color: var(--brand-red);
  font-size: 13px;
  line-height: 1.6;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.bf-error:empty { margin: 0; }
span.bf-error { display: block; margin-top: 4px; margin-bottom: 0; }

.bf-link {
  color: var(--brand-black);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--duration-fast) ease-out;
}
.bf-link:hover { color: var(--brand-red); }

.bf-below-form {
  margin: 24px 0 0;
  font-size: 14px;
  text-align: center;
}

.bf-auth-footer {
  margin-top: 40px;
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--brand-gray);
}

@media (max-width: 640px) {
  .bf-auth-page { padding: 40px 16px; }
  .bf-auth-card { padding: 40px 24px; }
}
