/* Healthy Aging Daily — hoja de estilos
 * Paleta "Arcilla y oliva": crema, barro, oliva, dorado, atardecer.
 * Tipografía: Lora (titulares) + Source Sans 3 (cuerpo).
 */

/* ---------- Fuentes ---------- */
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/lora-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/lora-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/lora-italic-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/sourcesans-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/sourcesans-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/sourcesans-700-latin.woff2") format("woff2");
}

/* ---------- Variables ---------- */
:root {
  --cream: #FAF6EE;
  --cream-2: #F2EADA;
  --cream-3: #E6D9BE;
  --ink: #1E2126;
  --ink-2: #3A3F49;
  --ink-3: #68707D;
  --clay: #9A3B2E;         /* arcilla, acento principal */
  --clay-deep: #7A2C21;
  --olive: #4C6B3F;        /* oliva, acento secundario */
  --olive-deep: #334A2A;
  --gold: #BE8E4A;         /* dorado, acentos sutiles */
  --dusk: #475266;         /* ocaso, lavanda-azulado */
  --rule: #D9CFB8;
  --rule-soft: #ECE3CC;
  --surface: #FFFBF2;
  --surface-2: #FFF8E6;

  --radius: 3px;
  --radius-lg: 10px;
  --maxw: 1180px;
  --measure: 36rem;

  --ff-serif: "Lora", Georgia, "Times New Roman", serif;
  --ff-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI",
             Helvetica, Arial, sans-serif;

  --fs-base: 19px;
  --lh-body: 1.65;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html.text-large body { font-size: 20.5px; }
html.text-xlarge body { font-size: 22px; }

body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--clay); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--clay-deep); text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--ff-serif);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 .55em;
  line-height: 1.22;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2rem); margin-top: 1.9em; }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); margin-top: 1.6em; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: .5em; }
li::marker { color: var(--olive); }
strong { font-weight: 700; color: var(--ink); }
em { font-style: italic; }
blockquote {
  margin: 1.8em 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 3px solid var(--olive);
  color: var(--ink-2);
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 1.08em;
}
hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
code { background: var(--cream-2); padding: 0.1em 0.3em; border-radius: 2px; font-size: 0.95em; }

.skip-link {
  position: absolute; top: -50px; left: 0;
  background: var(--olive); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.1rem; }
.container-narrow { max-width: 740px; }
.container-article { max-width: 710px; }
.text-small { font-size: 0.9rem; color: var(--ink-3); }

/* ---------- Cabecera ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0 1.0rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand img { width: 44px; height: 44px; border-radius: 50%; background: var(--clay); }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--ff-serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.brand-tag {
  font-size: 0.78rem;
  color: var(--ink-3);
  font-style: italic;
  margin-top: 2px;
  letter-spacing: 0.01em;
}
.header-tools { display: inline-flex; gap: .4rem; }
.icon-btn {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: .55rem .85rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--ff-sans);
  font-size: 0.95rem;
  transition: background 120ms, border-color 120ms;
}
.icon-btn:hover { background: var(--cream-2); border-color: var(--ink-3); }
.icon-btn .aa { font-family: var(--ff-serif); font-weight: 600; letter-spacing: -0.01em; }
.menu-btn { display: none; }

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  border-top: 1px solid var(--rule-soft);
  padding: 0.65rem 0 0.9rem;
}
.site-nav li { margin: 0; }
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.1rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--clay); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--clay); }

@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .site-nav { display: none; border-top: 1px solid var(--rule-soft); margin-top: .35rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: .4rem; padding: 0.6rem 0 1rem; border: 0; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--cream) 100%);
  padding: 3.2rem 0 2.6rem;
  border-bottom: 1px solid var(--rule-soft);
}
.hero-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--olive-deep);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.hero-title {
  font-size: clamp(2.2rem, 5.4vw, 3.3rem);
  margin-bottom: 0.6rem;
  max-width: 820px;
}
.hero-lede {
  font-size: 1.2rem;
  max-width: 640px;
  color: var(--ink-2);
  margin-bottom: 1.5rem;
}
.hero-cta {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  background: var(--clay);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
.hero-cta:hover { background: var(--clay-deep); color: #fff; }

/* ---------- Secciones ---------- */
.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--rule-soft); }
.section-head { margin-bottom: 1.8rem; }
.section-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  color: var(--olive-deep);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.section-title { margin: 0 0 .35em; }
.section-note { color: var(--ink-2); max-width: 54ch; margin: 0.1rem 0 0; }

