/* ═══════════════════════════════════════════════════
   MYVISIBLEMIND — SHARED DESIGN SYSTEM
   Used across all pages for consistency
═══════════════════════════════════════════════════ */

:root {
  --navy:        #0D2B4E;
  --teal:        #1A7B8C;
  --teal-light:  #2A9BAD;
  --gold:        #B8912A;
  --gold-light:  #D4A83A;
  --white:       #FFFFFF;
  --offwhite:    #F7F9FB;
  --light:       #EEF4F7;
  --text:        #1A2B3C;
  --muted:       #5A7080;
  --border:      #D0DDE6;
  --success:     #1E8449;
  --danger:      #C0392B;
  --radius:      14px;
  --radius-sm:   8px;
  --radius-xs:   6px;
  --shadow:      0 4px 24px rgba(13,43,78,0.10);
  --shadow-lg:   0 12px 48px rgba(13,43,78,0.16);
  --font-display:'Georgia','Times New Roman',serif;
  --font-body:   'Segoe UI',system-ui,-apple-system,sans-serif;
  --nav-height:  68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--offwhite);
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
input, textarea, select { font-family: inherit; }

/* ── NAVIGATION ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-height);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 32px; gap: 20px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; flex-shrink: 0;
}
.nav-logo-mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 700; font-size: 14px;
}
.nav-wordmark {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 700; color: var(--navy);
}
.nav-wordmark span { color: var(--teal); }
.nav-links {
  display: flex; align-items: center; gap: 6px;
  list-style: none; margin-left: auto;
}
.nav-links a, .nav-links button {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 7px 12px; border-radius: var(--radius-sm);
  transition: all 0.2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links button:hover {
  color: var(--navy); background: var(--light);
}
.nav-links a.active { color: var(--teal); font-weight: 600; }
.nav-cta {
  background: var(--teal) !important;
  color: var(--white) !important;
  border-radius: 50px !important;
  padding: 8px 18px !important;
}
.nav-cta:hover { background: var(--navy) !important; }
.nav-user {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--navy);
  padding: 6px 12px; border-radius: 50px;
  border: 1px solid var(--border); cursor: pointer;
  transition: all 0.2s;
}
.nav-user:hover { border-color: var(--teal); }
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--white);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 50px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; border: none; white-space: nowrap;
  font-family: var(--font-body);
}
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--navy); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,123,140,0.35); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: #0A1F38; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: #9A7820; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.4); }
.btn-outline-white:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn-ghost { background: var(--light); color: var(--navy); }
.btn-ghost:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-full { width: 100%; }

/* ── CARDS ── */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.card-hover { transition: box-shadow 0.2s, transform 0.2s; }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--navy); margin-bottom: 7px;
}
.form-input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; color: var(--text); outline: none;
  transition: border-color 0.2s; background: var(--white);
  font-family: var(--font-body);
}
.form-input:focus { border-color: var(--teal); }
.form-input::placeholder { color: #9DB0BF; }
.form-textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; color: var(--text); outline: none;
  transition: border-color 0.2s; resize: vertical;
  min-height: 120px; line-height: 1.6;
  font-family: var(--font-body);
}
.form-textarea:focus { border-color: var(--teal); }
.form-select {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; color: var(--text); outline: none;
  transition: border-color 0.2s; background: var(--white);
  appearance: none; cursor: pointer;
  font-family: var(--font-body);
}
.form-select:focus { border-color: var(--teal); }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 50px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}
.badge-teal { background: rgba(26,123,140,0.12); color: var(--teal); }
.badge-gold { background: rgba(184,145,42,0.12); color: var(--gold); }
.badge-navy { background: rgba(13,43,78,0.08); color: var(--navy); }
.badge-green { background: rgba(30,132,73,0.12); color: var(--success); }
.badge-red { background: rgba(192,57,43,0.12); color: var(--danger); }
.badge-online { background: rgba(30,132,73,0.15); color: var(--success); }
.badge-online::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; }

