:root {
  color-scheme: light;
  --ink: #1b3028;
  --pine: #19362c;
  --pine-deep: #142b23;
  --rust: #a1402c;
  --gold: #edba78;
  --muted: #50594d;
  --paper: #f8f5ed;
  --cream: #fcfaf5;
  --line: #ded8c9;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 1.25rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
[hidden] { display: none !important; }

h1, h2, h3, p { margin: 0; }

.wrap { width: min(72rem, calc(100% - 6rem)); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-200%);
  padding: 0.65rem 1rem;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  border-top: 3px solid var(--gold);
  background: var(--pine-deep);
  color: var(--cream);
}

.header-inner {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  color: var(--cream);
  font: 700 1.38rem/1.1 var(--serif);
  letter-spacing: -0.035em;
  text-decoration: none;
  white-space: nowrap;
}

.brand img { width: 2.25rem; height: 2.25rem; }
.brand span span { color: var(--gold); }

.site-nav, .footer-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.15rem, 2.8vw, 2.5rem);
  font-size: 0.9rem;
  font-weight: 650;
}

.site-nav a, .footer-nav a { text-decoration: none; }
.site-nav a:hover, .footer-nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.site-nav a[aria-current] { color: var(--gold); }

.nav-cta {
  padding: 0.5rem 0.8rem;
  border: 1px solid #768271;
  border-radius: 5px;
  white-space: nowrap;
}

.site-nav .nav-cta:hover { color: var(--gold); border-color: var(--gold); text-decoration: none; }

