/* landing.css — BAREme public landing + account-setup (self-contained house style).
   The :root palette now lives in assets/theme.css (the ONE shared definition the
   signed-in pages also import) — identical values, index rendering unchanged. */
@import url("assets/theme.css");
/* Estate primary font — Outfit (brand foundation), self-hosted via the
   pack-vendored brand stylesheet. Same asset the signed-in shell loads. */
@import url("assets/brand/brand.css");
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Outfit', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #16233f 0%, var(--bg) 60%);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.brand { text-align: center; margin-bottom: 18px; }
.brand__logo { margin: 0; line-height: 1; }
/* 2026-09-15 tight-crop pass: assets re-cropped to tight bounds → CSS now
   controls sizing; header logo −20% (4→3.2rem on login/setup subpages). */
.brand__logo .bare-parent-logo { height: 3.2rem; width: auto; }
/* Landing masthead — the brand block sits at the very top of the page as a
   confident header (not the small centered hero mark). DARK variant SVG on navy.
   2026-09-15 tight-crop pass: −20% (9.35→7.48rem) to match index.php inline. */
.brand--head { margin: 0 0 28px; }
.brand--head .brand__logo .bare-parent-logo { height: 7.48rem; width: auto; }

/* Footer — logo on top, © year centered below, whole block centered.
   Landing-local override of the shared one-line estate footer (brand.css).
   2026-09-15 tidy: NO background/white box behind the logo (transparent
   rect-free artwork), NO hover underline on the footer lockup link, and a
   slightly tighter gap now the mark is −20% smaller. */
.bare-foot.bare-foot--stack {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  text-align: center;
  background: none;
}
.bare-foot a, .bare-foot a:hover { text-decoration: none; }

/* Landing hero */
.hero { max-width: 560px; text-align: center; }
.hero__lead { color: var(--ink); font-size: 1.05rem; line-height: 1.6; margin: 8px 0 24px; }
.hero__actions { margin: 24px 0; }
.hero__foot { color: var(--muted); font-size: 0.85rem; margin-top: 20px; }
.foot { color: var(--muted); font-size: 0.8rem; margin-top: 40px; }
.foot span { color: var(--ink); }

/* Card (setup) */
.card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  text-align: center;
}
.btn:hover { filter: brightness(1.08); }
/* Landing call-to-action (hero): full-width is a form thing — the standalone
   "Log in" link gets a comfortable inline width instead. Additive modifier. */
.btn--inline { width: auto; min-width: 220px; }
/* Secondary (resend-a-code) action under the primary step-2 button. Additive. */
.btn--ghost {
  width: 100%;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  margin-top: 10px;
}

/* Form */
.form { margin-top: 8px; }
.field { margin-bottom: 16px; text-align: left; }
.field__label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.field__input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 1rem;
}
.field__input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.field__hint { color: var(--muted); font-size: 0.78rem; margin: 6px 0 0; }
.note { color: var(--muted); font-size: 0.92rem; line-height: 1.55; margin: 0 0 20px; text-align: left; }
.note strong { color: var(--ink); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }

/* Error */
.form-error {
  background: var(--err-bg);
  color: var(--err-ink);
  border: 1px solid var(--err-line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  text-align: left;
}

/* Neutral (non-error) feedback — e.g. "a new code was sent". Additive. */
.form-notice {
  background: var(--bg-soft);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  text-align: left;
}

/* Success */
.setup-success { text-align: center; }
.setup-success__icon {
  width: 56px; height: 56px; line-height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.8rem; font-weight: 800;
}
.setup-success__title { margin: 4px 0 8px; font-size: 1.4rem; }
.setup-success__msg { color: var(--muted); margin: 0; line-height: 1.5; }
/* Success message on two clean, centred lines. */
.setup-success__line { display: block; }

/* Wider card so the success card can hold the estate product row. */
.card--wide { max-width: 640px; }

/* Estate product row (reusable partial — see lib/estate_products.php). */
.estate {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.estate__lead {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 16px;
}
.estate-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.estate-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 92px;
  padding: 12px 12px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.estate-tile:hover,
.estate-tile:focus-visible {
  border-color: var(--accent);
  background: #16233f;
  transform: translateY(-2px);
  outline: none;
}
.estate-tile__mark {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.estate-tile__accent { color: var(--accent); }
.estate-tile__host {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.01em;
}
.estate-tile:hover .estate-tile__host,
.estate-tile:focus-visible .estate-tile__host { color: var(--ink); }

/* TOTP enrolment (setup step 1) — QR + manual key. Reuses the existing palette. */
.enrol {
  margin: 4px 0 20px;
  padding: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}
.enrol__qr {
  width: 176px; height: 176px;
  margin: 0 auto 12px;
  background: #ffffff;             /* quiet zone so any scanner reads the SVG */
  border-radius: 8px;
  padding: 8px;
}
.enrol__qr svg { width: 100%; height: 100%; display: block; }
.enrol__secret {
  font-size: 1rem;
  letter-spacing: 0.06em;
  word-break: break-all;
  margin: 6px 0 0;
}

/* One-time recovery codes (shown once on the success screen). */
.reco {
  margin: 22px auto 4px;
  max-width: 420px;
  padding: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
}
.reco__lead { color: var(--muted); font-size: 0.85rem; margin: 0 0 12px; }
.reco__list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}
.reco__list li { font-size: 0.98rem; letter-spacing: 0.04em; }

/* Visually-hidden text for assistive tech (the "click here to go to …" label). */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ *
 * Fleshed-out public front page (index.php): the hero keeps its 560px
 * measure; the "what BAREme is" content blocks sit below it in a
 * responsive card grid. Safe vertical centering — margin:auto on the wrap
 * instead of justify-content:center, so a tall page never clips its top.
 * Additive; the login/setup card pages are untouched.
 * ------------------------------------------------------------------ */
body.landing-page { justify-content: flex-start; }
.landing-wrap {
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;                      /* masthead pinned to the top — the brand
                                     header leads the page, no vertical centering */
}
.lsegs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 44px;
}
.lseg {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px;
  text-align: left;
}
.lseg h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.lseg p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; margin: 0 0 14px; }
.lseg--cta { grid-column: 1 / -1; text-align: center; }

/* Login Back link (reset-on-Back, job 2105/2120 parity): the complete-reset
   exit from the sign-in card, styled in the house voice — a quiet centered
   text link below the card, not a restyle. Additive. */
.card-back {
  display: inline-block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}
.card-back:hover { color: var(--accent); }
/* Quiet inline link INSIDE the sign-in card — "Forgot your password?" under
   the Continue button (password-reset flow). Additive. */
.card-back--in { display: block; text-align: center; margin-top: 14px; }
.link-quiet {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
}
.link-quiet:hover { color: var(--accent); }
