/* Juego en Equilibrio — hoja de estilos única, sin dependencias externas. */

:root {
  --paper:   #fbfaf7;
  --surface: #ffffff;
  --ink:     #1d2422;
  --ink-2:   #414b47;
  --muted:   #6d766f;
  --line:    #e6e1d6;
  --brand:   #0f6f65;
  --brand-d: #0a534b;
  --brand-l: #e7f2ef;
  --accent:  #b4552b;
  --warn-bg: #fdf3ea;
  --warn-ln: #e8c9ae;
  --radius:  14px;
  --wrap:    1120px;
  --serif:   "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: var(--brand-d); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow {
  font-size: .75rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--brand); font-weight: 700; margin-bottom: .6em;
}

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff;
  padding: .7rem 1.1rem; z-index: 99; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--ink); color: #d8ded9; font-size: .8rem; }
.topbar__in { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; }
.topbar__in p { margin: 0; }
.topbar__badge {
  flex: none; border: 1px solid #57625c; border-radius: 999px;
  padding: .05rem .5rem; font-weight: 700; font-size: .72rem; letter-spacing: .04em;
}

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 250, 247, .93);
  backdrop-filter: saturate(160%) blur(9px);
  border-bottom: 1px solid var(--line);
}
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; }

.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand__mark { color: var(--brand); display: flex; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-family: var(--serif); font-size: 1.22rem; font-weight: 600; }
.brand__text small { color: var(--muted); font-size: .72rem; }

