/* ==================================================================
   Powerbase — front-of-funnel pages (home / login / welcome)
   Same visual system as the app (powerbase-moodboard-light).
   ================================================================== */

:root {
  --paper:      #f5efe3;
  --sand:       #e7d8bd;
  --sand2:      #efe4cf;
  --surface:    #fffdf8;
  --ink:        #1c1815;
  --ink-soft:   #5a5043;
  --amber:      #d2674a;   /* logo terracotta — primary accent (was gold #df8e12) */
  --amber-soft: #e3825f;   /* lighter terracotta for hovers/gradients */
  --ember:      #c0431f;   /* deeper terracotta for labels/eyebrows */
  --mute:       #8a7f6b;
  --line:       rgba(28,24,21,0.12);
  --line-2:     rgba(28,24,21,0.18);

  /* Display = Archivo, a heavy grotesque (kept under the --serif var name). */
  --serif: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --sans:  'Helvetica Neue', Helvetica, Arial, sans-serif;
  /* Labels use the sans at heavy weight + tracking — no monospace. */
  --mono:  'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  background: #ffffff; color: var(--ink);
  font-family: var(--sans); font-weight: 400; -webkit-font-smoothing: antialiased;
  line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column;
}

/* Labels formerly set in mono now read as strong, wide-tracked sans caps. */
.eyebrow, .brand .by, .btn, .stat .slabel, .welcome-greet,
.formfield label, .ob .step, .foot, .nav, .demo-hint, .back-home { font-weight: 600; }
.eyebrow, .stat .slabel, .welcome-greet { font-weight: 700; }

a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* auth: error message + hide page until the auth guard resolves */
.auth-err { color: var(--ember); font-size: 13px; font-weight: 500; margin: 14px 0 4px; display: none; }
.back-home + .back-home { margin-top: 10px; }
html.auth-pending body { visibility: hidden; }

.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember); }

/* shared node-field texture layer — white base, just a faint dot grid + the moving dots */
.field {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.field::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(28,24,21,0.16) 1px, transparent 1.6px);
  background-size: 24px 24px; opacity: .22;
}
.node {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 3px rgba(210,103,74,0.18);
  will-change: transform; animation: drift-a 17s ease-in-out infinite;
}
.node.big { width: 9px; height: 9px; box-shadow: 0 0 0 4px rgba(210,103,74,0.22); }
.node.em { background: var(--ember); box-shadow: 0 0 0 3px rgba(210,84,42,0.2); }
.node.ink { background: var(--ink); box-shadow: none; }

/* Each colored dot drifts slowly on its own path, desynced by nth-child. */
.node:nth-child(5n+1) { animation-name: drift-a; animation-duration: 17s; animation-delay: -2s; }
.node:nth-child(5n+2) { animation-name: drift-b; animation-duration: 21s; animation-delay: -7s; }
.node:nth-child(5n+3) { animation-name: drift-c; animation-duration: 14s; animation-delay: -4s; }
.node:nth-child(5n+4) { animation-name: drift-d; animation-duration: 24s; animation-delay: -11s; }
.node:nth-child(5n+5) { animation-name: drift-e; animation-duration: 19s; animation-delay: -1s; }
@keyframes drift-a { 0%{transform:translate(0,0)} 25%{transform:translate(34px,22px)} 50%{transform:translate(12px,50px)} 75%{transform:translate(-28px,20px)} 100%{transform:translate(0,0)} }
@keyframes drift-b { 0%{transform:translate(0,0)} 33%{transform:translate(-40px,26px)} 66%{transform:translate(24px,-30px)} 100%{transform:translate(0,0)} }
@keyframes drift-c { 0%{transform:translate(0,0)} 50%{transform:translate(46px,-34px)} 100%{transform:translate(0,0)} }
@keyframes drift-d { 0%{transform:translate(0,0)} 25%{transform:translate(-30px,-22px)} 50%{transform:translate(20px,18px)} 75%{transform:translate(36px,-16px)} 100%{transform:translate(0,0)} }
@keyframes drift-e { 0%{transform:translate(0,0)} 40%{transform:translate(28px,34px)} 70%{transform:translate(-34px,-12px)} 100%{transform:translate(0,0)} }
@media (prefers-reduced-motion: reduce) { .node { animation: none; } }

/* buttons */
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 12px 22px; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex;
  align-items: center; gap: 9px; transition: .15s; text-decoration: none;
}
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn.amber { background: var(--amber); border-color: var(--amber); color: #fff; }
.btn.amber:hover { background: var(--amber-soft); }
.btn.ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.ink:hover { background: #000; }
.btn.lg { padding: 15px 28px; font-size: 12.5px; }

/* brand mark + wordmark */
.brand { display: flex; align-items: center; gap: 12px; }
.brand .name { font-family: var(--serif); font-size: 25px; letter-spacing: 0.01em; line-height: 1; }
.brand .by { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ember); margin-top: 3px; }
.brand-logo { height: 34px; width: auto; display: block; }
.card-head .brand-logo { height: 38px; }
.admin-tag { font-weight: 700; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ember); border: 1px solid rgba(210,84,42,0.4); border-radius: 100px; padding: 3px 9px; }

