/* Arc Cardinal — landing page base components.
   Pairs with colors_and_type.css (tokens) + icons.js + auth.js.
   Layout/hero CSS is per-page; this file holds the shared chrome & components. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--accent-bg); }

/* ---------- icons ---------- */
.ic { display: inline-flex; width: 20px; height: 20px; flex: 0 0 auto; color: currentColor; }
.ic svg { display: block; }

/* ---------- eyebrow ---------- */
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-tertiary);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: var(--accent); opacity: .55;
}
.eyebrow.no-rule::before { display: none; }

/* ---------- buttons ---------- */
.btn {
  --bh: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: var(--bh); padding: 0 20px; border: none; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 500; letter-spacing: .005em;
  border-radius: var(--radius); text-decoration: none; white-space: nowrap;
  transition: background var(--ease) ease, color var(--ease) ease,
              border-color var(--ease) ease, transform var(--ease-press) ease,
              box-shadow var(--ease-lift) ease, filter var(--ease) ease;
}
.btn:active { transform: scale(.99); }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: #fff; border-color: rgba(0,0,0,.28); }
.btn-light { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn-light:hover { background: rgba(255,255,255,.2); }
.btn-grad { background: var(--magenta-grad); color: #fff; }
.btn-grad:hover { filter: brightness(1.08) saturate(1.05); }
.btn-block { width: 100%; }
.btn-lg { --bh: 50px; padding: 0 26px; font-size: 15px; }
.btn-sm { --bh: 38px; padding: 0 16px; font-size: 13px; }
.btn.is-busy { opacity: .85; cursor: default; }

.linklike {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 500; color: var(--accent);
  text-decoration: none; transition: gap var(--ease) ease;
}
.linklike .ic { width: 16px; height: 16px; }
.linklike:hover { gap: 11px; }

/* ---------- top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; height: 64px; padding: 0 clamp(20px, 5vw, 56px);
  background: rgba(247,246,243,.82); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--border-faint);
}
.nav-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.nav-logo {
  height: 34px; width: auto; background: #fff; padding: 5px 8px;
  border-radius: 9px; border: 1px solid var(--border-faint);
}
.nav-brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.nav-brand-txt b { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.nav-brand-txt span { font-size: 11px; color: var(--text-tertiary); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  font-size: 13.5px; color: var(--text-secondary); text-decoration: none;
  padding: 8px 12px; border-radius: var(--radius-sm); transition: color var(--ease) ease, background var(--ease) ease;
}
.nav-link:hover { color: var(--text-primary); background: rgba(0,0,0,.035); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
@media (max-width: 720px) {
  .nav-link, .nav-brand-txt { display: none; }
}

/* ---------- footer ---------- */
.foot {
  background: var(--text-primary); color: rgba(255,255,255,.62);
  padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 56px) 30px;
}
.foot-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px;
  max-width: 1180px; margin: 0 auto; padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.foot-logo {
  height: 36px; width: auto; background: #fff; padding: 6px 9px;
  border-radius: 9px; margin-bottom: 14px;
}
.foot-blurb { font-size: 13px; line-height: 1.6; max-width: 280px; }
.foot-col h4 {
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.5); margin-bottom: 14px;
}
.foot-col a, .foot-contact a, .foot-contact div {
  display: flex; align-items: center; gap: 9px; font-size: 13.5px;
  color: rgba(255,255,255,.72); text-decoration: none; padding: 5px 0; line-height: 1.4;
}
.foot-col a:hover, .foot-contact a:hover { color: #fff; }
.foot-contact .ic { width: 16px; height: 16px; color: var(--green-rail-top); }
.foot-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1180px; margin: 22px auto 0; font-size: 12px; color: rgba(255,255,255,.45);
}
.foot-bottom .mono { font-family: var(--mono); }
@media (max-width: 860px) {
  .foot-top { grid-template-columns: 1fr 1fr; gap: 26px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- reusable: capability item ---------- */
.cap {
  display: flex; gap: 15px; padding: 20px; background: var(--surface);
  border: 1px solid var(--border-faint); border-radius: var(--radius-xl);
  transition: box-shadow var(--ease-lift) ease, transform var(--ease-lift) ease, border-color var(--ease) ease;
}
.cap:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); border-color: var(--border); }
.cap-ic {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
}
.cap-ic .ic { width: 22px; height: 22px; }
.cap h3 { font-size: 15px; font-weight: 600; margin-bottom: 5px; letter-spacing: -.01em; }
.cap p { font-size: 13px; line-height: 1.55; color: var(--text-secondary); }