/* ---------- Featured ---------- */
.featured-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0;
}
.featured-card .thumb { display: block; background: var(--cream-2); border: 0; }
.featured-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-card .body { padding: 2rem 2rem 1.8rem; }
.featured-card .eyebrow {
  color: var(--olive-deep);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  margin-bottom: 0.4rem;
}
.featured-card h2 { margin-top: 0; }
.featured-card h2 a { color: var(--ink); text-decoration: none; }
.featured-card h2 a:hover { color: var(--clay); }
.featured-card .excerpt { color: var(--ink-2); margin-bottom: 0.9rem; }
.readmore {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  color: var(--clay);
  border-bottom: 2px solid var(--clay);
}
.readmore:hover { color: var(--clay-deep); border-bottom-color: var(--clay-deep); }

@media (max-width: 760px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-card .body { padding: 1.4rem 1.3rem 1.4rem; }
}

/* ---------- Grid de artículos ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.6rem;
}
.article-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.article-card .thumb { background: var(--cream-2); }
.article-card .thumb img { width: 100%; height: auto; display: block; }
.article-card .body { padding: 1.25rem 1.25rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.article-card .meta {
  font-size: 0.84rem;
  color: var(--ink-3);
  margin-bottom: 0.5rem;
}
.article-card .meta .topic {
  color: var(--olive-deep);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}
.article-card .meta .dot { margin: 0 0.4rem; color: var(--rule); }
.article-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  line-height: 1.3;
}
.article-card h3 a { color: var(--ink); text-decoration: none; }
.article-card h3 a:hover { color: var(--clay); }
.article-card .excerpt { color: var(--ink-2); font-size: 0.98rem; margin-bottom: 0.9rem; flex: 1; }

/* ---------- Grid de los cinco cuidados ---------- */
.cuidados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
}
.cuidado-card {
  display: block;
  padding: 1.6rem 1.3rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms, box-shadow 160ms;
}
.cuidado-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(30,33,38,0.05);
  color: var(--ink);
}
.cuidado-card .symbol {
  width: 44px;
  height: 44px;
  margin-bottom: 0.8rem;
  color: var(--ink-2);
}
.cuidado-card h3 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.cuidado-card p { color: var(--ink-2); font-size: 0.98rem; margin-bottom: 0.8rem; }
.cuidado-card .arrow {
  display: inline-block;
  font-weight: 600;
  color: var(--clay);
  border-bottom: 2px solid var(--clay);
  text-decoration: none;
}
.cuidado-card.c-movimiento .symbol { color: var(--olive); }
.cuidado-card.c-mesa      .symbol { color: var(--clay); }
.cuidado-card.c-descanso  .symbol { color: var(--dusk); }
.cuidado-card.c-mente     .symbol { color: var(--gold); }
.cuidado-card.c-cuerpo    .symbol { color: var(--olive-deep); }

/* ---------- Artículo (texto largo) ---------- */
.article-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 2.6rem 0 2.2rem;
}
.article-header .eyebrow {
  color: var(--olive-deep);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.article-header h1 {
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  margin: 0 0 0.5rem;
}
.article-header .dek {
  font-size: 1.2rem;
  color: var(--ink-2);
  max-width: 640px;
}
.article-header .meta-line {
  margin-top: 1.2rem;
  color: var(--ink-3);
  font-size: 0.9rem;
}
.article-header .meta-line .sep { margin: 0 0.5rem; color: var(--rule); }
.article-hero {
  margin: 1.6rem 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.article-hero img { width: 100%; height: auto; display: block; background: var(--cream-2); }

.article-body { padding: 2rem 0 2.4rem; }
.article-body > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.article-body .lede {
  font-size: 1.2rem;
  color: var(--ink-2);
  font-family: var(--ff-serif);
  font-style: italic;
}
.article-sources {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.6rem 1.3rem;
  margin: 2.4rem auto 0;
  max-width: var(--measure);
}
.article-sources h2 { font-size: 1.1rem; margin: 0 0 0.6rem; }
.article-sources ul { margin: 0; padding-left: 1.1rem; }
.article-sources li { color: var(--ink-2); font-size: 0.95rem; margin-bottom: 0.35rem; }
.article-related {
  padding: 2.6rem 0;
  background: var(--cream-2);
  border-top: 1px solid var(--rule);
}
.article-related h2 { font-size: 1.3rem; margin-top: 0; }

/* ---------- Páginas de contenido estático ---------- */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 2.4rem 0 1.8rem;
}
.page-header h1 { margin: 0; }
.page-header .lede { color: var(--ink-2); max-width: 60ch; margin-top: 0.4rem; }
.page-body { padding: 2.4rem 0 3rem; }
.page-body > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }

