/* ==========================================================================
   DasoMaps — sistema de diseño
   Paleta: papel topográfico + tinta bosque + verde pino + musgo + teal agua
   ========================================================================== */

:root {
  --paper: #f3f1e4;
  --paper-raised: #fbfaf3;
  --ink: #202b1f;
  --ink-soft: #4b5a45;
  --forest: #2f5233;
  --forest-dark: #1f3a24;
  --moss: #8a9a7a;
  --moss-line: #cdc6a8;
  --water: #3f7377;
  --water-dark: #2c5457;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --max-width: 1120px;
  --radius: 10px;
}

/* ---- Reset base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--water-dark); text-decoration-thickness: 1.5px; }
a:hover { color: var(--forest-dark); }
a:focus-visible, button:focus-visible {
  outline: 2.5px solid var(--water);
  outline-offset: 3px;
}
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--forest-dark);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }
ul { padding-left: 1.3em; color: var(--ink-soft); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Coordenada / etiqueta firma ---- */
.coord-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--water-dark);
  background: rgba(63, 115, 119, 0.08);
  border: 1px solid rgba(63, 115, 119, 0.25);
  border-radius: 999px;
  padding: 0.3em 0.9em;
  text-transform: none;
  margin-bottom: 1em;
}
.coord-tag::before { content: "◎"; font-size: 0.9em; }

/* ---- Navegación ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 241, 228, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--moss-line);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--forest-dark);
  text-decoration: none;
}
.brand:hover { color: var(--forest-dark); }
.brand-mark {
  width: 26px; height: 26px;
  color: var(--water);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--forest); }
.nav-cta {
  background: var(--forest);
  color: var(--paper) !important;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  font-size: 0.9rem !important;
}
.nav-cta:hover { background: var(--forest-dark); color: var(--paper) !important; }
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 5rem;
  border-bottom: 1px solid var(--moss-line);
}
.hero-contours {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
}
.hero-copy p.lede {
  font-size: 1.15rem;
  color: var(--ink);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

/* ---- Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.8em 1.5em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--forest); color: var(--paper); }
.btn-primary:hover { background: var(--forest-dark); color: var(--paper); }
.btn-ghost { background: transparent; border-color: var(--moss-line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--forest); color: var(--forest-dark); }
.btn-soon {
  background: var(--paper-raised);
  border-color: var(--moss-line);
  color: var(--ink-soft);
  cursor: default;
}
.btn-soon:hover { transform: none; }

/* ---- Mockup de teléfono (ilustrativo) ---- */
.phone {
  justify-self: center;
  width: 250px;
  border-radius: 34px;
  background: var(--forest-dark);
  padding: 10px;
  box-shadow: 0 30px 60px -20px rgba(31, 58, 36, 0.45);
}
.phone-screen {
  border-radius: 26px;
  overflow: hidden;
  background: var(--paper-raised);
  aspect-ratio: 9 / 19.5;
  position: relative;
}

/* ---- Secciones ---- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--paper-raised); }
.section-head { max-width: 60ch; margin-bottom: 2.5rem; }

/* ---- Rejilla de funcionalidades ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--paper-raised);
  border: 1px solid var(--moss-line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.section-alt .feature-card { background: var(--paper); }
.feature-icon {
  width: 34px; height: 34px;
  color: var(--water);
  margin-bottom: 0.9rem;
}
.feature-card h3 { margin-bottom: 0.4em; }
.feature-card p { font-size: 0.95rem; margin-bottom: 0; }

/* ---- Tarjetas de noticias ---- */
.post-list { display: flex; flex-direction: column; gap: 0; }
.post-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--moss-line);
  text-decoration: none;
}
.post-row:first-child { padding-top: 0; }
@media (max-width: 600px) { .post-row { grid-template-columns: 1fr; gap: 0.4rem; } }
.post-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--moss);
  padding-top: 0.2em;
}
.post-row h3 { color: var(--forest-dark); margin-bottom: 0.3em; }
.post-row p { margin: 0; }

/* ---- Documentación ---- */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
@media (max-width: 700px) { .doc-grid { grid-template-columns: 1fr; } }
.doc-card {
  border: 1px solid var(--moss-line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  background: var(--paper-raised);
  text-decoration: none;
  display: block;
}
.doc-card h3 { margin-bottom: 0.3em; color: var(--forest-dark); }
.doc-card p { margin: 0; font-size: 0.93rem; }
.doc-card .doc-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--moss);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Callout ---- */
.callout {
  border: 1px dashed var(--moss-line);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  background: rgba(63, 115, 119, 0.06);
}
.callout p { margin: 0; font-size: 0.92rem; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--moss-line);
  padding: 3rem 0 2.5rem;
  background: var(--forest-dark);
  color: rgba(243, 241, 228, 0.85);
}
.site-footer a { color: rgba(243, 241, 228, 0.85); }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(243, 241, 228, 0.55);
  margin: 0 0 0.8em;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.5em; font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid rgba(243, 241, 228, 0.15);
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: rgba(243, 241, 228, 0.55);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

/* ---- SVG de contorno topográfico (hero) ---- */
.contour-line { fill: none; stroke: var(--moss-line); stroke-width: 1.1; }
.contour-line.deep { stroke: var(--moss); opacity: 0.7; }
.trail-line { fill: none; stroke: var(--forest); stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; opacity: 0.8; }
.water-marker-ring { fill: none; stroke: var(--water); stroke-width: 1.4; opacity: 0.45; }
.water-marker-dot { fill: var(--water); }

/* ---- Cabecera simple de páginas internas ---- */
.page-header {
  padding: 3.2rem 0 2.5rem;
  border-bottom: 1px solid var(--moss-line);
}
.page-header p.lede { font-size: 1.05rem; }
