/* ============================================================================
   BKA Marco — Community Accounts
   Design language: matches the live BKA Marco site (ink / cream / gold).
   ==========================================================================*/
:root {
  --ink: #0a0908;
  --ink-soft: #141210;
  --panel: #181512;
  --panel-light: #211d18;
  --line: rgba(246, 238, 220, .14);
  --line-strong: rgba(246, 238, 220, .25);
  --cream: #f6efdf;
  --muted: #a9a092;
  --gold: #d4a552;
  --gold-bright: #efc56f;
  --gold-faint: rgba(212, 165, 82, .15);
  --danger: #d46a5a;
  --ok: #7fae7f;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'DM Mono', 'SFMono-Regular', Consolas, monospace;
  --shadow: 0 22px 80px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  line-height: 1.5;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 74% 10%, rgba(182, 132, 51, .12), transparent 30%),
              radial-gradient(circle at 12% 88%, rgba(111, 77, 29, .08), transparent 28%);
  z-index: -2;
}
.grain {
  position: fixed; inset: 0; opacity: .035; pointer-events: none; z-index: 10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--gold-bright); box-shadow: 0 4px 0 -2px var(--gold-bright); }
.section-wrap { width: min(1100px, calc(100% - 48px)); margin-inline: auto; }

/* ---- header -------------------------------------------------------------- */
.site-header {
  width: min(1280px, calc(100% - 48px));
  height: 80px; margin: auto;
  display: flex; align-items: center; gap: 42px;
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 5;
}
.brand { display: inline-flex; align-items: center; gap: 11px; letter-spacing: .16em; font-weight: 800; font-size: .75rem; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px;
  border: 1px solid var(--gold); color: var(--gold-bright);
  font-family: var(--serif); font-size: 1.15rem; font-weight: 400;
  letter-spacing: 0; transform: rotate(45deg);
}
.brand-mark > span { display: block; transform: rotate(-45deg); }
.brand-word { color: var(--cream); }
.header-links { display: flex; align-items: center; gap: 28px; margin-left: auto; color: var(--muted); font-size: .78rem; }
.header-links a { transition: color .2s ease; }
.header-links a:hover { color: var(--gold-bright); }
.header-cta {
  display: inline-flex; gap: 8px; align-items: center;
  color: var(--gold-bright); font-family: var(--mono); font-size: .72rem;
  border-bottom: 1px solid var(--gold); padding-bottom: 5px;
}

/* ---- hero / auth layout --------------------------------------------------- */
.auth-page { flex: 1; display: grid; place-items: center; padding: 72px 0 88px; }
.auth-shell { width: min(980px, calc(100% - 48px)); margin-inline: auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.auth-copy .eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--gold); font-family: var(--mono); font-size: .65rem; text-transform: uppercase; letter-spacing: .17em; }
.eyebrow-dot { width: 6px; height: 6px; background: var(--gold-bright); border-radius: 50%; display: inline-block; }
.auth-copy h1 { font-family: var(--serif); font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 400; line-height: 1.08; margin: 0 0 20px; letter-spacing: -.01em; }
.auth-copy h1 em { color: var(--gold-bright); font-style: italic; }
.auth-lede { color: var(--muted); font-size: 1.02rem; max-width: 46ch; margin: 0 0 30px; }
.community-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.community-list li { display: flex; gap: 12px; align-items: baseline; color: var(--cream); font-size: .94rem; }
.community-list .tick { color: var(--gold-bright); font-family: var(--mono); }
.local-note { margin-top: 28px; color: var(--muted); font-size: .82rem; }