/* ---------- Boletín ---------- */
.newsletter-box {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem 1.5rem;
  margin-top: 1rem;
}
.newsletter-box-centered { text-align: left; }
.newsletter-box h3 { margin-top: 0; }
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin: 0.9rem 0 0.6rem;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--ff-sans);
  font-size: 1rem;
  background: var(--cream);
  color: var(--ink);
}
.newsletter-form input[type="email"]:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
  border-color: var(--olive);
}
.newsletter-form button {
  padding: 0.75rem 1.1rem;
  background: var(--clay);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.newsletter-form button:hover { background: var(--clay-deep); }
.newsletter-fine { font-size: 0.85rem; color: var(--ink-3); margin: 0; }
@media (max-width: 520px) {
  .newsletter-form { flex-direction: column; }
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  margin: 1.6rem 0;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
}
.contact-card h2 { margin-top: 0; font-size: 1.2rem; }
.contact-email {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.6rem 0 0.4rem;
}

/* ---------- Botón genérico ---------- */
.button {
  display: inline-block;
  padding: 0.85rem 1.3rem;
  background: var(--clay);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius);
}
.button:hover { background: var(--clay-deep); color: #fff; }

/* ---------- Página gracias / 404 ---------- */
.thanks-wrapper {
  text-align: left;
  padding: 1rem 0 1rem;
}
.thanks-wrapper .lede { font-size: 1.2rem; color: var(--ink-2); }

/* ---------- Índice de artículos ---------- */
.articles-index { padding: 2rem 0 3rem; }
.topic-section { margin-bottom: 3rem; }
.topic-section h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  margin-bottom: 0.3rem;
}
.topic-lead { color: var(--ink-2); margin-bottom: 1.4rem; max-width: 60ch; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  padding: 2.6rem 0 1.6rem;
  margin-top: 2.6rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  font-size: 1rem;
  margin: 0 0 0.6rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--clay); text-decoration: underline; }
.footer-col p { color: var(--ink-2); font-size: 0.95rem; }

.health-disclaimer-footer {
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule-soft);
  margin-bottom: 0.8rem;
}
.health-disclaimer-footer p {
  font-size: 0.88rem;
  color: var(--ink-2);
  margin: 0;
  max-width: 820px;
}
.footer-legal {
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule-soft);
  color: var(--ink-3);
  font-size: 0.84rem;
}
.footer-legal p { margin: 0.1rem 0; }

/* ---------- Barra de cookies ---------- */
.cookie-bar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: 0 10px 40px rgba(30,33,38,0.1);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  display: none;
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto;
}
.cookie-bar.is-visible { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.cookie-bar p { margin: 0; flex: 1 1 300px; font-size: 0.95rem; color: var(--ink-2); }
.cookie-actions { display: inline-flex; gap: 0.4rem; }
.cookie-actions button {
  padding: 0.55rem 0.95rem;
  background: var(--clay);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.cookie-actions button.btn-refuse { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.cookie-actions button.btn-refuse:hover { background: var(--cream-2); }
.cookie-actions button.btn-accept:hover { background: var(--clay-deep); }
@media (max-width: 540px) {
  .cookie-bar { padding: 0.9rem 0.95rem; }
  .cookie-actions { width: 100%; }
  .cookie-actions button { flex: 1; }
}
