/* ============================================================
   Enrich Global Collective — Shared Stylesheet
   A Digital Sanctuary for the Global Majority
   Powered by ENRICH Global
   ============================================================ */

/* --- ENRICH brand palette --- */
:root {
  --teal: #3ce1e6;
  --purple: #5e17eb;
  --orange: #ff6127;
  --bg: #0a0a0f;
  --card-bg: #12121a;
  --card-bg-soft: #1a1a26;
  --text: #ffffff;
  --text-soft: #d6d6df;
  --text-muted: #a0a0a0;
  --text-dim: #64748b;

  /* Watercolor wash colors (translucent) */
  --wash-rose: rgba(255, 97, 39, 0.08);
  --wash-violet: rgba(94, 23, 235, 0.12);
  --wash-teal: rgba(60, 225, 230, 0.06);
  --wash-amber: rgba(217, 119, 6, 0.10);

  /* Pillar accents — each pillar gets its own visual identity */
  --pillar-1: #d97757;   /* terracotta — workplace, grounded earth */
  --pillar-2: #c084fc;   /* amethyst — lineage, ancestral depth */
  --pillar-3: #f59e0b;   /* saffron — parenting, warm hearth */
  --pillar-4: #14b8a6;   /* jade — somatic, body wisdom */
  --pillar-5: #ec4899;   /* rose — intimacy, relational heart */
  --pillar-6: #94a3b8;   /* slate — environmental stress, ambient weight */
  --pillar-7: #818cf8;   /* periwinkle — belonging, the seam between worlds */
  --pillar-8: #34d399;   /* emerald — relational lines, the held balance */
  --pillar-9: #facc15;   /* golden — joy, softness, the reclaimed light */
  --pillar-10: #b87333;  /* copper — money, scarcity, the steward's metal */
  --pillar-11: #8b5cf6;  /* violet — the sacred, the threshold, candlelight */
  --pillar-12: #cbd5e1;  /* pale slate — the still lake at dawn, the Witness */

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;

  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(60, 225, 230, 0.08);
}

/* --- Reset and base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Watercolor wash backdrop — gives the dark base warmth and depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, var(--wash-violet), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 25%, var(--wash-rose), transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 95%, var(--wash-teal), transparent 70%),
    radial-gradient(ellipse 40% 30% at 90% 80%, var(--wash-amber), transparent 60%);
  pointer-events: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
h4 { font-size: 1.25rem; }

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

a {
  color: var(--teal);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.8; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

/* --- Top nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}

.nav-logo {
  height: 34px;
  width: auto;
  display: block;
}

.nav-brand span {
  color: var(--teal);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-cta {
  background: var(--teal);
  color: var(--bg);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-cta:hover { opacity: 0.9; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  line-height: 1.2;
}

.btn-primary {
  background: var(--teal);
  color: var(--bg);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(60, 225, 230, 0.25);
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
  opacity: 1;
}

.btn-large {
  padding: 1.1rem 2.25rem;
  font-size: 1.05rem;
}

/* --- Cards --- */
.card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(60, 225, 230, 0.3);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.footer h4 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 0.6rem;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover { color: var(--teal); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* --- Floating safety buttons (mandatory on every member page) --- */
.float-btn {
  position: fixed;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.float-btn:hover { transform: scale(1.05); }

.float-ground {
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--card-bg);
  color: var(--teal);
  border: 1px solid var(--teal);
}

.float-crisis {
  bottom: 1.5rem;
  right: 5.5rem;
  background: var(--orange);
  color: white;
}

/* --- Modal --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal h3 {
  margin-bottom: 1rem;
  color: var(--text);
}

.modal p {
  margin-bottom: 1rem;
  color: var(--text-soft);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

/* --- Form elements --- */
.input {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--card-bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: var(--teal);
}

.label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.checkbox-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--card-bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--teal);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-row label {
  cursor: pointer;
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* --- Anti-theft protection (from enrich-app-protection) --- */
.protected {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow selection in chat / form fields */
input,
textarea,
.allow-select,
.chat-message {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}