/* top nav (landing) */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 14px clamp(18px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* ---------------- HERO / landing ---------------- */
.hero { position: relative; overflow: hidden; flex: 1; }
.hero .wrap {
  position: relative; z-index: 2; max-width: 1080px; margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) clamp(20px, 5vw, 56px) clamp(40px, 6vw, 72px);
}
.hero h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(52px, 10vw, 116px);
  line-height: 0.82; letter-spacing: -0.01em; margin: 0 0 22px;
}
.hero h1 em { font-style: italic; color: var(--amber); }
.hero .lead { font-size: clamp(15px, 1.7vw, 19px); max-width: none; color: var(--ink-soft); }
.hero .lead b { color: var(--ink); font-weight: 500; }
.hero .cta { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .cta .note { font-family: var(--mono); font-size: 11px; color: var(--mute); }

/* proof strip */
.proof {
  position: relative; z-index: 2; max-width: 1080px; margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px) clamp(56px, 8vw, 96px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px;
}
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 22px 20px; position: relative; overflow: hidden;
}
.stat .slabel { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); display: flex; align-items: center; gap: 8px; }
.stat .slabel::before { content: ""; width: 14px; height: 2px; background: var(--ember); }
.stat .big { font-family: var(--serif); font-size: 30px; line-height: 1.05; margin-top: 14px; }
.stat .desc { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

.foot {
  border-top: 1px solid var(--line);
  padding: 22px clamp(18px, 5vw, 56px); font-family: var(--mono);
  font-size: 11px; color: var(--mute); letter-spacing: 0.04em;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ---------------- centered card (login / welcome) ---------------- */
.center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; position: relative; overflow: hidden; }
.card {
  position: relative; z-index: 2; width: 100%; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 30px 70px rgba(28,24,21,0.10);
}
.card.sm { max-width: 420px; }
.card.md { max-width: 720px; }

.card-head { position: relative; overflow: hidden; padding: 30px 34px 24px; border-bottom: 1px solid var(--line); background: var(--sand); border-radius: 20px 20px 0 0; }
.card-head .field::before { opacity: .26; }
.card-head .brand { position: relative; z-index: 2; }
.card-head h1 { position: relative; z-index: 2; font-family: var(--serif); font-weight: 400; font-size: 34px; margin-top: 16px; line-height: 1.02; }
.card-head h1 em { font-style: italic; color: var(--ember); }
.card-head .sub { position: relative; z-index: 2; font-size: 14px; color: var(--ink-soft); margin-top: 6px; }

.card-body { padding: 28px 34px 30px; }

/* form fields */
.formfield { margin-bottom: 16px; }
.formfield label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); margin-bottom: 6px; }
.formfield input {
  width: 100%; font-family: var(--sans); font-size: 15px; font-weight: 300; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 13px 14px; outline: none; transition: .16s;
}
.formfield input:focus { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(210,103,74,0.12); background: var(--surface); }
.formfield input::placeholder { color: var(--mute); }

.form-actions { margin-top: 22px; }
.form-actions .btn { width: 100%; justify-content: center; }
.demo-hint { font-family: var(--mono); font-size: 11px; color: var(--mute); text-align: center; margin-top: 16px; letter-spacing: 0.02em; }
.back-home { display: block; text-align: center; margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; }

/* ---------------- command center (post-login home) ---------------- */
.home { flex: 1; position: relative; overflow: hidden; }
.home-acct { font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.home-wrap {
  position: relative; z-index: 2; max-width: 1120px; margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 56px) 84px;
}
.briefing { margin-bottom: 34px; }
.briefing h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 7vw, 78px);
  line-height: 0.88; letter-spacing: -0.01em; margin: 10px 0 14px;
}
.briefing h1 em { font-style: italic; color: var(--amber); }
.briefing .lead { font-size: clamp(15px, 1.7vw, 19px); color: var(--ink-soft); max-width: none; }
.briefing .lead b { color: var(--ink); font-weight: 600; }

.metrics { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 44px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px; }
.metric .num { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1; color: var(--ink); }
.metric.hero .num { font-size: 60px; color: var(--amber); }
.metric .mlabel { font-weight: 600; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); margin-top: 10px; }

.intent-head { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 16px; }
.intent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.intent-tile {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px; text-decoration: none; color: var(--ink); transition: .16s;
}
.intent-tile:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(28,24,21,0.08); text-decoration: none; }
.intent-tile .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--sand2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ember); }
.intent-tile h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.05; margin: 16px 0 6px; }
.intent-tile p { font-size: 13px; color: var(--ink-soft); flex: 1; }
.intent-tile .go { font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ember); margin-top: 16px; }