/* ---- auth card ------------------------------------------------------------- */
.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 32px 30px;
  box-shadow: var(--shadow);
}
.auth-tabs { display: flex; gap: 6px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.auth-tab {
  flex: 1; padding: 12px 8px; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.auth-tab[aria-selected="true"] { color: var(--gold-bright); border-bottom-color: var(--gold); }
.auth-form { display: grid; gap: 16px; }
.auth-form[hidden] { display: none; }
.field { display: grid; gap: 7px; }
.field label { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.field input {
  width: 100%; background: var(--ink-soft); border: 1px solid var(--line);
  color: var(--cream); padding: 12px 14px; border-radius: 8px; font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: rgba(246, 238, 220, .28); }
.field-hint { font-size: .76rem; color: var(--muted); }

.consent-stack { display: grid; gap: 10px; }
.consent-line { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted); line-height: 1.45; cursor: pointer; }
.consent-line input[type="checkbox"] { margin-top: 3px; accent-color: var(--gold); width: 15px; height: 15px; flex: none; }
.consent-line.required-line { color: var(--cream); }
.consent-line a { color: var(--gold-bright); border-bottom: 1px solid var(--gold); }

.form-actions { display: grid; gap: 10px; margin-top: 4px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 8px; border: 1px solid transparent;
  font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em;
  cursor: pointer; transition: transform .15s ease, background .2s, color .2s, border-color .2s;
}
.button:active { transform: translateY(1px); }
.button-gold { background: var(--gold); color: #14100a; }
.button-gold:hover { background: var(--gold-bright); }
.button-gold[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.button-quiet { background: transparent; border-color: var(--line-strong); color: var(--cream); }
.button-quiet:hover { border-color: var(--gold); color: var(--gold-bright); }
.button-danger { background: transparent; border-color: rgba(212, 106, 90, .5); color: var(--danger); }
.button-danger:hover { background: rgba(212, 106, 90, .12); }
.text-link { background: none; border: 0; color: var(--gold-bright); cursor: pointer; font-size: .8rem; padding: 0; }
.text-link:hover { text-decoration: underline; }

.form-status { display: block; font-size: .84rem; border-radius: 8px; padding: 10px 12px; }
.form-status[hidden] { display: none; }
.form-status.error { background: rgba(212, 106, 90, .12); color: #e8a79c; border: 1px solid rgba(212, 106, 90, .35); }
.form-status.ok { background: rgba(127, 174, 127, .12); color: #b5d6b5; border: 1px solid rgba(127, 174, 127, .35); }
.form-status.info { background: var(--gold-faint); color: var(--gold-bright); border: 1px solid rgba(212, 165, 82, .35); }

.password-row { display: flex; justify-content: space-between; align-items: center; }
.switch-note { text-align: center; margin-top: 18px; color: var(--muted); font-size: .8rem; }

/* ---- dashboard ------------------------------------------------------------- */
.dash-page { flex: 1; padding: 60px 0 88px; }
.dash-header-row { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.dash-header-row h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; }
.dash-header-row .sub { color: var(--muted); font-size: .92rem; }
.email-badge { font-family: var(--mono); font-size: .68rem; color: var(--ok); border: 1px solid rgba(127, 174, 127, .4); padding: 3px 9px; border-radius: 999px; margin-left: 8px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 34px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 26px 24px;
}
.card h2 { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; margin: 0 0 6px; }
.card .card-note { color: var(--muted); font-size: .84rem; margin: 0 0 18px; }
.pref-toggle { display: flex; align-items: center; gap: 14px; margin: 14px 0 6px; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: var(--ink-soft); border: 1px solid var(--line-strong);
  border-radius: 999px; cursor: pointer; transition: background .2s, border-color .2s;
}
.switch .slider::before {
  content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px;
  background: var(--muted); border-radius: 50%; transition: transform .2s, background .2s;
}
.switch input:checked + .slider { background: var(--gold-faint); border-color: var(--gold); }
.switch input:checked + .slider::before { transform: translateX(20px); background: var(--gold-bright); }
.pref-label { font-size: .92rem; color: var(--cream); }
.pref-sub { font-size: .78rem; color: var(--muted); margin: 0; }
.card-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.card-actions .button { padding: 10px 16px; font-size: .68rem; }
.profile-line { display: grid; gap: 12px; margin-top: 6px; }
.member-email { font-family: var(--mono); font-size: .86rem; color: var(--muted); word-break: break-all; }
.dash-back { margin-top: 30px; }

/* ---- footer ---------------------------------------------------------------- */
.site-footer {
  width: min(1100px, calc(100% - 48px));
  margin: auto auto 0;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  color: var(--muted); font-size: .78rem;
}
.footer-mark { margin-left: auto; font-family: var(--mono); font-size: .7rem; }
.footer-credit a { color: var(--gold-bright); border-bottom: 1px solid var(--gold); }

/* ---- toast ------------------------------------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--panel-light); border: 1px solid var(--line-strong); color: var(--cream);
  padding: 12px 20px; border-radius: 10px; font-size: .86rem; z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  max-width: min(440px, calc(100% - 48px)); text-align: center;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(212, 106, 90, .5); }
.toast.ok { border-color: rgba(127, 174, 127, .5); }

/* ---- confirm / recover pages ------------------------------------------------- */
.center-page { flex: 1; display: grid; place-items: center; padding: 72px 0 88px; }
.center-card {
  width: min(520px, calc(100% - 48px)); background: var(--panel);
  border: 1px solid var(--line); border-radius: 18px; padding: 40px 36px; text-align: center;
  box-shadow: var(--shadow);
}
.center-card h1 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; margin: 0 0 12px; }
.center-card p { color: var(--muted); margin: 0 0 24px; }
.center-card .big-tick { font-size: 2.4rem; color: var(--gold-bright); margin-bottom: 10px; }
.center-card form { text-align: left; display: grid; gap: 16px; margin-top: 6px; }
.center-card .form-status { text-align: left; }

/* ---- privacy page ------------------------------------------------------------ */
.privacy-page { flex: 1; padding: 60px 0 88px; }
.privacy-page h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 8px; }
.privacy-page .updated { color: var(--muted); font-family: var(--mono); font-size: .7rem; }
.privacy-body { max-width: 72ch; }
.privacy-body h2 { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; margin: 34px 0 10px; }
.privacy-body p, .privacy-body li { color: var(--muted); font-size: .94rem; }
.privacy-body ul { padding-left: 20px; display: grid; gap: 8px; }

/* ---- responsive --------------------------------------------------------------- */
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; gap: 36px; }
  .auth-copy h1 { font-size: 2rem; }
  .site-header { height: 70px; }
  .header-links { gap: 16px; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .site-header .header-links .hide-mobile { display: none; }
  .auth-card { padding: 26px 20px 24px; }
  .section-wrap { width: min(1100px, calc(100% - 32px)); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}