/* ---------- reusable: category card ---------- */
.cat {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 22px 20px; background: var(--surface);
  border: 1px solid var(--border-faint); border-radius: var(--radius-xl);
  text-decoration: none; color: inherit; overflow: hidden;
  transition: box-shadow var(--ease-lift) ease, transform var(--ease-lift) ease, border-color var(--ease) ease;
}
.cat:hover { box-shadow: var(--shadow-card); transform: translateY(-3px); border-color: var(--border); }
.cat-ic {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
}
.cat-ic .ic { width: 24px; height: 24px; }
.cat h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.cat p { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.cat-count { font-family: var(--mono); font-size: 11px; color: var(--text-tertiary); margin-top: auto; }

/* pinwheel tint helpers */
.t1 { background: var(--pin-1-tint); color: var(--pin-1-ink); }
.t2 { background: var(--pin-2-tint); color: var(--pin-2-ink); }
.t3 { background: var(--pin-3-tint); color: var(--pin-3-ink); }
.t4 { background: var(--pin-4-tint); color: var(--pin-4-ink); }
.t5 { background: var(--pin-5-tint); color: var(--pin-5-ink); }
.t6 { background: var(--pin-6-tint); color: var(--pin-6-ink); }

/* ---------- reusable: audience card ---------- */
.aud {
  display: flex; flex-direction: column; gap: 16px; padding: 28px;
  border-radius: var(--radius-xl); border: 1px solid var(--border-faint);
  background: var(--surface);
}
.aud-head { display: flex; align-items: center; gap: 13px; }
.aud-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; }
.aud-ic .ic { width: 24px; height: 24px; }
.aud h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.aud .kicker { font-size: 12px; color: var(--text-tertiary); }
.aud ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.aud li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.aud li .ic { width: 17px; height: 17px; color: var(--accent); flex: 0 0 auto; margin-top: 1px; }

/* ---------- portal preview mock (on-brand hero visual) ---------- */
.pmock {
  border-radius: 16px; overflow: hidden; background: #fff;
  border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(20,30,25,.16), 0 4px 14px rgba(0,0,0,.05);
  display: grid; grid-template-columns: 58px 1fr; min-height: 320px;
}
.pmock-rail {
  background: var(--sidebar-bg); padding: 14px 0; display: flex; flex-direction: column;
  align-items: center; gap: 7px;
}
.pmock-rail .plate { width: 32px; height: 32px; background: #fff; border-radius: 8px; margin-bottom: 8px; display: grid; place-items: center; }
.pmock-rail .plate img { width: 24px; height: auto; }
.pmock-rail .ri { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--sidebar-text); }
.pmock-rail .ri.on { background: var(--sidebar-active-bg); color: #fff; }
.pmock-rail .ri .ic { width: 18px; height: 18px; }
.pmock-rail .spacer { flex: 1; }
.pmock-rail .ri.me { background: var(--magenta-grad); color: #fff; }
.pmock-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 13px; background: var(--bg); color: var(--text-primary); }
.pmock-bar { display: flex; align-items: center; justify-content: space-between; }
.pmock-greet b { font-size: 14px; font-weight: 600; }
.pmock-greet span { display: block; font-size: 11px; color: var(--text-tertiary); }
.pmock-ask {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500;
  color: var(--magenta-deep); background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 5px 11px;
}
.pmock-ask .ic { width: 13px; height: 13px; }
.pmock-eye { font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-tertiary); }
.pmock-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pmock-tile { background: #fff; border: 1px solid var(--border-faint); border-radius: 11px; padding: 11px; display: flex; flex-direction: column; gap: 8px; }
.pmock-tile .ti { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.pmock-tile .ti .ic { width: 16px; height: 16px; }
.pmock-tile b { font-size: 11.5px; font-weight: 600; }
.pmock-tile span { font-size: 9.5px; color: var(--text-tertiary); }
.pmock-stat { display: flex; gap: 8px; }
.pmock-stat .s { flex: 1; background: #fff; border: 1px solid var(--border-faint); border-radius: 10px; padding: 9px 11px; }
.pmock-stat .s em { font-family: var(--mono); font-size: 15px; font-style: normal; color: var(--text-primary); }
.pmock-stat .s span { display: block; font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-tertiary); margin-top: 2px; }

/* ---------- AUTH MODAL ---------- */
.auth-scrim {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 22px;
  background: rgba(20,18,16,.42); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .18s ease;
}
.auth-scrim.is-open { display: flex; opacity: 1; }
.auth-card {
  position: relative; width: 100%; max-width: 440px;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal); padding: 30px 30px 26px;
  transform: translateY(8px) scale(.985); transition: transform .2s var(--ease) ;
  max-height: calc(100vh - 44px); overflow-y: auto;
}
.auth-scrim.is-open .auth-card { transform: none; }
.auth-card[aria-label] { animation: none; }
.auth-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border: none; background: transparent; color: var(--text-tertiary);
  border-radius: 8px; cursor: pointer; display: grid; place-items: center;
  transition: background var(--ease) ease, color var(--ease) ease;
}
.auth-close:hover { background: var(--surface-sunk); color: var(--text-primary); }
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-logo { height: 40px; width: auto; margin: 0 auto 12px; }
.auth-title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.auth-sub { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }

