/* Athera — hoja de estilos compartida para el blog y los artículos */
:root {
  --bg: #F7F1E7;
  --ink: #1F3B2C;
  --green: #4B7A5C;
  --sage: #9CBBA5;
  --sand: #E8E0D0;
  --card: #FFFDF8;
  --clay: #D9A87C;
  --muted: #3E5346;
  --muted-2: #6B7A6C;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Karla', system-ui, sans-serif; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; transition: color .3s ease, background .3s ease, transform .4s ease; }
a:hover { color: var(--green); }
::selection { background: var(--sage); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(247,241,231,.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(31,59,44,.12);
}
.site-header .brand { display: flex; align-items: baseline; gap: 10px; }
.site-header .brand .name { font-family: 'Instrument Serif', serif; font-size: 23px; letter-spacing: .2em; }
.site-header .brand .sub { font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: .3em; text-transform: uppercase; color: var(--green); }
.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  padding: 9px 15px; border-radius: 999px; font-family: 'DM Mono', monospace; font-size: 11.5px; white-space: nowrap;
}
.site-nav a:hover { background: var(--sand); color: var(--ink); }
.site-nav a.cta { background: var(--ink); color: var(--bg); }
.site-nav a.cta:hover { background: var(--green); color: var(--bg); }

/* Hamburguesa + menú móvil (mismo patrón que la home) */
.site-header .burger {
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(31,59,44,.2);
  background: transparent; cursor: pointer; flex: 0 0 auto;
}
.site-header .burger span { display: block; width: 16px; height: 1.5px; border-radius: 2px; background: var(--ink); transition: transform .3s ease; }
.site-header .burger.is-open span:nth-child(1) { transform: translateY(3.25px) rotate(19deg); }
.site-header .burger.is-open span:nth-child(2) { transform: translateY(-3.25px) rotate(-19deg); }
.site-menu {
  position: fixed; inset: 0; z-index: 70; display: none; flex-direction: column; gap: 14px;
  padding: 92px 28px calc(40px + env(safe-area-inset-bottom, 0px)); background: var(--ink);
  overflow-y: auto; overscroll-behavior: contain;
}
.site-menu.is-open { display: flex; }
.site-menu a { font-family: 'Instrument Serif', serif; font-size: clamp(30px, 9vw, 46px); color: var(--bg); }
.site-menu a:hover { color: var(--sage); }
.site-menu a.wa {
  margin-top: auto; align-self: flex-start; font-family: 'DM Mono', monospace; font-size: 12.5px;
  padding: 13px 24px; border: 1px solid rgba(247,241,231,.4); border-radius: 999px;
}
@media (min-width: 641px) {
  .site-menu, .site-header .burger { display: none !important; }
}

/* Layout */
.wrap { padding: clamp(48px, 9vh, 110px) clamp(20px, 5vw, 56px); }
.eyebrow { margin: 0 0 20px; font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
.page-title { margin: 0 0 20px; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(38px, 6vw, 82px); line-height: 1; letter-spacing: -.01em; }
.lead { margin: 0; max-width: 620px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.65; color: var(--muted); }

/* Blog index grid */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(20px, 2.6vw, 36px); margin-top: clamp(40px, 7vh, 72px); }
.post-card { display: flex; flex-direction: column; gap: 16px; }
.post-card .thumb {
  display: block; position: relative; height: clamp(280px, 28vw, 400px); overflow: hidden;
  border-radius: 220px 220px 26px 26px; background: var(--sand);
}
.post-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-card .meta { margin: 0; font-family: 'DM Mono', monospace; font-size: 11.5px; color: var(--muted-2); }
.post-card h2 { margin: 0; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(21px, 2vw, 29px); line-height: 1.18; }
.post-card h2 a { color: inherit; }
.post-card p { margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--muted); }
.post-card .thumb img { transition: transform .6s cubic-bezier(.16,1,.3,1); }
.post-card .thumb:hover img { transform: scale(1.04); }
.post-card[hidden] { display: none; }

