/* ==========================================================================
   1. VARIABLES, RESET Y ACCESIBILIDAD
   ========================================================================== */
:root {
  /* Colores de la versión refinada (V5) */
  --paper: #f5efe4;
  --white: #fffaf2;
  --ink: #171717;
  --muted: #6a6258;
  --line: #cbbda9;
  --accent: #8e2237;
  --accent2: #1f4f64;
  --gold: #b9893d;
  --olive: #52643a;

  /* Layout */
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.58;
}

img {
  max-width: 100%;
  display: block;
}

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

/* Accesibilidad: Foco visible solo para navegación por teclado (Tab) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}


/* ==========================================================================
   2. COMPONENTES GLOBALES (Header, Nav, Footer, Botones, Formularios)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(245, 239, 228, .97), rgba(255, 250, 242, .97));
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .04);
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(23, 23, 23, .12);
}

.brand-name {
  font-family: Georgia, serif;
  font-size: 24px;
  letter-spacing: .03em;
}

nav {
  display: flex;
  gap: 17px;
  align-items: center;
  font-size: 13px;
}

nav a:hover {
  opacity: .55;
}

.menu-btn {
  display: none;
  border: 0;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.btn {
  display: inline-block;
  padding: 14px 18px;
  border: 1px solid var(--ink);
  background: transparent;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  cursor: pointer;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.form {
  display: grid;
  gap: 15px;
}

label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  background: transparent;
  font: inherit;
  margin-top: 6px;
}

input[type=file] {
  padding: 10px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}

.check input {
  width: auto;
  margin-top: 4px;
}

.contact-strip {
  background: var(--ink);
  color: #fff;
  padding: 18px 0;
  font-size: 14px;
}

.contact-strip .container {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.contact-strip a {
  text-decoration: underline;
}

.site-footer {
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 20px;
}

.footer-grid small:last-child {
  text-align: right;
}
.footer-grid small a:hover {
  font-weight: bold;
}

/* ==========================================================================
   3. ESTRUCTURA Y LAYOUT (Containers, Grids semánticos)
   ========================================================================== */
.container {
  width: min(var(--max), calc(100% - 40px));
  margin: auto;
}

.hero-grid,
.two-col,
.contact-grid {
  display: grid;
  grid-template-columns: 1.28fr .72fr;
  gap: 72px;
  align-items: center;
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--white);
}

.dark {
  background: var(--ink);
  color: #f7f2e8;
}

.hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 38px 0;
}

.statement {
  padding: 70px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.page-head {
  padding: 78px 0 52px;
  border-bottom: 1px solid var(--line);
}

.page-head p {
  max-width: 760px;
}


/* ==========================================================================
   4. TIPOGRAFÍA Y COMPONENTES ESPECÍFICOS (Colecciones, Tarjetas)
   ========================================================================== */
h1,
h2,
h3 {
  font-family: Georgia, serif;
  font-weight: 500;
}

h1 {
  font-size: clamp(58px, 8vw, 112px);
  line-height: .9;
  letter-spacing: -.05em;
  margin: 0;
}

h2 {
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1;
  letter-spacing: -.03em;
  margin: 0;
}

h3 {
  font-size: 28px;
  line-height: 1.1;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .22em;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 20px;
}

.lead {
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1.4;
  max-width: 760px;
  margin: 30px 0;
}

.muted {
  color: var(--muted);
}

.hero {
  padding: 92px 0 110px;
  background:
    radial-gradient(circle at 85% 18%, rgba(185, 137, 61, .16), transparent 30%),
    radial-gradient(circle at 12% 78%, rgba(31, 79, 100, .10), transparent 34%),
    linear-gradient(180deg, #f7f1e7 0%, #f2e8da 100%);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.hero .seal-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), rgba(185, 137, 61, .08) 55%, transparent 72%);
}

.seal {
  width: min(245px, 58vw);
  border-radius: 50%;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .13);
}

/* Rejilla de colecciones (V5) */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 44px;
  gap: 18px;
}

.collection {
  position: relative;
  border: 1px solid rgba(23, 23, 23, .12);
  padding: 28px;
  min-height: 190px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .24));
  box-shadow: 0 12px 26px rgba(0, 0, 0, .04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.collection:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, .08);
  border-color: var(--accent);
}

.collection::after {
  content: "Ver colección →";
  position: absolute;
  left: 28px;
  bottom: 22px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.collection-link {
  display: block;
  height: 100%;
}

.collection h3 {
  margin: 0 0 8px 0;
}

.collection p {
  font-size: 14px;
  color: var(--muted);
  padding-bottom: 30px;
}

/* Páginas de detalle */
.collection-detail-head {
  padding: 84px 0 46px;
  background: linear-gradient(135deg, #f6ecdf, #efe0cf);
  border-bottom: 1px solid var(--line);
}

.collection-detail-head .tag {
  display: inline-block;
  padding: 8px 11px;
  border: 1px solid currentColor;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 10px;
  margin-bottom: 18px;
}

/* Tarjetas de Autores / Obras */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 38px;
}

.work-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .45);
  padding: 18px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.work-card h3 {
  font-size: 22px;
  margin: 16px 0 6px;
}

.work-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.work-placeholder {
  aspect-ratio: 2/3;
  background: linear-gradient(145deg, #e9dfd1, #f8f3eb);
  border: 1px dashed #aa9d8a;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-family: Georgia, serif;
}

/* Libros portada clásica */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 44px;
}

.card {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.book-cover {
  aspect-ratio: 2/3;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
}

.book-cover small {
  letter-spacing: .14em;
  font-size: 9px;
}

.book-cover strong {
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: .95;
  margin-top: 48%;
}

.book-cover em {
  font-family: Georgia, serif;
  font-size: 18px;
  margin-top: 8px;
}

.c1 {
  background: #7a2431;
  color: #fff;
}

.c2 {
  background: #d7ccb2;
}

.c3 {
  background: #222;
  color: #f4efe4;
}

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 38px;
}

.step {
  border-top: 1px solid currentColor;
  padding-top: 14px;
}

.step b {
  font-family: Georgia, serif;
  font-size: 21px;
}

.note {
  padding: 18px;
  border-left: 3px solid var(--accent);
  background: rgba(122, 36, 49, .05);
  font-size: 14px;
}

.legal {
  max-width: 850px;
}

.legal h2 {
  font-size: 34px;
  margin-top: 42px;
}

.legal h3 {
  font-size: 24px;
  margin-top: 30px;
}

.notice {
  font-size: 13px;
  color: var(--muted);
}


/* ==========================================================================
   5. RESPONSIVE Y MEDIA QUERIES
   ========================================================================== */

/* Tablets (pantallas menores a 920px) */
@media(max-width: 920px) {
  nav {
    display: none;
    position: absolute;
    top: 100%;
    /* Cae justo debajo del header */
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 20px;
    flex-direction: column;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  }

  nav.open {
    display: flex;
  }

  .menu-btn {
    display: block;
  }

  .hero-grid,
  .two-col,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .collection-grid,
  .cards,
  .works-grid,
  .process {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Móviles (pantallas menores a 580px) */
@media(max-width: 580px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .collection-grid,
  .cards,
  .works-grid,
  .process,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid small:last-child {
    text-align: left;
  }

  .brand-name {
    font-size: 20px;
  }
}