/* La Cocina de Eva — Centro de Políticas
   Línea gráfica: amazónico gourmet artesanal
   Paleta y tipografía tomadas de design/tokens.md */
:root {
  --primary: #C8381A;
  --primary-dark: #A52D14;
  --accent: #D4900A;
  --accent-dark: #B87808;
  --accent-soft: #F5E4C8;
  --bg: #FDF8F3;
  --bg-alt: #FFF5EB;
  --leaf: #4B6B3A;
  --leaf-soft: #E7EDDF;
  --text: #1C1008;
  --text-muted: #6B5B4F;
  --border: #E8DDD0;
  --white: #FFFFFF;
  --success: #16A34A;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(60, 30, 10, 0.05);
  --shadow-md: 0 10px 30px rgba(60, 30, 10, 0.09);
  --maxw: 1000px;
  --maxw-doc: 860px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  /* Textura botánica muy sutil: hojas amazónicas */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23D4900A' stroke-width='1' opacity='0.05'%3E%3Cpath d='M30 90 C30 60 45 40 70 30 C55 55 50 75 30 90 Z'/%3E%3Cpath d='M30 90 L60 55'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a { color: var(--primary); }

code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.86em;
  background: var(--accent-soft);
  color: var(--primary-dark);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  word-break: break-word;
}

/* ── Header / Nav ─────────────────────────────── */
.header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.header-logo span { color: var(--accent); }

.header-logo .mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: none;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-left: auto;
}

.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header-nav a:hover { color: var(--primary); }

/* ── Contenedor ───────────────────────────────── */
.container {
  max-width: var(--maxw-doc);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero (portada) ───────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 4.5rem 1.5rem 3.5rem;
  background:
    radial-gradient(circle at 50% -10%, var(--accent-soft) 0%, transparent 55%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-alt) 100%);
  overflow: hidden;
}

.hero .eyebrow {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--text);
  margin-bottom: 0.9rem;
}

.hero h1 span { color: var(--primary); }

.hero p {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 620px;
  margin: 0 auto;
}

.hero .last-update {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent-dark);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  margin-top: 1.75rem;
}

/* Separador botánico */
.leaf-divider {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 1.75rem auto 0;
  color: var(--accent);
  opacity: 0.7;
}

/* ── Grid de tarjetas ─────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 3rem 1.5rem 4rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--primary);
  margin-bottom: 1.1rem;
}

.card-icon svg { width: 26px; height: 26px; }

.card h2 {
  font-size: 1.22rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

.card .arrow {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

/* ── Páginas de documento ─────────────────────── */
.doc-header {
  text-align: center;
  padding: 3rem 1.5rem 1rem;
}

.doc-header h1 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  margin-bottom: 0.6rem;
}

.doc-header .meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.doc-content {
  padding: 1.5rem 1.5rem 4rem;
}

.doc-content section {
  margin-bottom: 2.5rem;
}

.doc-content h2 {
  position: relative;
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  padding-left: 1.1rem;
  border-bottom: 1px solid var(--border);
}

/* Marca de hoja antes de cada título de sección */
.doc-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 6px;
  height: 1.3rem;
  border-radius: 4px;
  background: linear-gradient(var(--accent), var(--primary));
}

.doc-content h3 {
  font-size: 1.08rem;
  margin: 1.4rem 0 0.5rem;
  color: var(--text);
}

.doc-content p {
  margin-bottom: 0.8rem;
  color: var(--text);
}

.doc-content ul, .doc-content ol {
  margin: 0.5rem 0 1rem 1.4rem;
}

.doc-content li {
  margin-bottom: 0.45rem;
}

.doc-content strong { color: var(--text); }

/* Tablas */
.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.doc-content th, .doc-content td {
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

.doc-content tr:last-child td { border-bottom: none; }

.doc-content th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Callout / nota destacada */
.callout {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
}

.callout h3 { margin-top: 0; color: var(--primary); }
.callout p:last-child { margin-bottom: 0; }

/* Enlace de retorno */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.back-link:hover { color: var(--primary-dark); }

/* ── Footer ───────────────────────────────────── */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer .footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}

.footer a:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .header { padding: 0.75rem 0; }
  .header-inner { flex-wrap: wrap; gap: 0.6rem; }
  .header-logo { font-size: 1.3rem; }
  .header-nav { gap: 1rem; margin-left: auto; }
  .header-nav a { font-size: 0.8rem; }
  .hero { padding: 3rem 1.25rem 2.5rem; }
  .cards { grid-template-columns: 1fr; padding: 2rem 1rem 3rem; }
  .doc-content { padding: 1rem 1rem 3rem; }
  .doc-content table { font-size: 0.82rem; }
  .doc-content th, .doc-content td { padding: 0.5rem 0.55rem; }
}
