/* =========================================
   Ecos — clinical & calm 2026 healthcare design
   Single shared stylesheet for all pages
   ========================================= */

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

/* ---------- Tokens ---------- */
:root {
  /* Color: deep clinical teal anchored on warm off-white */
  --teal-950: #0a2a2a;
  --teal-900: #0e3a38;
  --teal-700: #1f5957;
  --teal-600: #2a7775;
  --teal-500: #3a9290;
  --teal-100: #d4e6e3;
  --teal-50:  #ecf4f2;

  --sage-200: #cfe0d6;
  --sage-50:  #f0f5f1;

  --cream:    #fbf8f1;
  --bg:       #f7f9f8;
  --surface:  #ffffff;

  --ink:      #112624;
  --ink-2:    #2c3f3c;
  --muted:    #647772;
  --muted-2:  #8a9893;
  --border:   #e2eae7;
  --border-2: #d2ddd9;

  --accent:   #e8b475;   /* warm sand for emphasis */

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* Layout */
  --max-w: 1180px;
  --measure: 68ch;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(14, 58, 56, 0.05), 0 2px 8px rgba(14, 58, 56, 0.04);
  --shadow-md: 0 4px 14px rgba(14, 58, 56, 0.07), 0 16px 40px -12px rgba(14, 58, 56, 0.10);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-700); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--teal-900); }
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--teal-950);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1.1em; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: 820px;
}
section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal-600);
  margin-bottom: 1rem;
  display: inline-block;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: var(--measure);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 248, 0.85);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--teal-950);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px; height: 32px;
  display: inline-block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--teal-50); color: var(--teal-900); }
.nav-links a.is-active { color: var(--teal-900); background: var(--teal-50); }
.nav-cta {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink-2);
}
@media (max-width: 820px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px 16px 18px; gap: 4px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--teal-900);
  color: #f6fbf9;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, var(--shadow-sm);
}
.btn-primary:hover { background: var(--teal-700); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--teal-900);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-900); }
.btn-link {
  background: transparent;
  color: var(--teal-900);
  padding: 8px 0;
  border-radius: 0;
}
.btn-link:hover { color: var(--teal-700); }
.btn-link::after {
  content: '→';
  margin-left: 6px;
  transition: transform .15s ease;
}
.btn-link:hover::after { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(58, 146, 144, 0.12), transparent 70%),
    radial-gradient(45% 40% at 10% 30%, rgba(232, 180, 117, 0.10), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero { padding: 56px 0 40px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
}
.hero-copy h1 em,
.hero-copy h1 i {
  font-style: normal;
  color: var(--teal-700);
}
.hero-copy p {
  font-size: 1.15rem;
  color: var(--ink-2);
  line-height: 1.6;
}
.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 22px;
}
.hero-meta::before {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(58, 146, 144, 0.18);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-visual {
  position: relative;
  aspect-ratio: 5/4;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--teal-50) 0%, var(--sage-50) 60%, var(--cream) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Three-problems strip ---------- */
.problems {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.problems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 820px) {
  .problems-grid { grid-template-columns: 1fr; gap: 24px; }
}
.problem {
  padding: 8px 4px;
  border-left: 3px solid var(--teal-500);
  padding-left: 20px;
}
.problem h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal-900);
  margin-bottom: 6px;
}
.problem p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* ---------- Section utilities ---------- */
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Two-up CTA cards (home invitations) ---------- */
.invites {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 820px) { .invites { grid-template-columns: 1fr; } }

.invite-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.invite-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-100);
}
.invite-card .eyebrow { color: var(--teal-600); }
.invite-card h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--teal-950);
  margin-bottom: 10px;
}
.invite-card p { color: var(--muted); }

/* ---------- Founder / about ---------- */
.about {
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 820px) {
  .about-inner { grid-template-columns: 1fr; gap: 32px; }
}
.about-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink-2);
}

/* ---------- Feature sections (How it works) ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}
.feature:first-of-type { border-top: 0; padding-top: 16px; }
.feature-num {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  color: var(--teal-500);
  line-height: 1;
  font-weight: 500;
}
.feature-head h2 {
  font-size: 1.7rem;
  margin-top: 8px;
  margin-bottom: 14px;
}
.feature-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--teal-50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-700);
  margin-bottom: 18px;
}
.feature-icon svg { width: 28px; height: 28px; }
.feature-body p { color: var(--ink-2); }
.feature-body p:first-child { font-size: 1.08rem; color: var(--ink); }
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; gap: 18px; padding: 36px 0; }
  .feature-num { font-size: 2.4rem; }
}

/* ---------- Partners page list ---------- */
.partner-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 36px;
  margin-bottom: 22px;
}
.partner-block h2 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}
.partner-block p { color: var(--ink-2); }
.partner-block p:last-child { margin-bottom: 0; }
.partner-block--accent {
  background: linear-gradient(160deg, var(--teal-50), var(--sage-50));
  border-color: var(--teal-100);
}

/* ---------- Contact form ---------- */
.contact {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-top: 1px solid var(--border);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 820px) {
  .contact-inner { grid-template-columns: 1fr; gap: 32px; }
}
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
}
.field .req { color: var(--teal-700); margin-left: 2px; }
.field .hint { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.field input,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
  width: 100%;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(58, 146, 144, 0.16);
}
.field textarea { min-height: 120px; resize: vertical; }
.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}
.form-msg {
  font-size: 0.92rem;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  display: none;
}
.form-msg.is-success {
  display: block;
  background: var(--sage-50);
  border: 1px solid var(--teal-100);
  color: var(--teal-900);
}
.form-msg.is-error {
  display: block;
  background: #fcefe7;
  border: 1px solid #f0c7a8;
  color: #8a4216;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-950);
  color: #c5d6d2;
  padding: 56px 0 32px;
  margin-top: 0;
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 720px) {
  .site-footer .container { grid-template-columns: 1fr; gap: 28px; }
}
.site-footer .brand { color: #f1f7f5; }
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #8eaba6;
  margin-bottom: 12px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #c5d6d2; }
.site-footer a:hover { color: #f1f7f5; }
.footer-base {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 40px;
  padding-top: 22px;
  font-size: 0.85rem;
  color: #7a9591;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding: 80px 0 48px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(50% 60% at 70% 0%, rgba(58, 146, 144, 0.10), transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; }
.page-hero h1 { max-width: 14ch; }
.page-hero p { max-width: var(--measure); color: var(--ink-2); font-size: 1.15rem; }

/* ---------- Closing CTA strip ---------- */
.closing {
  background: var(--teal-900);
  color: #e8f1ee;
  padding: 64px 0;
  text-align: center;
}
.closing h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  max-width: 26ch;
  margin: 0 auto 14px;
}
.closing p {
  color: #b9d0cb;
  max-width: 50ch;
  margin: 0 auto 24px;
}
.closing .btn-primary {
  background: var(--accent);
  color: var(--teal-950);
}
.closing .btn-primary:hover { background: #efc491; color: var(--teal-950); }

/* ---------- Helpers ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