.auth-seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--surface-sunk); border: 1px solid var(--border-faint);
  border-radius: var(--radius); padding: 4px; margin-bottom: 22px;
}
.auth-seg-btn {
  position: relative; z-index: 2; height: 34px; border: none; background: transparent;
  font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; border-radius: 6px; transition: color var(--ease) ease;
}
.auth-seg-btn.is-active { color: var(--accent); }
.auth-seg-pill {
  position: absolute; z-index: 1; top: 4px; left: 4px; width: calc(50% - 4px); height: 34px;
  background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: transform .2s var(--ease) ;
}

.auth-form { display: none; flex-direction: column; gap: 15px; }
.auth-form.is-active { display: flex; }
.auth-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld .t-label { display: flex; align-items: center; gap: 4px; }
.req { color: var(--magenta); font-style: normal; }
.fld-wrap { position: relative; }
.fld input {
  width: 100%; height: 42px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 0 13px; font-family: var(--font);
  font-size: 14px; color: var(--text-primary); background: #fff; outline: none;
  transition: border-color var(--ease) ease, box-shadow var(--ease) ease;
}
.fld input::placeholder { color: var(--text-tertiary); }
.fld input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.fld.has-err input { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.fld-wrap input { padding-right: 56px; }
.fld-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--text-tertiary);
  font-family: var(--font); font-size: 12px; font-weight: 500; cursor: pointer; padding: 5px 7px;
}
.fld-toggle:hover { color: var(--text-primary); }
.fld-err { font-size: 11.5px; color: var(--red-text); min-height: 0; display: none; }
.fld.has-err .fld-err { display: block; }
.fld-link { align-self: flex-end; font-size: 12px; color: var(--accent); text-decoration: none; font-weight: 500; margin-top: -2px; }
.fld-link:hover { text-decoration: underline; }

.auth-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 13px;
  border: 1px solid var(--border-strong); background: #fff; border-radius: var(--radius);
  font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: all var(--ease) ease;
}
.choice .ic { width: 19px; height: 19px; color: var(--text-tertiary); flex-shrink: 0; }
.choice-text { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.2; }
.choice-text small { margin-top: 2px; font-weight: 400; font-size: 10.5px; color: var(--text-tertiary); }
.choice.is-active { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.choice.is-active .ic { color: var(--accent); }
.auth-fine { font-size: 11.5px; color: var(--text-tertiary); line-height: 1.5; text-align: center; }

.auth-done { display: none; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 8px 0 4px; }
.auth-done.is-active { display: flex; }
.auth-done-ic {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-bg); color: var(--green-text);
}
.auth-done-ic .ic { width: 28px; height: 28px; }
.auth-done-title { font-size: 17px; font-weight: 600; }
.auth-done-msg { font-size: 13px; color: var(--text-secondary); line-height: 1.55; max-width: 320px; }
.auth-done .btn { margin-top: 8px; }

@media (max-width: 480px) {
  .auth-grid2, .auth-choice { grid-template-columns: 1fr; }
  .auth-card { padding: 26px 20px 22px; }
}

/* ---------- AUTH MODAL: additions for live-Firebase rewire ---------- */
/* In-modal alert banner (sign-in warnings/errors, reset confirmation) */
.auth-alert { display: none; border-radius: var(--radius); padding: 10px 13px;
  font-size: 12.5px; line-height: 1.5; margin-bottom: 16px; }
.auth-alert.is-show { display: block; }
.auth-alert.is-error   { background: var(--red-bg);   border: 1px solid #FEB2B2; color: var(--red-text); }
.auth-alert.is-warning { background: var(--amber-bg); border: 1px solid #F6E0B0; color: var(--amber-text); }
.auth-alert.is-info    { background: var(--blue-bg);  border: 1px solid #B9D6F2; color: var(--blue-text); }
.auth-alert.is-success { background: var(--green-bg); border: 1px solid #A8DCC9; color: var(--green-text); }

/* "Back to sign in" control in the reset view */
.auth-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; color: var(--accent); font-family: var(--font);
  font-size: 12.5px; font-weight: 500; cursor: pointer; padding: 0; margin-bottom: 2px; }
.auth-back:hover { text-decoration: underline; }

/* Field hint (password rule under the request-access password) */
.fld-hint { font-size: 11px; color: var(--text-tertiary); line-height: 1.45; }