.nav { display: flex; gap: 1.4rem; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .93rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.is-active { color: var(--brand-d); border-bottom-color: var(--brand); }

.navtoggle, .burger { display: none; }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--brand-l), var(--paper)); }
.hero__in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding: 4rem 0 3.4rem; }
.hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.4rem); margin-bottom: .35em; }
.hero__lead { font-size: 1.1rem; color: var(--ink-2); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.hero__art { margin: 0; }
.hero__art figcaption { font-size: .72rem; color: var(--muted); margin-top: .5rem; text-align: right; }

.btn {
  display: inline-block; background: var(--brand); color: #fff; text-decoration: none;
  padding: .72rem 1.25rem; border-radius: 999px; font-size: .93rem; font-weight: 600;
  border: 1px solid var(--brand); cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--brand-d); border-color: var(--brand-d); color: #fff; }
.btn--ghost { background: transparent; color: var(--brand-d); }
.btn--ghost:hover { background: var(--brand-l); color: var(--brand-d); }

/* ---------- Ilustraciones ---------- */
.art { display: block; width: 100%; height: 190px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.art--hero { height: clamp(230px, 30vw, 330px); }

/* ---------- Secciones ---------- */
.section { padding: 3.4rem 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--line); padding-bottom: .7rem; }
.section__head h2 { margin: 0; }
.link-more { font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

.pagehead { border-bottom: 1px solid var(--line); background: var(--brand-l); padding: 3.2rem 0 2.6rem; }
.pagehead__lead { font-size: 1.08rem; color: var(--ink-2); max-width: 62ch; margin-bottom: 0; }

/* ---------- Tarjetas ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }

.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card:hover { border-color: #cfc9ba; }
.card__art { display: block; }
.card__art .art { border: 0; border-radius: 0; height: 150px; }
.card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { font-size: 1.13rem; margin: .55rem 0 .45rem; }
.card__body h3 a { color: var(--ink); text-decoration: none; }
.card__body h3 a:hover { color: var(--brand-d); }
.card__body p { font-size: .93rem; color: var(--ink-2); margin-bottom: .8rem; }
.card__body .meta { margin-top: auto; }

.meta { font-size: .82rem; color: var(--muted); margin: 0; }

.tag {
  display: inline-block; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase;
  font-weight: 700; color: var(--brand-d); background: var(--brand-l);
  padding: .2rem .55rem; border-radius: 999px; text-decoration: none; align-self: flex-start;
}
.tag--plain { background: #f0ede5; color: var(--ink-2); text-transform: none; letter-spacing: 0; font-weight: 500; margin-right: .35rem; }

.feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 2.4rem; }
.feature__art .art { border: 0; border-radius: 0; height: 100%; min-height: 270px; }
.feature__body { padding: 1.8rem 2rem 1.8rem 0; }
.feature__body h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin: .6rem 0 .5rem; }
.feature__body h3 a { color: var(--ink); text-decoration: none; }
.feature__body h3 a:hover { color: var(--brand-d); }
.feature__excerpt { color: var(--ink-2); }

/* ---------- Banda destacada ---------- */
.band { background: var(--ink); color: #e7ebe8; }
.band__in { display: grid; grid-template-columns: 1.3fr .7fr; gap: 3rem; align-items: center; padding: 3rem 0; }
.band h2 { color: #fff; }
.band p { color: #bcc5c0; }
.band .btn { background: var(--brand); border-color: var(--brand); margin-top: .6rem; }
.band__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.band__list li { display: flex; gap: .8rem; align-items: baseline; font-size: .93rem; border-bottom: 1px solid #333c38; padding-bottom: .8rem; }
.band__list span { color: var(--brand); font-weight: 700; font-size: .78rem; }

/* ---------- Temas ---------- */
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.topic { display: block; padding: 1.3rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.topic:hover { border-color: var(--brand); color: var(--ink); }
.topic h3 { margin-bottom: .3rem; }
.topic p { font-size: .9rem; color: var(--ink-2); margin-bottom: .6rem; }
.topic span { font-size: .78rem; }

/* ---------- Artículo ---------- */
.post__head { padding: 3rem 0 1.6rem; max-width: 820px; }
.post__head h1 { margin-bottom: .3em; }
.post__excerpt { font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-d); }
.crumbs span { margin: 0 .35rem; }
.post__art { margin: 0 auto 2.6rem; }

.post__layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3.5rem; align-items: start; padding-bottom: 2rem; }

.toc { position: sticky; top: 92px; font-size: .88rem; }
.toc h2 { font-size: .78rem; letter-spacing: .11em; text-transform: uppercase; font-family: var(--sans); color: var(--muted); margin-bottom: .8rem; }
.toc ol { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; color: var(--muted); }
.toc ol a { color: var(--ink-2); text-decoration: none; }
.toc ol a:hover { color: var(--brand-d); text-decoration: underline; }
.toc__note { margin-top: 1.2rem; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .9rem; }
.plainlist { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .35rem; }

.prose { font-family: var(--serif); font-size: 1.14rem; line-height: 1.75; color: var(--ink); max-width: 68ch; }
.prose--narrow { max-width: 70ch; margin-inline: auto; }
.prose h2 { margin-top: 2.2em; scroll-margin-top: 100px; }
.prose h3 { margin-top: 1.6em; font-size: 1.16rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .55em; }
.prose .lead { font-size: 1.24rem; line-height: 1.6; color: var(--ink-2); border-left: 3px solid var(--brand); padding-left: 1.1rem; margin-bottom: 1.8em; }
.prose strong { font-weight: 700; }

.callout { background: var(--brand-l); border: 1px solid #c9e0da; border-radius: var(--radius); padding: 1.3rem 1.5rem; margin: 2.4rem 0 1.6rem; }
.callout h2 { margin-top: 0 !important; font-size: 1.15rem; font-family: var(--sans); }
.callout p { margin-bottom: 0; font-size: 1rem; font-family: var(--sans); }

.urgent { background: var(--warn-bg); border: 1px solid var(--warn-ln); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin-bottom: 2.4rem; }
.urgent h2 { margin-top: 0; font-size: 1.2rem; }
.urgent p { margin-bottom: 0; }

.disclaimer { margin-top: 2.4rem; padding: 1rem 1.2rem; border: 1px dashed var(--line); border-radius: 10px; font-family: var(--sans); font-size: .85rem; color: var(--muted); background: #f6f4ee; }
.tags { margin-top: 2rem; font-family: var(--sans); }

/* ---------- Autor ---------- */
.authorbox { display: flex; gap: 1.6rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.authorbox--wide { padding: 2.2rem; }
.authorbox h2 { margin: 0 0 .2rem; font-size: 1.35rem; }
.authorbox p { font-size: .96rem; }
.authorbox p:last-of-type { margin-bottom: .6rem; }

.avatar {
  flex: none; width: 68px; height: 68px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.9rem; line-height: 1;
}
.avatar--lg { width: 96px; height: 96px; font-size: 2.6rem; margin-bottom: 1.2rem; }

/* ---------- Recursos ---------- */
.resources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin-bottom: 3rem; }
.resource { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.resource h3 { margin-bottom: .3rem; }
.resource p { font-size: .92rem; color: var(--ink-2); }
.resource__phone { font-family: var(--serif); font-size: 1.45rem; color: var(--brand-d); font-weight: 600; margin-bottom: .5rem; }

/* ---------- Formularios y test ---------- */
.form { display: grid; gap: 1.1rem; font-family: var(--sans); font-size: .95rem; max-width: 34rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: .65rem .8rem;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.form__note { font-size: .82rem; color: var(--muted); font-weight: 400; margin: 0; }
.form button { justify-self: start; }

.quiz { font-family: var(--sans); font-size: .96rem; display: grid; gap: 1rem; }
.quiz__q { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.1rem 1.3rem; margin: 0; }
.quiz__q legend { font-weight: 600; padding: 0 .2rem; display: flex; gap: .6rem; align-items: baseline; }
.quiz__n { color: var(--brand); font-size: .8rem; font-weight: 800; }
.quiz__opts { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; margin-top: .7rem; }
.quiz__opts label { display: flex; align-items: center; gap: .35rem; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.quiz button { margin-top: .5rem; justify-self: start; }
.quiz .form__note { margin-top: .6rem; }

.result { font-family: var(--sans); background: var(--surface); border: 1px solid var(--brand); border-radius: var(--radius); padding: 1.8rem; }
.result h2 { margin-top: 0; }
.result__score { font-weight: 700; color: var(--brand-d); }
.result .btn { margin-right: .5rem; }

/* ---------- Banda de ayuda ---------- */
.helpband { background: var(--brand-d); color: #fff; }
.helpband__in { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2rem 0; flex-wrap: wrap; }
.helpband h2 { color: #fff; margin: 0 0 .25rem; font-size: 1.4rem; }
.helpband p { margin: 0; color: #cfe4df; font-size: .95rem; }
.helpband__cta {
  background: #fff; color: var(--brand-d); text-decoration: none; font-weight: 700;
  font-size: 1.35rem; padding: .7rem 1.5rem; border-radius: 999px; white-space: nowrap;
  font-family: var(--serif);
}
.helpband__cta:hover { background: #eaf5f2; color: var(--brand-d); }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: #b9c2bd; font-size: .9rem; padding: 3rem 0 2rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.2rem; border-bottom: 1px solid #333c38; }
.site-footer strong { color: #fff; font-family: var(--serif); font-size: 1.15rem; }
.site-footer h3 { color: #fff; font-family: var(--sans); font-size: .78rem; letter-spacing: .11em; text-transform: uppercase; margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { color: #b9c2bd; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .muted { color: #7d8781; }
.site-footer__about p { margin-top: .7rem; max-width: 42ch; }
.site-footer__legal { padding-top: 1.6rem; font-size: .8rem; color: #8b948f; display: grid; gap: .7rem; }
.site-footer__legal p { margin: 0; max-width: 95ch; }
.site-footer__legal strong { font-family: var(--sans); font-size: .8rem; color: #cbd3ce; }

/* ---------- Adaptativo ---------- */
@media (max-width: 900px) {
  .hero__in, .feature, .band__in, .post__layout { grid-template-columns: 1fr; gap: 2rem; }
  .grid, .topics, .resources, .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
  .feature__body { padding: 0 1.6rem 1.6rem; }
  .feature__art .art { min-height: 200px; }
  .toc { position: static; border-bottom: 1px solid var(--line); padding-bottom: 1.2rem; }
  .hero__art { order: -1; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .grid, .topics, .resources, .site-footer__grid { grid-template-columns: 1fr; }
  .prose { font-size: 1.08rem; }
  .helpband__in { flex-direction: column; align-items: flex-start; }

  .burger { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 36px; cursor: pointer; }
  .burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem;
  }
  .navtoggle:checked ~ .nav { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .site-header__in { position: relative; flex-wrap: wrap; }
  .topbar__in { font-size: .74rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
