/* ===== Jordi Rico Jordán · estilos públicos ===== */
:root {
  --ink: #0c0c0d;
  --ink-2: #161618;
  --paper: #f6f5f2;
  --paper-2: #ecebe6;
  --text: #1b1b1c;
  --muted: #6d6b66;
  --light: #e9e7e2;
  --line-dark: rgba(255, 255, 255, 0.28);
  --line-light: rgba(0, 0, 0, 0.18);
  --script: 'Great Vibes', 'Pinyon Script', cursive;
  --serif: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --body: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --wrap: 1180px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- fondos ----- */
.dark {
  background-color: var(--ink);
  background-image: var(--grain), radial-gradient(ellipse at 50% 30%, #222225 0%, #0c0c0d 70%);
  color: var(--light);
}
.light { background: var(--paper); color: var(--text); }

/* ----- monograma ----- */
.mono {
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-family: var(--script);
  line-height: 1;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.mono span { transform: translateY(6%); }

/* ----- cabecera ----- */
.site-header {
  position: relative;
  z-index: 20;
  color: #fff;
}
.site-header.over { position: absolute; inset: 0 0 auto 0; }
.site-header:not(.over) { background: var(--ink); background-image: var(--grain); }
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  width: min(1480px, 100% - 40px);
  margin-inline: auto;
}
.site-header .mono { width: 76px; height: 76px; font-size: 25px; border-width: 1.5px; }
.nav { display: flex; gap: clamp(18px, 3vw, 58px); list-style: none; margin: 0; padding: 0; }
.nav a {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  opacity: 0.92;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.nav a:hover::after,
.nav a.active::after { transform: scaleX(1); }
.social { display: flex; gap: 22px; align-items: center; }
.social a { display: inline-flex; opacity: 0.92; transition: opacity 0.2s; }
.social a:hover { opacity: 1; }
.social svg { width: 24px; height: 24px; }
.menu-btn { display: none; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; }
.menu-btn svg { width: 30px; height: 30px; }

/* ----- hero ----- */
.hero {
  position: relative;
  min-height: max(760px, 100vh);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 140px 20px 200px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.hero.has-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 12, 13, 0.55), rgba(12, 12, 13, 0.7));
}
.hero-inner { position: relative; z-index: 1; }
.hero .mono { width: 190px; height: 190px; font-size: 62px; margin: 0 auto 6px; border-width: 4px; }
.hero h1 {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3.4rem, 9vw, 8.4rem);
  line-height: 1.15;
  margin: 0;
  color: #fff;
  letter-spacing: 0.01em;
}
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 4px auto 10px;
  width: min(580px, 90%);
}
.divider::before,
.divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-dark)); }
.divider::after { background: linear-gradient(-90deg, transparent, var(--line-dark)); }
.divider i { width: 11px; height: 11px; border: 1.5px solid #cfcfcf; transform: rotate(45deg); position: relative; }
.divider i::after { content: ''; position: absolute; inset: 2.5px; background: #cfcfcf; }
.light .divider::before { background: linear-gradient(90deg, transparent, var(--line-light)); }
.light .divider::after { background: linear-gradient(-90deg, transparent, var(--line-light)); }
.light .divider i { border-color: #555; }
.light .divider i::after { background: #555; }
.role {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  letter-spacing: 0.62em;
  text-transform: uppercase;
  margin: 0 0 24px 0.62em;
  color: #e8e8e8;
}
.quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.3vw, 1.95rem);
  line-height: 1.35;
  margin: 0 0 34px;
  color: #ececec;
  white-space: pre-line;
}
.btn {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 34px;
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.dark .btn:hover { background: #fff; color: var(--ink); }
.light .btn:hover { background: var(--ink); color: #fff; }
.btn.small { font-size: 1rem; padding: 10px 22px; }

/* ----- bordes rasgados ----- */
.torn { position: relative; }
.torn::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -98px;
  height: 140px;
  background: url(/img/torn-light.svg) center bottom / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 2;
}
.torn.to-dark::before { background-image: url(/img/torn-dark.svg); }

/* ----- secciones ----- */
section { position: relative; }
.section { padding: 90px 0 110px; }
.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 14px;
  line-height: 1.1;
}
.h2 + .rule { width: 112px; height: 1.5px; background: currentColor; opacity: 0.7; margin: 0 0 28px; }
.center { text-align: center; }
.center .rule { margin-inline: auto; }
.lead { font-size: 1.28rem; line-height: 1.6; }

/* Sobre mí (portada) */
.about { padding: 70px 0 0; overflow-x: clip; }
.about-grid { display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; min-height: 380px; }
.about-text { padding: 30px 0 80px; max-width: 560px; z-index: 3; position: relative; }
.about-text .h2 { text-align: center; }
.about-text .rule { margin-inline: auto; }
.about-img { align-self: stretch; position: relative; margin-right: calc((100vw - min(var(--wrap), 100vw - 40px)) / -2); }
.about-img img { width: 100%; height: 100%; object-fit: cover; object-position: left center; min-height: 380px; }
.about-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--paper) 0%, rgba(246, 245, 242, 0.6) 14%, rgba(246, 245, 242, 0) 35%),
    linear-gradient(180deg, var(--paper) 0%, rgba(246, 245, 242, 0) 22%);
}
.link-arrow { font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* Libros */
.books-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 270px)); justify-content: center; gap: 48px 36px; margin-top: 40px; }
.book-card { text-decoration: none; display: block; }
.book-card:hover .cover { transform: translateY(-6px); box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45); }
.cover {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  background: #222;
}
.cover-fallback {
  aspect-ratio: 2 / 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 14% 10%;
  color: #eee;
  background-color: #141415;
  background-image: var(--grain), linear-gradient(160deg, #2a2a2d, #0d0d0e);
  outline: 1px solid rgba(255, 255, 255, 0.18);
  outline-offset: -12px;
}
.cover-fallback .t { font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.15; }
.cover-fallback .a { font-family: var(--serif); letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.8rem; opacity: 0.8; }
.book-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; margin: 20px 0 2px; line-height: 1.2; }
.book-card .meta { color: #a9a7a2; font-size: 1rem; }
.light .book-card .meta { color: var(--muted); }

/* Entradas */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.post-list { display: grid; gap: 30px; }
.post-item { display: grid; grid-template-columns: 130px 1fr; gap: 22px; text-decoration: none; align-items: start; }
.post-item.no-img { grid-template-columns: 1fr; }
.post-item img { width: 130px; height: 100px; object-fit: cover; filter: grayscale(0.4); }
.post-item h3 { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; margin: 0 0 4px; line-height: 1.2; }
.post-item:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.post-item p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.date { font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; display: block; }
.dark .date { color: #9d9b96; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 46px 38px; }
.card { text-decoration: none; display: flex; flex-direction: column; }
.card .img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--ink); background-image: var(--grain); margin-bottom: 18px; display: grid; place-items: center; }
.card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .img img { transform: scale(1.04); }
.card .img .mono { width: 70px; height: 70px; font-size: 23px; color: #bbb; border-width: 1.5px; }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; line-height: 1.2; margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); }

/* Cabecera de páginas interiores */
.page-head { padding: 170px 20px 150px; text-align: center; }
.page-head .script { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.8rem); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.15; margin: 0; color: #fff; font-weight: 400; }
.page-head p { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: #dcdcdc; margin: 6px 0 0; }

/* Artículo */
.article { max-width: 760px; margin: 0 auto; }
.article h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.3rem, 4.5vw, 3.6rem); line-height: 1.1; margin: 0 0 16px; }
.article .hero-img { width: 100%; max-height: 520px; object-fit: cover; margin: 34px 0; }
.prose { font-size: 1.22rem; line-height: 1.75; }
.prose h2, .prose h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 1.8em 0 0.5em; }
.prose h2 { font-size: 2rem; }
.prose h3 { font-size: 1.6rem; }
.prose blockquote { margin: 1.6em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 2px solid var(--ink); font-family: var(--serif); font-style: italic; font-size: 1.45rem; }
.prose img { margin: 1.6em auto; height: auto; }
.prose a { text-underline-offset: 3px; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }
.prose li[data-list='bullet'] { list-style-type: disc; }
.prose .ql-ui { display: none; }
.back { font-family: var(--serif); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.95rem; text-decoration: none; color: var(--muted); }

