/* Tenavida — shared styles */
:root {
  --sage-50: #f4f8f4;
  --sage-100: #e6efe7;
  --sage-200: #cfdfd2;
  --sage-300: #b3ccbb;
  --sage-500: #6f8f68;
  --moss: #55764a;
  --moss-dark: #3e5a35;
  --ink: #2f371a;
  --ink-soft: #545c45;
  --paper: #fbfcf9;
  --line: rgba(47, 55, 26, 0.12);
  --shadow: 0 1px 2px rgba(47, 55, 26, 0.06), 0 8px 24px rgba(47, 55, 26, 0.06);
  --shadow-hover: 0 2px 4px rgba(47, 55, 26, 0.08), 0 14px 32px rgba(47, 55, 26, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1140px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--moss-dark); }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--moss);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; }

.wrap { width: min(var(--wrap), calc(100% - 40px)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Crisis bar ---------- */
.crisis-bar {
  background: var(--ink);
  color: var(--sage-100);
  font-size: 0.9rem;
  text-align: center;
  padding: 8px 16px;
}
.crisis-bar a { color: #fff; font-weight: 700; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 252, 249, 0.92);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 24px;
}
.logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--sage-300), var(--moss));
  box-shadow: inset -6px -4px 0 rgba(47, 55, 26, 0.18);
}
.main-nav ul {
  list-style: none; padding: 0;
  display: flex; align-items: center; gap: 4px;
}
.main-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--sage-100); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--sage-200); color: var(--ink); }
.main-nav .nav-cta a { background: var(--moss); color: #fff; }
.main-nav .nav-cta a:hover, .main-nav .nav-cta a[aria-current="page"] { background: var(--moss-dark); color: #fff; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 44px; height: 44px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(47, 55, 26, 0.08);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul {
    flex-direction: column; align-items: stretch; gap: 2px;
    width: min(var(--wrap), calc(100% - 40px)); margin: 0 auto; padding: 12px 0 18px;
  }
  .main-nav a { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 1.05rem; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at 85% 10%, rgba(255, 241, 191, 0.45), transparent 45%),
    linear-gradient(160deg, var(--sage-100) 0%, var(--sage-200) 60%, var(--sage-300) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
  padding: 72px 0 80px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--moss-dark);
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--moss-dark); }
.hero p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art {
  aspect-ratio: 4 / 3.4;
  border-radius: 28px;
  background:
    linear-gradient(to top, rgba(85, 118, 74, 0.35), rgba(238, 244, 238, 0)),
    url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1100&q=75") center / cover;
  filter: saturate(0.7);
  box-shadow: var(--shadow-hover);
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0 56px; gap: 32px; }
  .hero-art { aspect-ratio: 16 / 9; border-radius: 20px; }
}

/* Page header (interior pages) */
.page-header {
  background: linear-gradient(160deg, var(--sage-100), var(--sage-200));
  border-bottom: 1px solid var(--line);
  padding: 48px 0 44px;
}
.page-header h1 { margin-bottom: 12px; }
.page-header p { color: var(--ink-soft); max-width: 42em; font-size: 1.1rem; }
.breadcrumb { font-size: 0.9rem; margin-bottom: 14px; color: var(--ink-soft); }
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: 0.5; }
.breadcrumb a { color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 0.975rem;
  text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--moss); color: #fff; }
.btn-primary:hover { background: var(--moss-dark); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, 0.6); color: var(--ink); border-color: rgba(47, 55, 26, 0.2); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--sage-50); border-block: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 36px; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--ink-soft); }

/* ---------- Category cards ---------- */
.category-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.category-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: rgba(85, 118, 74, 0.35); color: var(--ink); }
.category-card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--sage-100); color: var(--moss-dark);
  margin-bottom: 6px;
}
.category-card .icon svg { width: 22px; height: 22px; }
.category-card h3 { font-size: 1.2rem; }
.category-card p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
.category-card .more { font-weight: 700; font-size: 0.9rem; color: var(--moss-dark); }

/* ---------- Resource cards ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.search {
  flex: 1 1 280px; max-width: 420px;
  padding: 12px 16px 12px 42px;
  border: 1px solid rgba(47, 55, 26, 0.2); border-radius: 999px;
  font: inherit; color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23545c45' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center;
}
.search:focus { outline: 3px solid rgba(85, 118, 74, 0.35); border-color: var(--moss); }
.result-count { color: var(--ink-soft); font-size: 0.9rem; }

.resource-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.resource-card {
  display: flex; flex-direction: column;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.resource-card[hidden] { display: none; }
.tag {
  align-self: flex-start;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--moss-dark); background: var(--sage-100);
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 14px;
}
.resource-card h3 { margin-bottom: 8px; }
.resource-card p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; margin-bottom: 20px; }
.resource-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-state { display: none; padding: 32px; text-align: center; color: var(--ink-soft); border: 1px dashed rgba(47,55,26,0.25); border-radius: var(--radius); }
.empty-state.is-visible { display: block; }

/* ---------- Topics ---------- */
.jump-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.jump-nav a {
  padding: 8px 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.925rem;
}
.jump-nav a:hover { background: var(--sage-100); }
.topic-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.topic-card {
  padding: 26px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.topic-card h2 { font-size: 1.4rem; margin-bottom: 6px; }
.topic-card > p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 16px; }
.link-list { list-style: none; padding: 0; display: grid; gap: 2px; }
.link-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; margin-inline: -12px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.975rem;
}
.link-list a:hover { background: var(--sage-50); }
.link-list a::after { content: "→"; color: var(--moss); flex: none; }
.link-list a[target="_blank"]::after { content: "↗"; }

/* ---------- Prose / about ---------- */
.prose { max-width: 42em; }
.prose p { margin-bottom: 1.1em; color: var(--ink-soft); }
.prose h2 { margin: 1.6em 0 0.5em; }
.value-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 40px; }
.value { padding: 24px; border-radius: var(--radius); background: var(--sage-50); border: 1px solid var(--line); }
.value h3 { margin-bottom: 6px; }
.value p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Callout ---------- */
.callout {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  padding: 32px; border-radius: 20px;
  background: linear-gradient(135deg, var(--moss), var(--moss-dark));
  color: #fff;
}
.callout h2 { font-size: 1.6rem; margin-bottom: 6px; }
.callout p { color: rgba(255, 255, 255, 0.85); }
.callout .btn-ghost { background: #fff; border-color: #fff; }
@media (max-width: 700px) { .callout { grid-template-columns: 1fr; } }

.notice {
  padding: 18px 20px; border-radius: var(--radius-sm);
  background: #fff7e6; border: 1px solid #f0dcae; color: #5b4a1e;
  font-size: 0.95rem; margin-bottom: 28px;
}
.notice a { color: #5b4a1e; font-weight: 700; }

/* ---------- Form ---------- */
.contact-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
.form-card { padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 700; font-size: 0.95rem; }
.field input, .field textarea, .field select {
  font: inherit; color: var(--ink);
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid rgba(47, 55, 26, 0.22); background: var(--paper);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid rgba(85, 118, 74, 0.3); border-color: var(--moss); }
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--sage-200); padding: 56px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer .logo { color: #fff; margin-bottom: 10px; }
.site-footer p { font-size: 0.95rem; color: var(--sage-200); }
.site-footer h2 { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: 14px; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--sage-100); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.85rem; color: var(--sage-300); }
