/*
Theme Name: Cláusula de Escape
Theme URI: https://clausuladeescape.com
Description: Tema personalizado para Cláusula de Escape — bohemio parisino, rigor jurídico.
Version: 1.0
Author: Andrea
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600&family=Jost:wght@300;400;500&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --paper: #F4EFE6;
  --paper-mid: #EBE4D8;
  --ink: #1C1814;
  --rust: #A8341A;
  --stone: #6B6257;
  --warm: #9A8B7A;
  --rule: rgba(28,24,20,0.12);
  --rule-dark: rgba(28,24,20,0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--rust); }

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

/* ── TOPBAR ── */
.topbar {
  background: var(--ink);
  color: rgba(244,239,230,0.5);
  font-family: 'Jost', sans-serif;
  font-size: 0.5rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.55rem 2rem;
}

/* ── HEADER ── */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule-dark);
  padding: 2.5rem 5vw 0;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.header-inner::before,
.header-inner::after {
  content: '✦';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.5rem;
  color: var(--rust);
  opacity: 0.6;
}
.header-inner::before { left: 0; }
.header-inner::after { right: 0; }

.site-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(2.8rem, 6vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.site-name:hover { color: var(--rust); }

.site-tagline {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--stone);
}
.site-tagline::before { content: '— '; color: var(--rust); }
.site-tagline::after { content: ' —'; color: var(--rust); }

/* ── NAVEGACIÓN ── */
.site-nav { padding: 0; width: 100%; }

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  padding: 1rem 1.8rem;
  border-right: 1px solid var(--rule);
  transition: color 0.2s;
  position: relative;
}
.site-nav a:first-child { border-left: 1px solid var(--rule); }
.site-nav a:hover { color: var(--rust); }
.site-nav .current-menu-item a,
.site-nav .current-cat a { color: var(--ink); font-weight: 500; }

/* ── HERO (portada) ── */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  border-bottom: 1px solid var(--rule);
  min-height: 520px;
}

.hero-text {
  padding: 5rem 4rem 5rem 5vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--rule);
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1.8rem;
  color: var(--ink);
}
.hero-title em { font-style: italic; color: var(--rust); }

.hero-body {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--stone);
  max-width: 46ch;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.3rem;
  transition: color 0.2s, border-color 0.2s;
  align-self: flex-start;
}
.hero-cta:hover { color: var(--rust); border-color: var(--rust); }
.hero-cta::after { content: '→'; transition: transform 0.2s; }
.hero-cta:hover::after { transform: translateX(4px); }

.hero-photo { position: relative; overflow: hidden; }
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: sepia(15%) contrast(1.05);
  transition: transform 0.6s ease;
}
.hero-photo:hover img { transform: scale(1.03); }

/* ── SECCIONES ── */
.home-sections {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 5vw;
  border-bottom: 1px solid var(--rule);
}

.section-label {
  font-family: 'Jost', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--rule); }

.sections-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--rule);
}

.section-card {
  padding: 2rem 1.8rem;
  border-right: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
  display: block;
  color: inherit;
}
.section-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.section-card:hover { background: var(--ink); }
.section-card:hover .sec-num { color: var(--rust); }
.section-card:hover .sec-title { color: var(--paper); }
.section-card:hover .sec-desc { color: rgba(244,239,230,0.5); }
.section-card:hover .sec-mood { color: var(--rust); }
.section-card:hover::before { transform: scaleX(1); }

.sec-num {
  font-family: 'Jost', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--rust);
  margin-bottom: 1.2rem;
  transition: color 0.3s;
}
.sec-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 0.8rem;
  transition: color 0.3s;
}
.sec-desc {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 0.7rem;
  line-height: 1.7;
  color: var(--stone);
  margin-bottom: 1.2rem;
  transition: color 0.3s;
}
.sec-mood {
  font-family: 'Jost', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--warm);
  transition: color 0.3s;
}

/* ── ÚLTIMAS ENTRADAS (portada) ── */
.home-posts {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 5vw;
  border-bottom: 1px solid var(--rule);
}

.home-posts-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3rem;
}
.home-posts-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 2rem;
}
.home-posts-header a {
  font-family: 'Jost', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
}

.posts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  border: 1px solid var(--rule);
}

.post-card {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--rule);
  overflow: hidden;
  color: inherit;
}
.post-card:last-child { border-right: none; }
.post-card:hover .post-card-title { color: var(--rust); }

.post-card-img-wrap { overflow: hidden; flex-shrink: 0; }
.post-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  filter: sepia(10%) contrast(1.05);
  transition: transform 0.5s ease;
}
.post-card:hover .post-card-img { transform: scale(1.04); }