/* Ficha de libro */
.book-detail { display: grid; grid-template-columns: 360px 1fr; gap: 70px; align-items: start; }
.book-detail .cover, .book-detail .cover-fallback { position: sticky; top: 30px; }
.book-detail h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 4.5vw, 3.6rem); line-height: 1.1; margin: 0; }
.book-detail .sub { font-family: var(--serif); font-size: 1.4rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 8px 0 26px; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; margin: 28px 0; padding: 22px 0; border-block: 1px solid var(--line-light); font-size: 1.05rem; }
.specs dt { font-family: var(--serif); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-size: 0.95rem; }
.specs dd { margin: 0; }

/* Paginación */
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 60px; font-family: var(--serif); }
.pager a, .pager span { padding: 8px 15px; border: 1px solid var(--line-light); text-decoration: none; }
.pager .cur { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Contacto */
.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-family: var(--serif); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.95rem; }
.form input, .form textarea {
  font: inherit;
  font-size: 1.1rem;
  letter-spacing: 0;
  text-transform: none;
  padding: 12px 14px;
  border: 1px solid #c9c7c1;
  background: #fff;
  color: var(--text);
  border-radius: 0;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.form textarea { min-height: 180px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border: 1px solid; margin-bottom: 22px; }
.notice.ok { border-color: #2f6b3a; color: #1f4f28; background: #eef5ef; }
.notice.err { border-color: #8a2b2b; color: #6b1f1f; background: #f8eeee; }
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 70px; }

/* Pie */
.site-footer { padding: 110px 0 40px; text-align: center; }
.site-footer .mono { width: 92px; height: 92px; font-size: 30px; margin: 0 auto 18px; color: #fff; border-width: 2px; }
.site-footer .name { font-family: var(--script); font-size: 2.6rem; color: #fff; margin: 0; line-height: 1.2; }
.site-footer .nav { justify-content: center; flex-wrap: wrap; margin: 30px 0; gap: 14px 34px; }
.site-footer .nav a { font-size: 1rem; }
.site-footer .social { justify-content: center; margin-bottom: 30px; }
.site-footer small { color: #8c8a85; font-size: 0.95rem; }

.empty { text-align: center; color: var(--muted); font-style: italic; padding: 30px 0; }

/* ----- animaciones suaves ----- */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * { animation: rise 1s ease both; }
  .hero-inner > *:nth-child(2) { animation-delay: 0.12s; }
  .hero-inner > *:nth-child(3) { animation-delay: 0.24s; }
  .hero-inner > *:nth-child(4) { animation-delay: 0.36s; }
  .hero-inner > *:nth-child(5) { animation-delay: 0.48s; }
  .hero-inner > *:nth-child(6) { animation-delay: 0.6s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ----- responsive ----- */
@media (max-width: 1000px) {
  .menu-btn { display: inline-flex; }
  .site-header .bar { flex-wrap: wrap; }
  .site-header .mono { width: 60px; height: 60px; font-size: 20px; }
  .nav-wrap { display: none; width: 100%; order: 3; }
  .nav-wrap.open { display: block; }
  .nav { flex-direction: column; gap: 4px; padding: 10px 0 20px; }
  .nav a { display: block; font-size: 1.3rem; }
  .site-header.over .nav-wrap.open { background: rgba(12, 12, 13, 0.96); margin: 0 -20px; padding: 0 20px; }
  .social { margin-left: auto; gap: 16px; }
  .cols-2, .contact-grid, .book-detail { grid-template-columns: 1fr; gap: 50px; }
  .book-detail .cover, .book-detail .cover-fallback { position: static; max-width: 320px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-text { padding-bottom: 20px; max-width: none; }
  .about-img { margin: 0 -20px; }
  .about-img img { min-height: 260px; }
}
@media (max-width: 600px) {
  body { font-size: 1.06rem; }
  .hero { padding: 120px 16px 170px; min-height: 680px; }
  .hero .mono { width: 130px; height: 130px; font-size: 42px; border-width: 3px; }
  .role { letter-spacing: 0.4em; }
  .wrap { width: calc(100% - 32px); }
  .form .row { grid-template-columns: 1fr; }
  .post-item { grid-template-columns: 96px 1fr; gap: 16px; }
  .post-item img { width: 96px; height: 80px; }
  .torn::before { height: 90px; top: -62px; }
  .social svg { width: 21px; height: 21px; }
}

/* Monograma: la "J" caligráfica es muy ancha; se reduce para que quepa en el círculo */
.mono span { font-size: .8em; letter-spacing: -.04em; transform: translate(-3%, 6%); }

/* ===== Tipografía exacta del diseño =====
   El nombre y el monograma JRJ son la caligrafía original del diseño, vectorizada
   (public/img/firma-nombre.svg y firma-jrj.svg). Se pintan con máscara CSS, así
   heredan el color del texto. El texto real se mantiene para Google y lectores de pantalla.
   Si se cambia el nombre en el panel, se usa la fuente caligráfica de respaldo. */
.has-firma .mono > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.has-firma .mono::after {
  content: '';
  width: 84%;
  aspect-ratio: 991 / 398;
  background: currentColor;
  -webkit-mask: url(/img/firma-jrj.svg) center / contain no-repeat;
  mask: url(/img/firma-jrj.svg) center / contain no-repeat;
}
.has-firma .firma { font-size: 0 !important; line-height: 0 !important; color: inherit; }
.has-firma .firma::after {
  content: '';
  display: block;
  margin: 0 auto;
  width: var(--fw, 100%);
  max-width: 100%;
  aspect-ratio: 6317 / 825;
  background: currentColor;
  -webkit-mask: url(/img/firma-nombre.svg) center / contain no-repeat;
  mask: url(/img/firma-nombre.svg) center / contain no-repeat;
}
.has-firma .hero h1.firma { --fw: min(1000px, 86vw); color: #fff; margin: 18px 0 14px; }
.has-firma .site-footer .firma { --fw: min(360px, 80vw); color: #fff; margin: 6px 0 4px; }
.hero .mono { border-width: 3px; }
/* Ajustes de texto según el diseño */
.nav a { font-size: 1.2rem; letter-spacing: 0.04em; font-weight: 400; }
.quote { font-weight: 400; }
.btn { font-weight: 400; letter-spacing: 0.08em; }
.h2 { font-weight: 400; letter-spacing: 0.05em; }
/* Proporciones del diseño (medidas sobre el mockup a 1600 px) */
.nav a { font-size: clamp(1.15rem, 1.45vw, 1.5rem); }
.hero { min-height: 0; padding: clamp(110px, 11vw, 130px) 20px clamp(150px, 14vw, 210px); }
.has-firma .hero h1.firma { --fw: min(1060px, 88vw); margin: 16px 0 8px; }
.role { font-size: clamp(1.2rem, 1.9vw, 1.95rem); margin-bottom: 30px; }
.quote { font-size: clamp(1.35rem, 2.05vw, 2.15rem); line-height: 1.3; margin-bottom: 40px; }
.hero .btn { font-size: clamp(1.15rem, 1.75vw, 1.8rem); padding: 0.55em 1.3em; letter-spacing: 0.07em; }
.about .h2 { font-size: clamp(2rem, 2.6vw, 2.6rem); }
.about .lead { font-size: clamp(1.2rem, 1.45vw, 1.5rem); }
.hero { padding-bottom: clamp(120px, 9vw, 150px); }

/* ===== Novedades: idioma, «Tu historia», lista de correo ===== */
.lang { display: inline-flex; align-items: center; gap: 6px; font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0.08em; margin-left: 6px; }
.lang a { text-decoration: none; opacity: 0.6; padding: 2px 2px; border-bottom: 1px solid transparent; }
.lang a:hover { opacity: 1; }
.lang a.on { opacity: 1; border-bottom-color: currentColor; }
.lang span { opacity: 0.4; }
.site-footer .lang { justify-content: center; margin: 0 0 22px; }

.section-quote { font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 1.9vw, 1.7rem); color: #d9d7d2; max-width: 760px; margin: -6px auto 10px; line-height: 1.35; }

.story { padding: 110px 0 60px; text-align: center; }
.story-inner { max-width: 820px; display: grid; justify-items: center; gap: 22px; }
.story-inner .divider { width: min(420px, 80%); margin: 0; }
.story-title { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: 1.2; margin: 0; text-wrap: balance; }
.story-title.left { text-align: left; margin-bottom: 18px; }
.story .lead { max-width: 640px; margin: 0; color: #3b3a37; }
.story .btn { margin-top: 6px; }
.posts-home { padding-top: 70px; border-top: 1px solid var(--line-light); }
.muted-note { color: var(--muted); font-style: italic; border-left: 2px solid var(--line-light); padding-left: 14px; margin-top: 26px; }
.aside-link { margin-top: 30px; }

.newsletter { padding: 120px 0 40px; }
.newsletter.dark { background-color: var(--ink); background-image: var(--grain), radial-gradient(ellipse at 50% 30%, #222225 0%, #0c0c0d 70%); color: var(--light); }
.nl-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }
.nl-row { display: flex; gap: 0; }
.nl-row input { flex: 1; min-width: 0; font: inherit; font-size: 1.15rem; padding: 14px 16px; border: 1.5px solid currentColor; border-right: 0; background: transparent; color: inherit; border-radius: 0; }
.nl-row input::placeholder { color: inherit; opacity: 0.55; }
.nl-row input:focus { outline: 2px solid currentColor; outline-offset: 2px; }
.nl-row .btn { white-space: nowrap; }
.newsletter .lead { color: #cfcdc8; }

.check { display: flex !important; align-items: flex-start; gap: 10px; font-family: var(--body) !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 1rem !important; line-height: 1.45; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--ink); }
.newsletter .check { color: #cfcdc8; margin-top: 14px; }
.newsletter .check input { accent-color: #fff; }
.check a { text-underline-offset: 3px; }
.form select { font: inherit; font-size: 1.1rem; letter-spacing: 0; text-transform: none; padding: 12px 14px; border: 1px solid #c9c7c1; background: #fff; color: var(--text); border-radius: 0; }
.form textarea::placeholder, .form input::placeholder { color: #9a978f; }
.e404 { font-family: var(--serif) !important; font-size: clamp(2.4rem, 5vw, 3.8rem) !important; letter-spacing: 0.08em; text-transform: uppercase; }
.site-footer small a { color: inherit; }

@media (max-width: 1000px) {
  .nl-grid { grid-template-columns: 1fr; gap: 26px; }
  .social .lang { margin-left: 0; }
}
@media (max-width: 600px) {
  .nl-row { flex-direction: column; gap: 10px; }
  .nl-row input { border-right: 1.5px solid currentColor; }
  .story { padding-top: 80px; }
}
.site-footer .lang { display: flex; }
.newsletter { padding-top: 130px; }
.site-footer { padding-top: 90px; }
/* Lista de correo y pie, un solo bloque oscuro sin cortes */
.newsletter.dark, .site-footer.dark { background-image: var(--grain); background-color: #111112; }
.newsletter { padding-bottom: 20px; }

/* ===== Burbujas de redes (Instagram, Facebook, email) ===== */
.social { gap: 12px; }
.bubble {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-grid !important; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff; opacity: 1 !important;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.bubble svg { width: 19px !important; height: 19px !important; }
.bubble:hover, .bubble:focus-visible { background: #fff; color: var(--ink); border-color: #fff; transform: translateY(-2px); }
.light .bubble { border-color: rgba(0, 0, 0, 0.35); color: var(--ink); }
.light .bubble:hover { background: var(--ink); color: #fff; }
.site-footer .bubble { width: 46px; height: 46px; }
.contact-social { display: flex; gap: 12px; margin-top: 26px; }
@media (max-width: 600px) { .bubble { width: 36px; height: 36px; } .bubble svg { width: 16px !important; height: 16px !important; } .social { gap: 8px; } }

/* ===== Retrato del autor (página «Sobre mí») ===== */
.about-grid.with-portrait { grid-template-columns: minmax(260px, 0.8fr) 1.2fr; gap: 70px; align-items: start; }
.portrait { margin: 0; position: relative; }
.portrait::before { content: ''; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--line-light); z-index: 0; }
.portrait img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18); }
.portrait figcaption { margin-top: 30px; font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 1000px) {
  .about-grid.with-portrait { grid-template-columns: 1fr; gap: 50px; }
  .portrait { max-width: 380px; }
}
.portrait::before { content: none; }
.portrait-frame { position: relative; }
.portrait-frame::before { content: ''; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--line-light); z-index: 0; }
.portrait figcaption { margin-top: 40px; }
@media (max-width: 1000px) { .site-header .bar { gap: 10px; } }
@media (max-width: 600px) {
  .bubble { width: 34px; height: 34px; }
  .social { gap: 6px; }
  .site-header .lang { font-size: 0.95rem; gap: 4px; }
  .menu-btn { padding: 4px; }
}
.lang-in-menu { display: none; }
@media (max-width: 420px) {
  .social .lang { display: none; }
  .lang-in-menu { display: block; padding: 0 0 18px; }
  .lang-in-menu .lang { margin: 0; font-size: 1.2rem; }
}
.buy-hint { display: inline-block; margin-top: 10px; font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 1px; opacity: 0.85; }
.book-card:hover .buy-hint { opacity: 1; }
