:root {
  --cream: #F6EFE4;
  --paper: #FFFDF9;
  --cocoa: #2B1B14;
  --cocoa-soft: #5B463A;
  --gold: #A8823D;
  --wine: #6E2430;
  --line: #E4D9C6;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.site-header {
  padding: 56px 24px 40px;
  text-align: center;
  animation: fadeDown 0.9s ease both;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.site-header img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: inline-block;
}

.header-rule {
  width: 64px;
  height: 1px;
  background: var(--gold);
  margin: 28px auto 0;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 24px 80px;
}

.intro {
  text-align: center;
  max-width: 480px;
  margin: 0 auto 48px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--cocoa-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover, .card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 14px 30px -18px rgba(43, 27, 20, 0.45);
  transform: translateY(-3px);
}

.card:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }

.card-media {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--cocoa);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.card:hover .card-media img { transform: scale(1.045); }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--cocoa-soft);
  border-top: 1px solid var(--line);
}

.card-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--wine);
  font-weight: 500;
}

.card-dl svg { flex-shrink: 0; }

.site-footer {
  background: var(--cocoa);
  color: var(--cream);
  padding: 42px 24px 36px;
  text-align: center;
}

.site-footer .brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-style: italic;
  margin-bottom: 14px;
  color: var(--cream);
}

.site-footer .legal {
  font-size: 13px;
  line-height: 1.9;
  color: #C9BBAC;
  font-weight: 300;
}

@media (max-width: 480px) {
  .site-header { padding: 40px 20px 32px; }
  .intro { font-size: 19px; }
}

/* ---- Visor de PDF (modal) ---- */

.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pdf-modal.is-open { display: flex; }

.pdf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 27, 20, 0.72);
  backdrop-filter: blur(2px);
}

.pdf-modal__panel {
  position: relative;
  width: min(920px, 100%);
  height: min(86vh, 1000px);
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn 0.25s ease both;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.pdf-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.pdf-modal__title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--cocoa);
}

.pdf-modal__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdf-modal__download,
.pdf-modal__close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--wine);
  padding: 8px 14px;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pdf-modal__download:hover,
.pdf-modal__close:hover {
  border-color: var(--gold);
  background: var(--cream);
}

.pdf-modal__close {
  color: var(--cocoa-soft);
  padding: 8px 10px;
}

.pdf-modal__body {
  flex: 1;
  background: #d9cdbb;
}

.pdf-modal__body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 560px) {
  .pdf-modal { padding: 0; }
  .pdf-modal__panel { width: 100%; height: 100%; border-radius: 0; }
  .pdf-modal__title { font-size: 17px; }
}
