/* ================================================
   NOT-NULL CRISIS ROUTER — Artisan/Retro Collage
   styles.css
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ---- CUSTOM PROPERTIES ---- */
:root {
  --cream:       #F4EBE1;
  --cream-light: #FAF6F0;
  --cream-mid:   #EADDCB;
  --charcoal:    #2E3D44;
  --charcoal-60: rgba(46,61,68,0.6);
  --terracotta:  #C86B55;
  --terra-light: #E89A88;
  --terra-bg:    #FADCD5;
  --sage:        #7D9D83;
  --sage-bg:     #E4ECE7;
  --ochre:       #D9A05B;
  --ochre-bg:    #FDF8F0;
  --blue:        #5D7F96;
  --blue-bg:     #EAEFF2;
  --grid-line:   #e6dbcd;
  --shadow:      3px 3px 0px var(--charcoal);
  --shadow-lg:   5px 5px 0px var(--charcoal);
  --radius:      12px;
  --radius-sm:   6px;
  --transition:  all 0.25s ease;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--cream);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--charcoal);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ---- UTILITY ---- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
}

.grid-card {
  background-color: var(--cream-light);
  background-image: radial-gradient(var(--cream-mid) 1.5px, transparent 0);
  background-size: 14px 14px;
  border: 2px solid var(--charcoal);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  transition: var(--transition);
}

.grid-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--charcoal);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.06em;
}

/* ---- NAV ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--cream-light);
  border-bottom: 2px solid var(--charcoal);
  box-shadow: 0 2px 0px var(--charcoal);
}

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

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo-dot {
  width: 10px;
  height: 10px;
  background: var(--terracotta);
  border-radius: 50%;
  border: 2px solid var(--charcoal);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.7; }
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--charcoal);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.nav-links a:hover { border-color: var(--terracotta); color: var(--terracotta); }

.nav-cta {
  background: var(--charcoal);
  color: var(--cream-light) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--charcoal) !important;
  font-weight: 600;
  transition: var(--transition);
}
.nav-cta:hover {
  background: var(--terracotta) !important;
  border-color: var(--terracotta) !important;
  color: #fff !important;
}

/* ---- HERO ---- */
.hero {
  padding: 6rem 2rem 5rem;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--terra-bg);
  border: 2px solid var(--terracotta);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  color: var(--terracotta);
  margin-bottom: 1.5rem;
}

.hero-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--terracotta);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--charcoal);
  margin-bottom: 1.4rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--terracotta);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--charcoal-60);
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid var(--charcoal);
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--charcoal);
  color: var(--cream-light);
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--charcoal);
  box-shadow: var(--shadow);
}
.btn-secondary:hover {
  background: var(--cream-mid);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

/* Hero Visual — Mockup Card */
.hero-visual {
  position: relative;
}

.mockup-card {
  background: var(--cream-light);
  border: 2px solid var(--charcoal);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mockup-header {
  background: var(--charcoal);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mockup-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
}
.mockup-dot:nth-child(1) { background: #C86B55; }
.mockup-dot:nth-child(2) { background: #D9A05B; }
.mockup-dot:nth-child(3) { background: #7D9D83; }

.mockup-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  margin-left: 0.5rem;
}

.mockup-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.chat-bubble {
  max-width: 78%;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid var(--charcoal);
  font-size: 0.78rem;
  line-height: 1.5;
}

.bubble-bot {
  background: var(--sage-bg);
  color: var(--charcoal);
  border-left: 4px solid var(--sage);
  align-self: flex-start;
}

.bubble-user {
  background: var(--terra-light);
  color: #fff;
  align-self: flex-end;
  border-right: 4px solid var(--terracotta);
}

.bubble-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  margin-bottom: 4px;
  opacity: 0.75;
}

.bubble-bot .bubble-label  { color: var(--sage); }
.bubble-user .bubble-label { color: rgba(255,255,255,0.85); }

.verified-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--sage-bg);
  border: 1.5px solid var(--sage);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  color: var(--sage);
}

.verified-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }

/* ---- STATS BAR ---- */
.stats-bar {
  border-top: 2px solid var(--charcoal);
  border-bottom: 2px solid var(--charcoal);
  background: var(--charcoal);
  padding: 1.25rem 2rem;
}

.stats-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  color: var(--cream-light);
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--terracotta);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.08em;
  color: rgba(250,246,240,0.7);
  margin-top: 4px;
}

/* ---- VECTORS SECTION ---- */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1rem;
  color: var(--charcoal-60);
  max-width: 560px;
  margin: 0 auto;
}

.vectors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.vector-card {
  padding: 2rem;
  border-radius: var(--radius);
  border: 2px solid var(--charcoal);
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.vector-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

.vector-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(46,61,68,0.07) 1.5px, transparent 0);
  background-size: 14px 14px;
  pointer-events: none;
}

.vector-shelter  { background-color: var(--sage-bg); }
.vector-food     { background-color: var(--ochre-bg); }
.vector-safety   { background-color: var(--terra-bg); }
.vector-financial{ background-color: var(--blue-bg); }

.vector-icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  display: block;
}

.vector-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.vector-card p {
  font-size: 0.88rem;
  color: var(--charcoal-60);
  line-height: 1.65;
  margin-bottom: 1.2rem;
}

