/* co.css
   Base template for /co-evolution/
   - Palette continuity with twopartplan.com
   - Typography, spacing, utilities, accessibility, and global animations
*/

/* Theme Variables */
:root{
  --primary: #4D8FAC;
  --secondary: #2C3E50;
  --neutral: #BDC3C7;
  --background: #f8f9fa;
  --text: #333333;
  --muted: #6b6f73;
  --glass: rgba(255,255,255,0.6);
  --accent-rgb: 77,143,172;
  --ease-fast: 180ms;
  --ease-medium: 300ms;
  --ease-slow: 800ms;
  --radius-sm: 6px;
  --radius-md: 12px;
  --shadow-soft: 0 8px 20px rgba(0,0,0,0.08);
  --shadow-subtle: 0 4px 12px rgba(0,0,0,0.06);
}

/* Reset and Base */
* { box-sizing: border-box; }
html,body { height: 100%; }
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links and Headings */
a { color: var(--primary); text-decoration: none; transition: color var(--ease-fast) ease; }
a:hover { color: #3a6a85; }
h1,h2,h3,h4 { color: var(--secondary); margin: 0 0 0.75rem 0; font-weight: 600; }
h1 { font-size: 2.25rem; line-height: 1.05; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

/* Text */
p, ul, ol { margin: 0 0 1rem 0; color: var(--muted); }

/* Layout utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.row { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.col { flex: 1 1 0; min-width: 220px; }

/* Spacing helpers */
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; }
.p-1 { padding: 0.75rem; } .p-2 { padding: 1.5rem; }

/* Buttons and Signals */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform var(--ease-fast) ease, background var(--ease-medium) ease, box-shadow var(--ease-medium) ease;
  box-shadow: var(--shadow-subtle);
}
.button:focus { outline: 2px solid rgba(var(--accent-rgb),0.18); outline-offset: 2px; }
.button:hover { transform: translateY(-3px); background: linear-gradient(135deg,var(--primary),#00cec9); }

/* Capsule signal */
.signal {
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: transform var(--ease-fast) ease, background var(--ease-fast) ease;
}
.signal:hover { transform: translateY(-2px); background: #00cec9; }

/* Cards and Surfaces */
.surface {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0,0,0,0.04);
  padding: 1.25rem;
  transition: transform var(--ease-medium) ease, box-shadow var(--ease-medium) ease, background var(--ease-medium) ease;
}
.surface--lift:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,0.08); }

/* Framed section */
.section {
  background: #fff;
  border: 3px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Global Animations */
.fade-in { opacity: 0; transform: translateY(8px); transition: opacity var(--ease-slow) ease, transform var(--ease-medium) ease; }
.in-view.fade-in { opacity: 1; transform: translateY(0); }

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

/* Ripple utility for JS-driven ripple */
.ripple { position: relative; overflow: hidden; }
.ripple::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  opacity: 0.6;
  background: rgba(255,255,255,0.25);
  transition: transform 0.6s ease, opacity 0.6s ease;
}

/* Accessibility helpers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Small responsive tweaks */
@media (max-width: 820px) {
  h1 { font-size: 1.6rem; }
  .container { padding: 0 1rem; }
}