.hero {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, #f8f5ed00, #f8f5ed 75%),
    radial-gradient(circle, #95876f35 0.75px, transparent 1px);
  background-size: 100% 100%, 16px 16px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: clamp(2.5rem, 5.2vw, 5rem);
  padding-block: clamp(2.5rem, 4.25vw, 4.25rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  color: var(--rust);
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.hero .eyebrow::before {
  content: '';
  width: 1.6rem;
  border-top: 2px solid currentColor;
}

.hero h1, .article-head h1, .library h2, .article-content h2, .related h2 {
  font-family: var(--serif);
  letter-spacing: -0.055em;
  font-weight: 700;
}

.hero h1 {
  margin: 0.75rem 0 1.25rem;
  font-size: clamp(3.65rem, 7.15vw, 6.5rem);
  line-height: 0.98;
}

.hero h1 em {
  display: block;
  color: var(--rust);
  font-weight: 400;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 27rem;
  color: #435044;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.65;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.55rem 1.1rem;
  border-radius: 5px;
  background: var(--pine);
  color: var(--cream);
  font-weight: 720;
  text-decoration: none;
}

.button:hover { background: #284b3c; }
.button:focus-visible { outline-color: var(--pine); }
.hero .button { margin-top: 1.5rem; }

.feature {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border-radius: 9px;
  aspect-ratio: 1.47;
  background: #60513d;
  box-shadow: 0 8px 22px #43322223;
  color: white;
  text-decoration: none;
}

.feature img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.feature::after {
  position: absolute;
  inset: auto 0 0;
  height: 60%;
  background: linear-gradient(transparent, #152016f2);
  content: '';
}

.feature-label {
  position: relative;
  z-index: 1;
  align-self: end;
  padding: 1rem 1.4rem 1.15rem;
  text-shadow: 0 1px 3px #17241b;
}

.feature-label span {
  display: block;
  margin-bottom: 0.25rem;
  color: #ffce8f;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-label strong { font: 700 clamp(1.2rem, 2.1vw, 1.55rem)/1.18 var(--serif); }
.feature:hover strong { text-decoration: underline; text-underline-offset: 0.17em; }

.library, .related {
  background: var(--cream);
  padding-block: clamp(2.5rem, 3.8vw, 4rem) clamp(3.25rem, 6vw, 5.5rem);
}

.library-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 1.15rem 2.5rem;
  margin-bottom: 1.55rem;
}

.library h2, .related h2 {
  font-size: clamp(2.35rem, 4.15vw, 3.6rem);
  line-height: 1.03;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.filters a {
  padding: 0.32rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.filters a:hover { border-color: var(--pine); }

.filters a[aria-current] {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--cream);
}

.filters a:focus-visible { outline-color: var(--pine); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}

.card > img {
  width: 100%;
  aspect-ratio: 1.8;
  height: auto;
  object-fit: cover;
  border-radius: 7px 7px 0 0;
  background: #e7dcc8;
}

.card-body { padding: 1.05rem 1.15rem 1.3rem; }

.badge {
  display: inline-block;
  width: fit-content;
  padding: 0.21rem 0.55rem;
  border-radius: 3px;
  background: #f0dfd5;
  color: #873f2f;
  font-size: 0.77rem;
  line-height: 1.45;
  font-weight: 800;
}

[data-category="reutilizacion"] .badge {
  background: #f4e7cb;
  color: #684716;
}

[data-category="jardin"] .badge { background: #e1eadd; color: #30563c; }

.card h3 {
  margin-top: 0.52rem;
  font: 700 clamp(1.25rem, 2.1vw, 1.61rem)/1.17 var(--serif);
  letter-spacing: -0.035em;
}

.card h3 a { text-decoration: none; }
.card h3 a::after { position: absolute; inset: 0; border-radius: 8px; content: ''; }
.card h3 a:focus-visible { outline: none; }
.card:focus-within { outline: 2px solid var(--pine); outline-offset: 4px; }
.card:hover { border-color: #8b9989; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 0.17em; }
.card p { margin-top: 0.5rem; color: var(--muted); font-size: 0.94rem; line-height: 1.53; }

.site-footer {
  padding-block: 2rem;
  background: var(--pine-deep);
  color: var(--cream);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
}

.footer-inner p { margin-top: 0.4rem; color: #e0e7dc; font-size: 0.9rem; }
.footer-nav { align-self: center; flex-wrap: wrap; gap: 0.65rem 1.6rem; }

.breadcrumb {
  display: flex;
  width: fit-content;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 0 1.6rem;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb li + li::before { content: '/'; margin-right: 0.7rem; color: #6c7162; }
.breadcrumb a { text-underline-offset: 0.22em; }
.breadcrumb a:hover { color: var(--rust); }

.article-top {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.4rem, 3vw, 2.3rem) clamp(2.1rem, 5vw, 4.25rem);
}

.article-head {
  display: grid;
  align-items: center;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(1.5rem, 4.7vw, 4rem);
}

.article-head h1 {
  margin: 0.65rem 0 1rem;
  font-size: clamp(2.6rem, 5.05vw, 4.85rem);
  line-height: 1.035;
  text-wrap: balance;
}

.article-head .intro { max-width: 28rem; color: var(--muted); font-size: 1.125rem; }

.article-head > img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.55;
  object-fit: cover;
  border-radius: 9px;
  background: #e7dcc8;
}

.project-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  margin: 1.25rem 0 0;
  font-size: 0.88rem;
}

.project-info div { display: flex; gap: 0.35rem; align-items: baseline; }
.project-info dt { font-weight: 800; }
.project-info dd { margin: 0; color: var(--muted); }

.article-middle { background: var(--cream); }

.article-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 16rem) minmax(0, 43rem);
  justify-content: center;
  align-items: start;
  gap: clamp(2rem, 5vw, 4.75rem);
  padding-block: clamp(2.1rem, 4.5vw, 4rem);
}

.guide-nav {
  position: sticky;
  top: 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}

.guide-nav h2 { font: 700 1.27rem/1.1 var(--serif); }
.guide-nav ul { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.guide-nav li + li { border-top: 1px solid var(--line); }

.guide-nav a {
  display: block;
  padding-block: 0.4rem;
  color: #3e4d41;
  font-size: 0.9rem;
  text-underline-offset: 0.22em;
}

.guide-nav a:hover { color: var(--rust); }

.article-content { font-size: 1.06rem; line-height: 1.75; }
.article-content > * + * { margin-top: 1.8rem; }
.article-content section > * + * { margin-top: 0.75rem; }
.article-content a { text-underline-offset: 0.2em; }
.article-content a:hover { color: var(--rust); }

.article-content h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  line-height: 1.13;
}

.article-content ul, .article-content ol { padding-left: 1.35rem; }
.article-content li + li { margin-top: 0.6rem; }
.article-content li::marker { color: var(--rust); font-weight: 780; }

.materials {
  padding: 1.15rem 1.35rem;
  border: 1px solid #ded4be;
  border-left: 4px solid #b66a49;
  border-radius: 6px;
  background: #f5eee0;
}

.materials ul { margin-bottom: 0; }

.guide-steps { margin-bottom: 0; }
.guide-steps li + li { margin-top: 1rem; }
.guide-steps strong { display: block; }

.article-content .source { font-size: 0.9rem; }

.related { border-top: 1px solid var(--line); }
.related .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 49rem; }
.related h2 { font-size: clamp(2.1rem, 4vw, 3rem); margin-bottom: 1.4rem; }

@media (max-width: 62rem) {
  .wrap { width: calc(100% - 4rem); }
  .hero-inner { gap: 2rem; }
  .hero h1 { font-size: clamp(3.1rem, 7.4vw, 5.5rem); }
  .cards { gap: 1rem; }
}

@media (max-width: 47rem) {
  .wrap { width: calc(100% - 2.5rem); }
  .header-inner { flex-wrap: wrap; gap: 0.6rem 1.2rem; padding-block: 0.7rem; }
  .site-nav { gap: 0.4rem 1.1rem; flex-wrap: wrap; }
  .nav-cta { padding: 0; border: 0; }
  .hero-inner, .article-head { grid-template-columns: 1fr; gap: 1.6rem; }
  .hero-inner { padding-block: 2.2rem 1.75rem; }
  .hero h1 { font-size: clamp(3.15rem, 11vw, 5.25rem); }
  .feature { aspect-ratio: 1.62; }
  .article-head h1 { text-wrap: wrap; }
  .article-head > img { aspect-ratio: 1.62; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-nav { position: static; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 30rem) {
  .wrap { width: calc(100% - 2rem); }
  .site-nav { gap: 0.45rem 1.4rem; width: 100%; font-size: 0.875rem; }
  .site-nav .nav-cta { display: none; }
  .feature-label { padding: 0.75rem 0.85rem; }
  .hero-copy > p:not(.eyebrow) { line-height: 1.55; }
  .cards, .related .cards { grid-template-columns: minmax(0, 1fr); }
  .library-head { margin-bottom: 1.15rem; }
  .card > img { aspect-ratio: 1.82; }
}

@media (forced-colors: active) {
  .feature-label { background: Canvas; color: CanvasText; text-shadow: none; }
  .feature-label span { color: CanvasText; }
  .filters a[aria-current] { outline: 2px solid Highlight; }
}