.vector-tag-shelter   { background: var(--sage-bg);   color: var(--sage);   border-color: var(--sage); }
.vector-tag-food      { background: var(--ochre-bg);  color: var(--ochre);  border-color: var(--ochre); }
.vector-tag-safety    { background: var(--terra-bg);  color: var(--terracotta); border-color: var(--terracotta); }
.vector-tag-financial { background: var(--blue-bg);   color: var(--blue);   border-color: var(--blue); }

/* ---- HOW IT WORKS ---- */
.how-bg {
  background-color: var(--charcoal);
  background-image:
    linear-gradient(rgba(250,246,240,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250,246,240,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  padding: 5rem 0;
}

.how-bg .section-header h2,
.how-bg .section-header p {
  color: var(--cream-light);
}

.how-bg .section-label { color: var(--ochre); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.step-card {
  background: rgba(250,246,240,0.06);
  border: 2px solid rgba(250,246,240,0.15);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  background: rgba(250,246,240,0.1);
  border-color: var(--terracotta);
}

.step-num {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--terracotta);
  border: 2px solid var(--cream-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--cream-light);
  margin: 0 auto 1rem;
}

.step-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream-light);
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.82rem;
  color: rgba(250,246,240,0.65);
  line-height: 1.6;
}

/* ---- ARCHITECTURE ---- */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.arch-card {
  border-radius: var(--radius);
  border: 2px solid var(--charcoal);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  background: var(--cream-light);
  background-image: radial-gradient(var(--cream-mid) 1.5px, transparent 0);
  background-size: 14px 14px;
  transition: var(--transition);
}

.arch-card:hover {
  transform: translate(-2px,-2px);
  box-shadow: var(--shadow-lg);
}

.arch-layer {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.4rem;
}

.arch-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 0.6rem;
}

.arch-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.arch-card ul li {
  font-size: 0.82rem;
  color: var(--charcoal-60);
  padding-left: 1rem;
  position: relative;
}

.arch-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--terracotta);
}

/* ---- DATABASE TABLE ---- */
.db-section { background: var(--cream-mid); padding: 5rem 0; }

.db-table-wrap {
  border: 2px solid var(--charcoal);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream-light);
  font-size: 0.85rem;
}

.db-table thead {
  background: var(--charcoal);
  color: var(--cream-light);
}

.db-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.db-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--cream-mid);
  color: var(--charcoal);
}

.db-table tbody tr:hover { background: var(--cream-mid); }

.status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  border: 1.5px solid;
}

.pill-live     { background: var(--sage-bg);  color: var(--sage);       border-color: var(--sage); }
.pill-stale    { background: var(--ochre-bg); color: var(--ochre);      border-color: var(--ochre); }
.pill-empty    { background: var(--terra-bg); color: var(--terracotta); border-color: var(--terracotta); }

/* ---- FEATURES STRIP ---- */
.features-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 5rem 0;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-icon-wrap {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: var(--cream-light);
  box-shadow: 2px 2px 0px var(--charcoal);
}

.feature-item h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 0.3rem;
}

.feature-item p {
  font-size: 0.82rem;
  color: var(--charcoal-60);
  line-height: 1.6;
}

/* ---- DEMO STRIP ---- */
.demo-strip {
  padding: 5rem 0;
  background: var(--terra-bg);
  border-top: 2px solid var(--charcoal);
  border-bottom: 2px solid var(--charcoal);
}

.demo-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.demo-inner h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.demo-inner p {
  font-size: 0.95rem;
  color: var(--charcoal-60);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.demo-scenarios {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scenario-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--charcoal);
  border-radius: var(--radius-sm);
  background: var(--cream-light);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: default;
  transition: var(--transition);
}

.scenario-chip:hover {
  transform: translate(-2px,-2px);
  box-shadow: var(--shadow-lg);
}

.scenario-badge {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.badge-shelter   { background: var(--sage-bg);  color: var(--sage); }
.badge-food      { background: var(--ochre-bg); color: var(--ochre); }
.badge-safety    { background: var(--terra-bg); color: var(--terracotta); }
.badge-financial { background: var(--blue-bg);  color: var(--blue); }

.scenario-desc { color: var(--charcoal-60); font-size: 0.78rem; }

/* ---- FOOTER ---- */
footer {
  background: var(--charcoal);
  border-top: 2px solid var(--charcoal);
  color: var(--cream-light);
  padding: 3rem 0 2rem;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream-light);
  margin-bottom: 0.6rem;
}

.footer-brand p {
  font-size: 0.83rem;
  color: rgba(250,246,240,0.6);
  line-height: 1.65;
}

.footer-col h4 {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(250,246,240,0.6);
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--cream-light); }

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid rgba(250,246,240,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(250,246,240,0.4);
}

.footer-bottom-tag {
  background: var(--terracotta);
  color: var(--cream-light);
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--charcoal); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--terracotta); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .hero         { grid-template-columns: 1fr; gap: 2.5rem; }
  .vectors-grid { grid-template-columns: 1fr; }
  .steps-grid   { grid-template-columns: repeat(2, 1fr); }
  .arch-grid    { grid-template-columns: 1fr; }
  .features-strip { grid-template-columns: 1fr; }
  .demo-inner   { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom{ flex-direction: column; gap: 0.75rem; text-align: center; }
  .nav-links    { display: none; }
}

@media (max-width: 600px) {
  .steps-grid   { grid-template-columns: 1fr; }
  .stats-inner  { gap: 1.5rem; }
  .stat-num     { font-size: 1.8rem; }
}
