:root {
    --cream: #f5f0e8;
    --forest: #1a3a2a;
    --sage: #4a7c59;
    --amber: #c8782a;
    --warm-white: #faf8f4;
    --charcoal: #2a2a2a;
    --card-shadow: 0 20px 60px rgba(26,58,42,0.15);
  }
 /* 
  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    background-color: var(--warm-white);
    font-family: 'DM Sans', sans-serif;
    color: var(--charcoal);
    min-height: 100vh;
  }
  ── */

  /* ── Section Header ── */
  .section-header {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 40px 40px;
  }

  .section-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 8px;
  }

  .section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 900;
    line-height: 0.9;
    color: var(--forest);
    letter-spacing: -2px;
  }

  .section-title span { color: var(--amber); }

  .header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--sage), transparent);
    margin-bottom: 12px;
  }

  /* ── Grid ── */
  .publications-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 340px));
    gap: 32px;
    justify-content: center;
  }

  /* ── Card ── */
  .pub-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    aspect-ratio: 3/5;
    background: var(--forest); /* fallback si la imagen no carga */
    transition: box-shadow 0.4s ease;
  }

  .pub-card:hover {
    box-shadow: 0 30px 80px rgba(26,58,42,0.28);
  }

  .pub-card .cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;          /* recorta y llena la tarjeta */
    object-position: center top; /* ajusta el punto focal: center, top, bottom */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.6s ease;
    filter: brightness(0.88);

    will-change: transform;
  }

  .pub-card:hover .cover {
    transform: scale(1.06);
    filter: brightness(0.55);
  }


  .pub-card:focus-within::before,
  .pub-card:hover::before { transform: scaleY(1); }

  .pub-card:focus-within::after,
  .pub-card:hover::after { opacity: 0; }

  .pub-card:focus-within .overlay,
  .pub-card:hover .overlay { opacity: 1; }

  .pub-card:focus-within .overlay-category,
  .pub-card:hover .overlay-category { opacity: 1; transform: translateY(0); }

  .pub-card:focus-within .overlay-title,
  .pub-card:hover .overlay-title { opacity: 1; transform: translateY(0); }

  .pub-card:focus-within .overlay-desc,
  .pub-card:hover .overlay-desc { opacity: 1; transform: translateY(0); }

  .pub-card:focus-within .btn-download,
  .pub-card:hover .btn-download { opacity: 1; transform: translateY(0); }

  .pub-card:focus-within .card-number,
  .pub-card:hover .card-number { color: rgba(255,255,255,0.7); }




  /* Spine accent */
  .pub-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: var(--amber);
    z-index: 3;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .pub-card:hover::before { transform: scaleY(1); }

  /* Gradiente permanente en la parte baja (para leer el número) */
  .pub-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,28,18,0.55) 0%, transparent 45%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .pub-card:hover::after { opacity: 0; }

  /* ── Overlay hover ── */
  .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(10,28,18,0.97) 0%,
      rgba(10,28,18,0.88) 50%,
      rgba(10,28,18,0.45) 100%
    );
    opacity: 0;
    transition: opacity 0.45s ease;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px 28px 28px;
  }

  .pub-card:hover .overlay { opacity: 1; }

  /* Overlay content — animaciones escalonadas */
  .overlay-category {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease 0.08s, transform 0.4s ease 0.08s;
  }

  .pub-card:hover .overlay-category { opacity: 1; transform: translateY(0); }

  .overlay-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease 0.14s, transform 0.4s ease 0.14s;
  }

  .pub-card:hover .overlay-title { opacity: 1; transform: translateY(0); }

  .overlay-desc {
    font-size: 13.5px;
    font-weight: 300;
    line-height: 1.65;
    color: rgba(255,255,255,0.75);
    margin-bottom: 22px;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
  }

  .pub-card:hover .overlay-desc { opacity: 1; transform: translateY(0); }

  .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--amber);
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
    align-self: flex-start;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease 0.26s,
                transform 0.4s ease 0.26s,
                background 0.2s ease;
  }

  .pub-card:hover .btn-download { opacity: 1; transform: translateY(0); }
  .btn-download:hover { background: #a86020; }

  .btn-download svg { width: 15px; height: 15px; flex-shrink: 0; }

  /* Número de tarjeta */
  .card-number {
    position: absolute;
    top: 16px;
    right: 16px;
    font-family: 'Playfair Display', serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    z-index: 4;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
  }

  .pub-card:hover .card-number { color: rgba(255,255,255,0.7); }

  /* Tarjeta destacada */
  .pub-card.featured {
    grid-column: span 2;
    aspect-ratio: 16/9;
  }

  .pub-card.featured .overlay-title { font-size: 28px; }
  .pub-card.featured .overlay-desc  { max-width: 520px; }

  @media (max-width: 720px) {
    body { padding: 40px 20px; }
    .pub-card.featured { grid-column: span 1; aspect-ratio: 3/4; }
    .pub-card.featured .overlay-title { font-size: 20px; }
  }

   /* ── FOOTER ── */
   .footer {
      background: #ffffff;
      border-top: 1px solid #e3d5bb;
      padding: 48px 24px 32px;
    }
 
    .footer__inner {
      max-width: 860px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0;
    }
 
    /* Logo */
    .footer__logo img {
      height: 64px;
      display: block;
    }
    .footer__logo img:first-child {
      height: 100px;
    }
    .footer__logo {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      gap: 10px;
      width: 100%;
    }
 
    /* Divisor dorado */
    .footer__divider {
      width: 56px;
      height: 1.5px;
      background: linear-gradient(90deg, transparent, #c9a84c, transparent);
      margin: 20px 0;
    }
 
    /* Fila de contacto */
    .footer__contact {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 32px;
      margin-bottom: 20px;
    }
 
    .footer__contact a {
      display: flex;
      align-items: center;
      gap: 8px;
      text-decoration: none;
      color: #5a4830;
      font-size: 13px;
      letter-spacing: 0.4px;
      transition: color 0.2s;
    }
 
    .footer__contact a:hover {
      color: #b8912a;
    }
 
    .footer__contact a svg {
      flex-shrink: 0;
      color: #c9a84c;
    }
 
    /* Separador puntitos entre links */
    .footer__contact-sep {
      color: #c9a84c;
      font-size: 18px;
      line-height: 1;
      align-self: center;
    }
 
    /* Derechos */
    .footer__rights {
      font-size: 11.5px;
      color: #a89070;
      letter-spacing: 0.6px;
      text-align: center;
    }
 
    /* Responsive: ocultar separador en móvil */
    @media (max-width: 500px) {
      .footer__contact-sep {
        display: none;
      }
 
      .footer__contact {
        flex-direction: column;
        align-items: center;
        gap: 14px;
      }
    }
    @media (max-width: 720px) {
        /* lo que ya tenías... */
        .publications-grid {
          grid-template-columns: 1fr;
        }
      }