/* ── SECTION HEADERS ── */
.section-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
  color: var(--teal); text-transform: uppercase; margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700; line-height: 1.2;
  color: var(--navy); margin-bottom: 14px;
}
.section-sub {
  font-size: 17px; color: var(--muted);
  line-height: 1.75; max-width: 600px;
}

/* ── PAGE WRAPPER ── */
.page-wrap {
  padding-top: var(--nav-height);
  min-height: 100vh;
}
.page-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 48px 24px;
}
.page-inner-sm {
  max-width: 680px; margin: 0 auto;
  padding: 48px 24px;
}

/* ── TOOL PAGE LAYOUT ── */
.tool-page {
  padding-top: var(--nav-height);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.tool-header {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 24px 32px;
  display: flex; align-items: center; gap: 16px;
}
.tool-header-icon { font-size: 32px; }
.tool-header h1 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700; color: var(--navy);
}
.tool-header p { font-size: 14px; color: var(--muted); margin-top: 3px; }
.tool-body { flex: 1; padding: 32px; max-width: 860px; margin: 0 auto; width: 100%; }

/* ── AI RESPONSE BOX ── */
.ai-response {
  background: linear-gradient(135deg, rgba(13,43,78,0.03), rgba(26,123,140,0.06));
  border: 1px solid rgba(26,123,140,0.2);
  border-radius: var(--radius-sm); padding: 20px 22px;
  margin-top: 16px; display: none;
}
.ai-response.show { display: block; }
.ai-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--teal); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.ai-text { font-size: 15px; line-height: 1.75; color: var(--text); }

/* ── THINKING DOTS ── */
.thinking-dots { display: inline-flex; gap: 5px; align-items: center; }
.thinking-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal); display: inline-block;
  animation: tdBounce 1.2s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes tdBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
}

