/* ============================================================
   SALESFIT — Design System
   Calm. Elegant. Professional. Minimal. Never loud or flashy.
   Dark/light follows the device automatically — no manual toggle.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=IBM+Plex+Sans:wght@400;500;600&family=Poppins:wght@600;700;800&display=swap');

:root {
  /* Light mode (default) */
  --bg: #F1F0EB;
  --bg-elevated: #FAFAF7;
  --ink: #1B1E24;
  --ink-soft: #565A62;
  --line: rgba(27, 30, 36, 0.10);
  --brass: #A9812E;
  --brass-soft: rgba(169, 129, 46, 0.14);
  --teal: #2F5D57;
  --teal-soft: rgba(47, 93, 87, 0.12);
  --danger: #A23E3E;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-brand: 'Poppins', 'IBM Plex Sans', -apple-system, sans-serif;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(27,30,36,0.04), 0 4px 16px rgba(27,30,36,0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171C;
    --bg-elevated: #1B1F26;
    --ink: #E9E7E0;
    --ink-soft: #9A9C9F;
    --line: rgba(233, 231, 224, 0.10);
    --brass: #C9A24A;
    --brass-soft: rgba(201, 162, 74, 0.16);
    --teal: #5A968C;
    --teal-soft: rgba(90, 150, 140, 0.14);
    --danger: #D08787;
    --shadow: 0 1px 2px rgba(0,0,0,0.20), 0 8px 24px rgba(0,0,0,0.28);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button, input {
  font-family: inherit;
}

a { color: var(--brass); }

/* ---------- App shell ---------- */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.app-header .brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-header .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: block;
}

.wordmark {
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wordmark .wm-sales {
  color: #0D3839;
}

.wordmark .wm-fit {
  color: #A9812E;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 13px;
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  padding: 6px 14px;
  cursor: pointer;
}

.lang-toggle button.active {
  background: var(--brass-soft);
  color: var(--brass);
  font-weight: 600;
}

.app-main {
  flex: 1;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 24px 32px;
}

.screen { display: none; }
.screen.active { display: block; animation: fade-in 0.25s ease; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Bottom nav ---------- */

.bottom-nav {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.nav-btn {
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 10px;
  transition: color 0.15s ease;
}

.nav-btn.active { color: var(--brass); font-weight: 600; }
.nav-btn svg { width: 20px; height: 20px; }

/* ---------- Cards & primitives ---------- */

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

h1.hero {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
  margin: 8px 0 4px;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.muted { color: var(--ink-soft); }

.btn-primary {
  display: inline-block;
  background: var(--brass);
  color: #1B1E24;
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
}

/* ---------- Home screen ---------- */

.streak-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

/* ---------- Journey screen: the signature element ---------- */

.journey-path {
  position: relative;
  padding: 12px 0 12px 0;
}

.arc-heading {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 28px 0 14px;
  padding-left: 44px;
}

.arc-heading:first-child { margin-top: 4px; }

.journey-node {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  padding: 7px 0;
  cursor: pointer;
}

.journey-node::before {
  content: '';
  position: absolute;
  left: 15px;
  top: -7px;
  width: 2px;
  height: calc(100% + 14px);
  background: var(--line);
  z-index: 0;
}

.journey-node:first-child::before { top: 50%; height: calc(50% + 7px); }

.node-dot {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 2px solid var(--line);
  color: var(--ink-soft);
}

.node-dot.live { border-color: var(--brass); color: var(--brass); background: var(--brass-soft); }
.node-dot.done { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }

.node-label { flex: 1; }
.node-title { font-size: 15px; font-weight: 500; }
.node-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 1px; }
.node-status-tag {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}
.node-status-tag.live { border-color: var(--brass); color: var(--brass); }

/* ---------- Scenario / Practice interactive card ---------- */

.scenario-brief {
  font-size: 16px;
  line-height: 1.55;
  margin: 10px 0 18px;
}

.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.option-btn:hover { border-color: var(--brass); }

.coaching-panel {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.coaching-panel.trust_gain, .coaching-panel.done { border-color: var(--teal); background: var(--teal-soft); }
.coaching-panel.trust_loss, .coaching-panel.trust_violation { border-color: var(--danger); }

.confidence-line {
  margin-top: 10px;
  font-style: italic;
  font-family: var(--font-display);
  color: var(--brass);
}

/* ---------- Profile ---------- */

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.profile-row:last-child { border-bottom: none; }

/* ---------- Footer (legal, on every screen) ---------- */

.legal-footer {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 28px 24px 4px;
}

.legal-footer a {
  text-decoration: none;
  cursor: pointer;
}

/* "about.me/JoseGill" — the primary, brand-colored link */
.legal-footer .footer-link-primary {
  color: var(--brass);
  font-weight: 600;
}
.legal-footer .footer-link-primary:hover,
.legal-footer .footer-link-primary:focus-visible {
  opacity: 0.8;
}

/* "Reach Me" — a quieter, secondary link, same tone as the copyright text */
.legal-footer .footer-link-secondary {
  color: var(--ink-soft);
  font-weight: 500;
}
.legal-footer .footer-link-secondary:hover,
.legal-footer .footer-link-secondary:focus-visible {
  color: var(--ink);
}

.footer-dot {
  font-size: 16px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  color: var(--ink-soft);
}

.footer-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 6px;
  position: relative;
  top: -1px;
}

/* ---------- Responsive ---------- */

@media (max-width: 420px) {
  .app-header, .app-main { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Accessibility ---------- */

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .screen.active { animation: none; }
}

/* ---------- Auth screens ---------- */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  gap: 24px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand img { border-radius: 11px; }

.auth-card {
  width: 100%;
  max-width: 360px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 14px 0 6px;
}

.auth-card input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--brass);
}

.text-link {
  color: var(--brass);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.text-link:hover { opacity: 0.8; }

.form-error {
  background: rgba(162, 62, 62, 0.1);
  color: var(--danger);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 6px;
}

.form-success {
  background: var(--teal-soft);
  color: var(--teal);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 6px;
}