/* Category filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(28px, 5vh, 44px); }
.chip {
  padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(31,59,44,.24);
  background: transparent; color: var(--ink); font-family: 'DM Mono', monospace;
  font-size: 11.5px; cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.chip:hover { border-color: var(--green); color: var(--green); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.no-results { margin-top: 40px; font-family: 'DM Mono', monospace; font-size: 13px; color: var(--muted-2); }

/* Article */
.article { max-width: 720px; margin: 0 auto; }
.article .back { display: inline-block; margin-bottom: 26px; font-family: 'DM Mono', monospace; font-size: 12px; color: var(--green); }
.article .meta { margin: 0 0 16px; font-family: 'DM Mono', monospace; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
.article h1 { margin: 0 0 28px; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(32px, 5vw, 58px); line-height: 1.06; }
.article .hero {
  position: relative; height: clamp(260px, 42vw, 460px); margin: 0 0 40px; overflow: hidden;
  border-radius: 200px 200px 28px 28px; background: var(--sand);
}
.article .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article-body { font-size: 18px; line-height: 1.75; color: var(--muted); }
.article-body p { margin: 0 0 22px; }
.article-body h2 {
  margin: 40px 0 14px; font-family: 'Instrument Serif', serif; font-weight: 400;
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; color: var(--ink);
}
.article-body ul { margin: 0 0 22px; padding-left: 22px; }
.article-body li { margin: 0 0 8px; }
.article-body strong { color: var(--ink); }

.article .ref-title {
  max-width: 720px; margin: 44px auto 14px; font-family: 'Instrument Serif', serif; font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; color: var(--ink);
}
.article .ref-list { max-width: 720px; margin: 0 auto; padding-left: 22px; font-size: 15px; line-height: 1.6; color: var(--muted-2); }
.article .ref-list li { margin: 0 0 7px; }

.article-cta {
  margin: 56px auto 0; max-width: 720px; padding: clamp(26px, 3vw, 40px);
  border-radius: 28px; background: var(--ink); color: var(--bg);
}
.article-cta p { margin: 0 0 18px; font-family: 'Instrument Serif', serif; font-size: clamp(21px, 2.4vw, 30px); line-height: 1.2; }
.article-cta a {
  display: inline-block; margin: 6px 10px 0 0; padding: 15px 28px; border-radius: 999px; background: var(--bg); color: var(--ink);
  font-family: 'DM Mono', monospace; font-size: 12.5px;
}
.article-cta a:hover { background: var(--sage); color: var(--ink); }

/* Footer */
.site-footer { padding: 0 clamp(20px, 4vw, 56px) 34px; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding-top: 40px; border-top: 1px solid rgba(31,59,44,.16); }
.site-footer .cols p { margin: 0; max-width: 280px; font-size: 16.5px; line-height: 1.6; color: var(--muted); }
.site-footer .cols .links { display: grid; gap: 9px; align-content: start; font-family: 'DM Mono', monospace; font-size: 12.5px; }
.site-footer .cols .links a { display: inline-flex; align-items: center; gap: 8px; }
.site-footer .wordmark { margin: 40px 0 20px; font-family: 'Instrument Serif', serif; font-size: clamp(48px, 15vw, 220px); line-height: .85; letter-spacing: .01em; }
.site-footer .legal { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 18px; border-top: 1px solid rgba(31,59,44,.16); font-family: 'DM Mono', monospace; font-size: 11.5px; color: var(--muted-2); }

/* Floating WhatsApp */
.fab {
  position: fixed; right: clamp(14px, 2.4vw, 26px); bottom: clamp(14px, 2.4vw, 26px); z-index: 85;
  display: flex; align-items: center; gap: 9px; padding: 15px 24px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-family: 'DM Mono', monospace; font-size: 12px;
  box-shadow: 0 18px 40px -24px rgba(31,59,44,.9);
}
.fab:hover { background: var(--green); color: var(--bg); }
.fab .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }

/* ---- Móvil ---- */
@media (max-width: 640px) {
  .site-header { padding: 10px clamp(14px, 4vw, 20px); gap: 10px; }
  .site-header .brand .name { font-size: 20px; }
  .site-header .site-nav { display: none; }
  .site-header .burger { display: flex; }

  .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
           scrollbar-width: none; margin: 24px -4vw 0; padding: 4px 4vw; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }

  .wrap { padding-bottom: 96px; }
  .article .hero { border-radius: 120px 120px 22px 22px; }
  .post-card .thumb, .post-card a.thumb { border-radius: 140px 140px 22px 22px; }

  .fab { padding: 14px; font-size: 0; gap: 0; }
  .fab .dot { display: block; width: 12px; height: 12px; }
}
