:root {
  --green: #2f6f43;
  --green-dark: #204f31;
  --green-soft: #eaf3ed;
  --sand: #f7f3ec;
  --ink: #1f2922;
  --muted: #66736a;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(16, 36, 24, .16);
  --radius: 22px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, var(--sand) 100%);
  line-height: 1.5;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green-dark); }
button, a { -webkit-tap-highlight-color: transparent; }

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-140%);
  background: var(--green-dark);
  color: var(--white);
  padding: .7rem 1rem;
  border-radius: 999px;
  z-index: 50;
}
.skip-link:focus { transform: translateY(0); }

.hero {
  color: var(--white);
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.16), transparent 34%),
    linear-gradient(135deg, #2f6f43 0%, #174225 100%);
  padding: clamp(42px, 7vw, 86px) 0;
}
.hero__inner { max-width: 940px; }
.hero__logos {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.hero__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.hero__logo img {
  display: block;
  object-fit: contain;
}
.hero__logo--consejo img {
  width: 180px;
  height: 66px;
}
.hero__logo--fde img {
  width: 66px;
  height: 66px;
}
.eyebrow {
  margin: 0 0 .55rem;
  color: inherit;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2.3rem, 8vw, 5.3rem);
  line-height: .95;
  letter-spacing: -.055em;
}
.hero__lead {
  margin: 1.35rem 0 0;
  max-width: 720px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  opacity: .94;
}
.hero__actions,
.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.6rem;
}
.button,
.viewer__button {
  border: 0;
  border-radius: 999px;
  padding: .85rem 1.12rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}
.button:hover,
.viewer__button:hover { transform: translateY(-1px); }
.button--primary { background: var(--white); color: var(--green-dark); box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.button--ghost { background: rgba(255,255,255,.13); color: var(--white); border: 1px solid rgba(255,255,255,.34); }

.main {
  padding: clamp(28px, 5vw, 56px) 0 50px;
}
.intro-card {
  display: block;
  background: var(--white);
  border: 1px solid rgba(47,111,67,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 3vw, 2rem);
  margin-bottom: 1.4rem;
}
.intro-card h2,
.tips-index h2 {
  margin: 0;
  color: var(--green-dark);
  font-size: clamp(1.45rem, 3.5vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.intro-card__content { width: 100%; }
.intro-card p:not(.eyebrow) { margin: .8rem 0 0; color: var(--muted); max-width: none; }

.viewer {
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(47,111,67,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(.8rem, 2vw, 1.4rem);
}
.viewer__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}
.viewer__button {
  background: var(--green);
  color: var(--white);
  min-width: 112px;
}
.viewer__button[disabled] {
  opacity: .42;
  cursor: not-allowed;
  transform: none;
}
.viewer__counter { margin: 0; font-weight: 800; color: var(--green-dark); }
.viewer__stage {
  width: min(820px, 100%);
  margin-inline: auto;
}
.book-page {
  position: relative;
  overflow: hidden;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.11);
}
.book-page[hidden] { display: none; }
.book-page img { width: 100%; }
.viewer__dots {
  display: flex;
  justify-content: center;
  gap: .65rem;
  margin-top: 1rem;
}
.dot {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 999px;
  background: #b4c6ba;
  cursor: pointer;
}
.dot.is-active { background: var(--green); transform: scale(1.14); }

.hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  border: 2px solid rgba(255,255,255,.72);
  border-radius: 8px;
  background: rgba(47,111,67,.04);
  cursor: pointer;
  pointer-events: auto;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.hotspot span {
  position: absolute;
  right: .42rem;
  top: .42rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(47,111,67,.94);
  color: white;
  font-weight: 900;
  font-size: .9rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
}
.hotspot:hover,
.hotspot:focus-visible {
  outline: none;
  border-color: #ffffff;
  background: rgba(47,111,67,.16);
  box-shadow: 0 0 0 4px rgba(47,111,67,.18), 0 12px 30px rgba(0,0,0,.2);
  transform: translateY(-1px);
}

.tips-index {
  margin-top: 1.5rem;
  background: var(--white);
  border: 1px solid rgba(47,111,67,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 3vw, 2rem);
}
.tips-index__header { margin-bottom: 1rem; }
.tips-index .eyebrow { color: var(--green); }
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.tip-card {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(47,111,67,.18);
  border-radius: 16px;
  background: #fbfdfb;
  color: var(--ink);
  padding: .9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.tip-card span {
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: .82rem;
}
.tip-card:hover,
.tip-card:focus-visible {
  outline: none;
  border-color: var(--green);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.site-footer {
  padding: 28px 0;
  background: #163d24;
  color: rgba(255,255,255,.86);
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer p { margin: 0; }
.site-footer a { color: #ffffff; }
.site-footer__logos {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.site-footer__logo img {
  display: block;
  object-fit: contain;
}
.site-footer__logo--consejo img {
  width: 126px;
  height: 46px;
}
.site-footer__logo--fde img {
  width: 46px;
  height: 46px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 27, 17, .7);
  backdrop-filter: blur(5px);
}
.modal__panel {
  position: relative;
  width: min(680px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: var(--white);
  border-radius: 24px;
  padding: clamp(1.35rem, 4vw, 2.2rem);
  box-shadow: 0 30px 80px rgba(0,0,0,.32);
}
.modal__close {
  position: absolute;
  right: .9rem;
  top: .8rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.modal__kicker {
  margin: 0 3rem .45rem 0;
  color: var(--green);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.modal h2 {
  margin: 0;
  color: var(--green-dark);
  font-size: clamp(1.55rem, 4vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}
.modal #modal-body {
  margin: 1rem 0 0;
  color: #35443a;
  font-size: clamp(1rem, 2vw, 1.12rem);
}
.modal__actions { justify-content: space-between; }

@media (max-width: 760px) {
  .container { width: min(100% - 22px, 1120px); }
  .hero { padding-top: 38px; }
  .hero__logos { gap: .8rem; margin-bottom: 1rem; }
  .hero__logo--consejo img { width: 148px; height: 54px; }
  .hero__logo--fde img { width: 54px; height: 54px; }
  .viewer__toolbar { gap: .45rem; }
  .viewer__button { min-width: 0; padding: .75rem .85rem; }
  .viewer__counter { font-size: .95rem; }
  .tips-grid { grid-template-columns: 1fr; }
  .hotspot { border-width: 1px; }
  .hotspot span { width: 1.45rem; height: 1.45rem; font-size: .72rem; right: .25rem; top: .25rem; }
  .site-footer__inner { display: block; }
  .site-footer__logos { margin-bottom: .75rem; }
  .site-footer__logo--consejo img { width: 108px; height: 40px; }
  .site-footer__logo--fde img { width: 40px; height: 40px; }
  .site-footer__inner p + p { margin-top: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