/* needs-attention nudge */
.attention {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px;
  background: rgba(210,84,42,0.08); border: 1px solid rgba(210,84,42,0.3);
  text-decoration: none; color: var(--ink); margin: 22px 0 4px; transition: .13s;
}
.attention:hover { background: rgba(210,84,42,0.13); text-decoration: none; }
.att-ico { width: 26px; height: 26px; border-radius: 50%; background: var(--ember); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.att-text { flex: 1; font-size: 14.5px; }
.att-text b { font-weight: 700; }
.att-go { font-weight: 700; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ember); white-space: nowrap; }

/* activity dashboard panels */
.dash { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 36px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 24px; }
.panel.tall { grid-row: 1 / span 2; }

/* 7-day sparkline */
.spark-cap { font-weight: 700; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); margin: 18px 0 8px; }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 48px; }
.spark .bar { flex: 1; min-height: 4px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--amber-soft), var(--ember)); }

/* top sources bars */
.srcbars { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.srcrow .top { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.srcrow .top b { font-weight: 700; color: var(--ember); }
.srctrack { height: 7px; border-radius: 5px; background: rgba(28,24,21,0.08); overflow: hidden; }
.srctrack > span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--ember), var(--amber-soft)); }
.panel-h { font-weight: 700; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ember); margin-bottom: 16px; }
.week-num { font-family: var(--serif); display: flex; align-items: baseline; gap: 10px; }
.week-num span { font-weight: 800; font-size: 56px; line-height: 1; color: var(--amber); letter-spacing: -0.025em; }
.week-num small { font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--ink-soft); }
.week-delta { font-weight: 600; font-size: 12.5px; color: var(--ink-soft); margin-top: 10px; }
.week-delta .up { color: var(--green); font-weight: 700; }
.week-delta .down { color: var(--ember); font-weight: 700; }
.panel-sub { font-weight: 700; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); margin: 22px 0 11px; }
.citychips { display: flex; flex-wrap: wrap; gap: 8px; }
.citychip { font-size: 12.5px; font-weight: 500; padding: 6px 12px; border-radius: 100px; background: var(--paper); border: 1px solid var(--line); }
.citychip b { color: var(--ember); font-weight: 700; margin-left: 6px; }

.pulls { list-style: none; }
.pulls li a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 12px; border-radius: 10px; text-decoration: none; color: var(--ink);
  border: 1px solid transparent; transition: .13s;
}
.pulls li a:hover { background: var(--paper); border-color: var(--line); text-decoration: none; }
.pull-main { display: flex; flex-direction: column; min-width: 0; }
.pull-label { font-weight: 600; font-size: 14px; }
.pull-meta { font-size: 11.5px; color: var(--mute); margin-top: 2px; }
.pull-go { font-weight: 700; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ember); white-space: nowrap; }
.req-status {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 100px; white-space: nowrap; border: 1px solid var(--line-2);
}
.req-pending { color: var(--ember); background: rgba(210,84,42,0.08); border-color: rgba(210,84,42,0.25); }
.req-sent { color: var(--ink-soft); background: rgba(210,103,74,0.12); border-color: rgba(210,103,74,0.3); }
.pulls-empty { font-size: 13px; color: var(--ink-soft); padding: 8px 2px; }
@media (max-width: 720px) { .dash { grid-template-columns: 1fr; } }

@media (max-width: 860px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric.hero { grid-column: span 2; }
  .intent-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .metrics, .intent-grid { grid-template-columns: 1fr; }
  .metric.hero { grid-column: span 1; }
}

/* welcome onboarding */
.welcome-greet { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ember); }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0 6px; }
.ob {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px 18px;
  position: relative; overflow: hidden;
}
.ob .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--sand2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ember); margin-bottom: 14px; }
.ob h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.05; }
.ob p { font-size: 13px; color: var(--ink-soft); margin-top: 7px; }
.ob .step { position: absolute; top: 14px; right: 16px; font-family: var(--mono); font-size: 10px; color: var(--mute); }

@media (max-width: 640px) {
  .cards3 { grid-template-columns: 1fr; }
  .hero .lead { font-size: 15px; }
}

/* ---- Display weight (Archivo) — heavy & tight, not soft ---- */
.brand .name { font-weight: 700; letter-spacing: -0.01em; }
.hero h1, .briefing h1, .card-head h1 { font-weight: 800; letter-spacing: -0.025em; }
.hero h1 em, .briefing h1 em, .card-head h1 em { font-style: normal; } /* italics read soft in a grotesque */
.stat .big, .metric .num, .intent-head, .intent-tile h3, .ob h3 { font-weight: 700; letter-spacing: -0.01em; }
.metric.hero .num { font-weight: 800; }
