/*
Theme Name: Mercedes Senent García
Author: Mercedes Senent García (con Claude)
Version: 1.0
Description: Tema a medida para la web de la escritora Mercedes Senent García.
*/

:root {
  --paper: #fffaf3;
  --ink: #241f33;
  --grey: #726c85;
  --rule: rgba(36, 31, 51, 0.1);
  --accent1: #ff6b5b;
  --accent2: #ffb648;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', serif;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; }

.label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- TOPBAR ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 5vw;
  background: rgba(255, 250, 243, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar .brand { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.2rem; text-decoration: none; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav ul { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav a {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--grey);
  padding: 9px 15px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s ease, background 0.2s ease;
}
.topbar nav a:hover { color: var(--ink); background: rgba(36, 31, 51, 0.05); }
.topbar nav .current-menu-item a,
.topbar nav .current-menu-parent a,
.topbar nav .current_page_item a {
  color: #fff;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
}
.menu-toggle { display: none; }

main { padding-top: 88px; min-height: 100vh; }

/* ---- CONTENEDOR DE PÁGINA ---- */
.page {
  padding: 50px 5vw 90px;
  max-width: 1150px;
  margin: 0 auto;
  animation: pageIn 0.55s cubic-bezier(.22,1,.36,1);
  position: relative;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

h1, h2 { font-family: 'Fraunces', serif; }

.blob {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.3;
  z-index: -1;
  background: linear-gradient(140deg, var(--accent1), var(--accent2));
}

/* ---- INICIO / HERO ---- */
#inicio { position: relative; padding-top: 90px; }
#inicio .blob { top: -160px; right: -160px; }
.hero-body { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.hero-content { flex: 1; min-width: 0; }
#inicio h1 {
  font-weight: 300; font-style: italic;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.08; margin-top: 16px;
}
#inicio .dek { margin-top: 18px; max-width: 60ch; font-size: 1.05rem; color: var(--grey); }
#inicio .type-line {
  margin-top: 30px; font-family: 'Fraunces', serif; font-size: 1.1rem; font-style: italic;
  padding: 16px 22px; max-width: 46ch; border-radius: 14px;
  background: linear-gradient(120deg, rgba(255,107,91,0.1), rgba(255,182,72,0.1));
  border-left: 3px solid var(--accent1);
}
#inicio .cta-row { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.btn-solid, .btn-ghost {
  font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 600;
  padding: 13px 24px; border-radius: 999px; text-decoration: none; cursor: pointer; border: none; display: inline-block;
}
.btn-solid {
  color: #fff; background: linear-gradient(90deg, var(--accent1), var(--accent2));
  transition: transform 0.2s ease;
  box-shadow: 0 10px 24px -10px rgba(255,107,91,0.6);
}
.btn-solid:hover { transform: translateY(-2px); }
.btn-ghost { color: var(--ink); background: transparent; border: 1.5px solid var(--rule); transition: border-color 0.2s ease; }
.btn-ghost:hover { border-color: var(--accent1); }

.portrait { flex-shrink: 0; width: clamp(280px, 36vw, 440px); position: relative; }
.portrait::before {
  content: ''; position: absolute; inset: -22px -22px 22px 22px;
  background: linear-gradient(150deg, var(--accent1), var(--accent2));
  border-radius: 38% 62% 63% 37% / 41% 38% 62% 59%; opacity: 0.85; z-index: 0;
}
.portrait::after {
  content: ''; position: absolute; inset: -22px -22px 22px 22px;
  border-radius: 38% 62% 63% 37% / 41% 38% 62% 59%;
  border: 1.5px solid rgba(255,255,255,0.6); z-index: 2; pointer-events: none;
}
.portrait img {
  position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block;
  border-radius: 38% 62% 63% 37% / 41% 38% 62% 59%;
  box-shadow: 0 30px 50px -18px rgba(36,31,51,0.4);
}

/* ---- CABECERA DE PÁGINA ---- */
.page-head { margin-bottom: 40px; }
.page-head .label { margin-bottom: 10px; display: block; }
.page-head h2 { font-weight: 600; font-size: 2.1rem; }

/* ---- BIOGRAFÍA ---- */
.bio-grid { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
.bio-portrait { position: relative; width: 100%; }
.bio-portrait img { width: 100%; height: auto; display: block; border-radius: 20px; box-shadow: 0 22px 40px -18px rgba(36,31,51,0.32); }
.bio-portrait::before {
  content: ''; position: absolute; inset: 14px -14px -14px 14px;
  background: linear-gradient(150deg, var(--accent1), var(--accent2)); border-radius: 20px; opacity: 0.55; z-index: -1;
}
.bio-text p { max-width: 78ch; margin-bottom: 20px; color: #3d3752; font-size: 1.08rem; line-height: 1.85; }
.bio-text p:first-of-type::first-letter {
  font-family: 'Fraunces', serif; font-size: 3.4rem; float: left; line-height: 0.75; padding-right: 10px;
  background: linear-gradient(160deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-row { display: flex; gap: 32px; margin-top: 30px; flex-wrap: wrap; }
.stat { font-family: 'Inter', sans-serif; }
.stat .num {
  font-family: 'Fraunces', serif; font-size: 1.8rem; font-weight: 600;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .cap { font-size: 0.72rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- NOTICIAS ---- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.news-card { padding: 26px; border-radius: 18px; background: #fff; border: 1px solid var(--rule); box-shadow: 0 14px 30px -18px rgba(36,31,51,0.18); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 20px 36px -14px rgba(36,31,51,0.28); }
.news-card .date {
  font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--accent1); text-transform: uppercase; margin-bottom: 10px; display: inline-block;
}
.news-card h3 { font-family: 'Fraunces', serif; font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.news-card p { color: var(--grey); font-size: 0.95rem; }

/* ---- EVENTOS ---- */
.events-list { display: flex; flex-direction: column; gap: 18px; }
.event {
  display: grid; grid-template-columns: 78px 1fr auto; gap: 24px; align-items: center;
  padding: 22px 26px; border-radius: 18px; background: #fff; border: 1px solid var(--rule);
  box-shadow: 0 14px 30px -20px rgba(36,31,51,0.18);
}
.event-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 10px 0; border-radius: 14px;
  background: linear-gradient(160deg, var(--accent1), var(--accent2));
}
.event-date .day { font-family: 'Fraunces', serif; font-size: 1.5rem; color: #fff; font-weight: 600; }
.event-date .month { font-family: 'Inter', sans-serif; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.9); margin-top: 2px; }
.event-body h3 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.15rem; margin-bottom: 4px; }
.event-meta { font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 600; color: var(--accent1); margin-bottom: 6px; }
.event-body p:last-child { color: var(--grey); font-size: 0.95rem; }

/* ---- COMPRAR ---- */
.books-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.book { display: flex; flex-direction: column; }
.book .cover {
  width: 100%; aspect-ratio: 2/3; border-radius: 16px; margin-bottom: 16px; overflow: hidden;
  box-shadow: 0 20px 34px -16px rgba(36,31,51,0.35);
  transition: transform 0.3s cubic-bezier(.22,1,.36,1);
  background: linear-gradient(160deg, var(--accent1), var(--accent2));
  position: relative;
}
.book:hover .cover { transform: translateY(-8px) rotate(-1deg); }
.book .cover img { width: 100%; height: 100%; object-fit: contain; padding: 12px; display: block; position: absolute; inset: 0; }
.book .cover-title {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 18px;
  font-family: 'Fraunces', serif; font-style: italic; color: #fff; font-size: 1.1rem; text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.book .meta { font-family: 'Inter', sans-serif; font-size: 0.8rem; color: var(--grey); margin-bottom: 12px; }
.book .meta strong { display: block; font-family: 'Source Serif 4', serif; font-size: 1rem; color: var(--ink); margin-bottom: 2px; }
.buy-btn {
  display: inline-block; margin-top: auto; align-self: flex-start;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.8rem; text-decoration: none;
  color: #fff; background: linear-gradient(90deg, var(--accent1), var(--accent2));
  padding: 10px 18px; border-radius: 999px; transition: transform 0.2s ease;
}
.buy-btn:hover { transform: translateY(-2px); }

/* ---- CONTACTO ---- */
.contact-inner { max-width: 56ch; }
.contact-inner p { color: var(--grey); margin-bottom: 28px; font-size: 1.05rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; }
.contact-links a {
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.85rem; text-decoration: none;
  padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--rule); transition: border-color 0.2s ease, color 0.2s ease;
}
.contact-links a:hover { border-color: var(--accent1); color: var(--accent1); }

footer.site-footer { text-align: center; padding: 32px 0 44px; font-family: 'Inter', sans-serif; font-size: 0.75rem; color: var(--grey); }

@media (max-width: 760px) {
  .topbar nav ul { display: none; }
  .hero-body { flex-direction: column-reverse; align-items: center; gap: 32px; }
  .portrait { width: 240px; }
  .bio-grid { grid-template-columns: 1fr; }
  .bio-portrait { max-width: 220px; margin: 0 auto 12px; }
  .event { grid-template-columns: 60px 1fr; }
  .event > a { display: none; }
}
