:root {
  --papel: #f7f1e8;
  --tinta: #211b17;
  --suave: #6d6056;
  --linea: #ded2c2;
  --tarjeta: #fffaf3;
  --acento: #a84f16;
  --acento-suave: #f3d9bf;
}

* { box-sizing: border-box; }

html { background: var(--papel); }

body {
  margin: 0;
  color: var(--tinta);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

a { color: inherit; }

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.6rem 1.5rem 0;
}

.brand {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.top__tag {
  margin: 0;
  color: var(--suave);
  font-size: 0.9rem;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--acento);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  max-width: 18ch;
  margin: 0 0 1rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 46ch;
  margin: 0;
  color: var(--suave);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.2rem;
  margin-top: 3rem;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 15rem;
  padding: 1.5rem;
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 1.1rem;
  transition: transform 160ms ease, border-color 160ms ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  border-color: var(--acento);
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.card__cat {
  margin: 0;
  color: var(--suave);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge {
  padding: 0.2rem 0.55rem;
  background: var(--acento-suave);
  border-radius: 99px;
  color: #6b3510;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card__title {
  margin: 0.9rem 0 0.5rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1.1;
}

.card__title a { text-decoration: none; }
.card__title a:focus-visible,
.card__link:focus-visible,
.boton:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--acento);
  outline-offset: 4px;
}

.card__text {
  margin: 0 0 1.4rem;
  color: var(--suave);
  font-size: 0.98rem;
}

.card__link {
  margin-top: auto;
  color: var(--acento);
  font-weight: 700;
  text-decoration: none;
}

.card__link:hover { text-decoration: underline; }

.nota {
  margin: 2.2rem 0 0;
  color: var(--suave);
  font-size: 0.88rem;
}

.pie {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--linea);
  color: var(--suave);
  font-size: 0.82rem;
}

.pie p { margin: 0; }

.error {
  max-width: 40rem;
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.boton {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  background: var(--tinta);
  border-radius: 99px;
  color: var(--papel);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 520px) {
  main { padding-top: 3rem; }
  .top { padding-top: 1.2rem; }
  .top__tag { display: none; }
}