/* ── MIRA CHAT WIDGET ── */
#miraBubble {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 8px 32px rgba(13,43,78,0.3);
  transition: transform 0.2s;
}
#miraBubble:hover { transform: scale(1.08); }
#miraBubble .bubble-icon { font-size: 24px; }
#miraBubble .bubble-label {
  position: absolute; top: -10px; right: -6px;
  background: var(--gold); color: var(--white);
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 50px;
}
#miraChat {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  width: 370px; height: 530px;
  background: var(--white); border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: none; flex-direction: column; overflow: hidden;
}
.mira-header {
  background: linear-gradient(135deg, var(--navy), var(--teal));
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
}
.mira-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--white); flex-shrink: 0;
}
.mira-header-info { flex: 1; }
.mira-header-name { font-size: 15px; font-weight: 700; color: var(--white); }
.mira-header-sub { font-size: 11px; color: rgba(255,255,255,0.65); }
.mira-close { color: rgba(255,255,255,0.6); font-size: 20px; cursor: pointer; padding: 4px; }
.mira-crisis {
  background: rgba(192,57,43,0.08); border-bottom: 1px solid rgba(192,57,43,0.15);
  padding: 6px 16px; font-size: 11px; color: var(--danger);
  font-weight: 600; text-align: center;
}
.mira-crisis a { color: var(--danger); font-weight: 700; }
.mira-messages {
  flex: 1; overflow-y: auto; padding: 14px;
  background: var(--offwhite);
  -webkit-overflow-scrolling: touch;
}
.mira-msg-row { display: flex; margin-bottom: 12px; }
.mira-msg-row.user { justify-content: flex-end; }
.mira-msg-bubble {
  max-width: 85%; padding: 11px 14px;
  border-radius: 14px; font-size: 14px; line-height: 1.6;
}
.mira-msg-row.mira .mira-msg-bubble {
  background: var(--white); border: 1px solid var(--border);
  border-top-left-radius: 3px; color: var(--text);
  display: flex; gap: 8px; align-items: flex-start;
  max-width: 92%;
}
.mira-msg-row.user .mira-msg-bubble {
  background: var(--teal); color: var(--white);
  border-top-right-radius: 3px;
}
.mira-msg-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--white); flex-shrink: 0;
}
.mira-msg-text { flex: 1; }
.mira-prompts {
  padding: 8px 12px; border-top: 1px solid var(--border);
  display: flex; gap: 6px; flex-wrap: wrap; background: var(--white);
}
.mira-prompt-btn {
  padding: 5px 11px; border-radius: 50px;
  border: 1px solid var(--border); font-size: 11px;
  color: var(--muted); cursor: pointer; background: var(--white);
  transition: all 0.2s; font-family: var(--font-body);
}
.mira-prompt-btn:hover { border-color: var(--teal); color: var(--teal); }
.mira-input-row {
  padding: 10px 12px; background: var(--white);
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: flex-end;
}
.mira-input {
  flex: 1; border: 1.5px solid var(--border);
  border-radius: 12px; padding: 9px 13px;
  font-size: 14px; font-family: var(--font-body);
  resize: none; outline: none; line-height: 1.5;
  max-height: 80px; min-height: 38px;
  transition: border-color 0.2s;
}
.mira-input:focus { border-color: var(--teal); }
.mira-send-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--teal); color: var(--white);
  font-size: 15px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; border: none;
  cursor: pointer; transition: background 0.2s;
}
.mira-send-btn:hover { background: var(--navy); }
.mira-privacy {
  padding: 5px 14px 8px; background: var(--white);
  font-size: 10px; color: var(--muted); text-align: center;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(13,43,78,0.65);
  display: none; align-items: center; justify-content: center;
  padding: 24px; backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white); border-radius: var(--radius);
  padding: 40px 36px; max-width: 500px; width: 100%;
  position: relative; box-shadow: var(--shadow-lg);
  animation: modalIn 0.22s ease;
  max-height: 90vh; overflow-y: auto;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  font-size: 22px; color: var(--muted); cursor: pointer;
  line-height: 1; background: none; border: none;
}
.modal-icon { font-size: 36px; margin-bottom: 12px; }
.modal-title {
  font-family: var(--font-display); font-size: 22px;
  font-weight: 700; color: var(--navy); margin-bottom: 8px;
}
.modal-sub { font-size: 14px; color: var(--muted); margin-bottom: 22px; line-height: 1.65; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: var(--white);
  padding: 12px 24px; border-radius: 50px;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); z-index: 9999;
  display: none; white-space: nowrap;
  animation: toastIn 0.3s ease;
}
.toast.show { display: block; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ── FOOTER ── */
.footer {
  background: var(--navy); color: rgba(255,255,255,0.6);
  padding: 56px 24px 28px;
}
.footer-inner { max-width: 1080px; margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-wordmark {
  font-family: var(--font-display); font-size: 20px;
  font-weight: 700; color: var(--white);
  display: block; margin-bottom: 10px;
}
.footer-wordmark span { color: var(--teal-light); }
.footer-brand p { font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.footer-col h5 {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--white); margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul a { font-size: 13px; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-col ul a:hover { color: var(--teal-light); }
.footer-bottom {
  padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 12px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,0.4); }
.footer-links a:hover { color: var(--teal-light); }

/* ── CRISIS BAR ── */
.crisis-bar {
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--danger); font-weight: 600;
}
.crisis-bar a { color: var(--danger); text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-links.mobile-open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-height); left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 16px; gap: 4px; box-shadow: var(--shadow);
  }
  .nav-mobile-btn {
    display: flex; flex-direction: column; gap: 5px;
    padding: 6px; margin-left: auto; cursor: pointer;
  }
  .nav-mobile-btn span {
    width: 22px; height: 2px; background: var(--navy);
    border-radius: 2px; display: block;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  #miraChat { width: 100vw; height: 85vh; bottom: 0; right: 0; border-radius: 18px 18px 0 0; }
  #miraBubble { bottom: 20px; right: 16px; }
  .tool-body { padding: 20px 16px; }
  .tool-header { padding: 16px 20px; }
  input, textarea, select { font-size: 16px !important; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn-lg { padding: 14px 24px; font-size: 15px; }
}