.post-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card-cat {
  font-family: 'Jost', sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.7rem;
}
.post-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  margin-bottom: 0.8rem;
  transition: color 0.2s;
}
.post-card-excerpt {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 0.72rem;
  line-height: 1.65;
  color: var(--stone);
  flex: 1;
}
.post-card-date {
  font-family: 'Jost', sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.15em;
  color: var(--warm);
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

/* ── BANNER FOTO ── */
.photo-banner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5vw 4rem;
  border-bottom: 1px solid var(--rule);
}
.photo-banner-inner {
  position: relative;
  height: 280px;
  overflow: hidden;
}
.photo-banner-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: sepia(20%) contrast(1.05);
}
.photo-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28,24,20,0.7) 0%, rgba(28,24,20,0.1) 60%);
  display: flex;
  align-items: center;
  padding: 3rem 4rem;
}
.photo-banner-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 300;
  color: var(--paper);
  max-width: 24ch;
  line-height: 1.4;
}

/* ── SOBRE MÍ (portada) ── */
.home-about {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 5vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}
.about-label {
  font-family: 'Jost', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1.5rem;
}
.home-about h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
.home-about h2 em { font-style: italic; color: var(--rust); }
.home-about p {
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--stone);
  margin-bottom: 1.1rem;
  max-width: 50ch;
}
.about-photo {
  position: relative;
  height: 420px;
  overflow: hidden;
}
.about-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: sepia(15%) contrast(1.05);
}

/* ── ARCHIVO / CATEGORÍA ── */
.archive-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 5vw 2rem;
  border-bottom: 1px solid var(--rule);
}
.archive-eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.8rem;
}
.archive-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.archive-posts {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 5vw;
}

.archive-list { display: grid; gap: 0; }

.archive-item {
  display: grid;
  grid-template-columns: 5rem 1fr 8rem;
  align-items: baseline;
  gap: 2rem;
  padding: 1.8rem 0;
  border-top: 1px solid var(--rule);
  transition: padding-left 0.3s;
  color: inherit;
}
.archive-item:last-child { border-bottom: 1px solid var(--rule); }
.archive-item:hover { padding-left: 0.8rem; }
.archive-item:hover .archive-item-title { color: var(--rust); }

.archive-item-cat {
  font-family: 'Jost', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rust);
}
.archive-item-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.2s;
}
.archive-item-date {
  font-family: 'Jost', sans-serif;
  font-size: 0.58rem;
  color: var(--warm);
  text-align: right;
}

/* ── POST INDIVIDUAL ── */
.single-post {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 5vw 6rem;
}

.post-header {
  padding-bottom: 2.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule-dark);
  position: relative;
}
.post-header::after {
  content: '§';
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem;
  color: var(--paper-mid);
  position: absolute;
  right: 0; top: 0;
  line-height: 1;
}

.post-eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1.2rem;
}
.post-eyebrow a { color: var(--rust); }

.post-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin-bottom: 1.5rem;
}

.post-meta {
  font-family: 'Jost', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
}

.post-content p {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 1.8rem;
  color: var(--ink);
}

.post-content p:first-of-type::first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem;
  font-weight: 700;
  float: left;
  line-height: 0.72;
  margin: 0.1em 0.1em 0 0;
  color: var(--rust);
}

.post-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.8rem;
  margin: 2.5rem 0 1rem;
  font-style: italic;
}

.post-content blockquote {
  border-left: 3px solid var(--rust);
  margin: 2.5rem 0;
  padding: 0.5rem 0 0.5rem 1.8rem;
  font-style: italic;
  color: var(--stone);
}

/* ── PÁGINA SOBRE MÍ ── */
.page-about {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 5vw 6rem;
}
.page-about h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--rule-dark);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}
.page-about p {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 1.6rem;
  color: var(--ink);
  max-width: 62ch;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--ink);
  padding: 2.5rem 5vw;
  margin-top: 0;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--paper);
}
.footer-nav { display: flex; gap: 2rem; }
.footer-nav a {
  font-family: 'Jost', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244,239,230,0.35);
  transition: color 0.2s;
}
.footer-nav a:hover { color: rgba(244,239,230,0.8); }
.footer-copy {
  font-family: 'Jost', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: rgba(244,239,230,0.25);
}

/* ── ANIMACIONES ── */
.reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-photo { height: 300px; }
  .sections-grid { grid-template-columns: 1fr 1fr; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .home-about { grid-template-columns: 1fr; gap: 3rem; }
  .about-photo { height: 280px; }
  .archive-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .archive-item-date { display: none; }
  .site-nav a { padding: 0.8rem 1rem; font-size: 0.55rem; }
}

@media (max-width: 600px) {
  .sections-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
}
