/* ═══════════════════════════════════════════════════
   EXPERIENCIA DE SER — Hoja de estilos compartida
   Aplica a todas las páginas del sitio
═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;1,400;1,500&family=Libre+Baskerville:ital,wght@0,400;1,400&family=DM+Sans:wght@200;300;400&display=swap');

/* ─── VARIABLES ──────────────────────────────────── */
:root {
  --bg:        #F8F6F2;
  --bg-alt:    #F0EDE7;
  --ink:       #1C1917;
  --ink-mid:   #5C5650;
  --ink-soft:  #9C9590;
  --ink-faint: #C8C4BE;
  --accent:    #8B7355;
  --white:     #FFFFFF;
  --line:      #E8E4DE;
  --display:   'Playfair Display', Georgia, serif;
  --serif:     'Libre Baskerville', Georgia, serif;
  --sans:      'DM Sans', sans-serif;
  --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ─── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; object-fit: cover; }

/* ─── CURSOR ─────────────────────────────────────── */
@media (pointer: fine) {
  body { cursor: none; }
  #cursor {
    position: fixed; width: 7px; height: 7px;
    background: var(--accent); border-radius: 50%;
    pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width .35s, height .35s, background .35s;
  }
  #cursor.hover {
    width: 30px; height: 30px;
    background: transparent;
    border: 1px solid var(--accent);
  }
}

/* ─── PROGRESS BAR ───────────────────────────────── */
#progress {
  position: fixed; top: 0; left: 0;
  height: 1px; width: 0%;
  background: var(--accent);
  z-index: 9998;
  transition: width .1s linear;
  pointer-events: none;
}

/* ─── REVEAL ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .12s; }
.d2 { transition-delay: .24s; }
.d3 { transition-delay: .36s; }
.d4 { transition-delay: .48s; }

/* ─── HEADER / NAV ───────────────────────────────── */
header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 1.6rem 3rem;
  transition: background .5s var(--ease), padding .5s var(--ease);
}
header.solid {
  background: rgba(248,246,242,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 1rem 3rem;
}
.logo {
  font-family: var(--display);
  font-size: 1.1rem; font-weight: 400;
  letter-spacing: .06em;
}
.logo em { font-style: italic; color: var(--accent); }

nav.main-nav {
  display: flex; align-items: center; gap: 2.5rem;
}
nav.main-nav a {
  font-family: var(--sans);
  font-size: .68rem; font-weight: 300;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-mid);
  transition: color .3s;
}
nav.main-nav a:hover,
nav.main-nav a.active { color: var(--ink); }
nav.main-nav a.active {
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 1px;
}

.nav-icons {
  display: flex; align-items: center; gap: 1.1rem;
}
.nav-icons a {
  color: var(--ink-soft);
  transition: color .3s;
  display: flex; align-items: center;
}
.nav-icons a:hover { color: var(--accent); }
.nav-icons svg { width: 16px; height: 16px; }

/* hamburger */
.hamburger {
  display: none; flex-direction: column;
  gap: 5px; cursor: pointer;
  background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 1px;
  background: var(--ink);
  transition: transform .4s var(--ease), opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2.2rem;
  opacity: 0; pointer-events: none;
  transition: opacity .5s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu a {
  font-family: var(--display);
  font-size: 2rem; font-weight: 400;
  color: var(--ink); letter-spacing: .04em;
  transition: color .3s;
}
.mobile-menu a:hover { color: var(--accent); }
.mobile-icons {
  display: flex; gap: 1.8rem; margin-top: 1rem;
}
.mobile-icons a { color: var(--ink-soft); transition: color .3s; }
.mobile-icons a:hover { color: var(--accent); }
.mobile-icons svg { width: 20px; height: 20px; }

/* ─── PÁGINA WRAPPER ─────────────────────────────── */
.page-wrap {
  padding-top: 5rem;
}

/* ─── TIPOGRAFÍA GLOBAL ──────────────────────────── */
.section-label {
  font-family: var(--sans);
  font-size: .6rem; font-weight: 300;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--ink-faint);
  display: block; margin-bottom: 2.5rem;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 400; line-height: 1.2;
}
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 3rem;
}
.divider-line {
  width: 1px; height: 64px;
  background: var(--line);
  margin: 0 auto;
}

/* ─── BOTONES ────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .68rem; font-weight: 300;
  letter-spacing: .2em; text-transform: uppercase;
  padding: 1rem 2.2rem;
  transition: background .4s, color .4s, border-color .4s;
  cursor: pointer;
}
.btn-dark {
  color: var(--white); background: var(--ink);
  border: 1px solid var(--ink);
}
.btn-dark:hover { background: transparent; color: var(--ink); }
.btn-outline {
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink-faint);
}
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost {
  color: var(--ink-mid);
  border-bottom: 1px solid var(--line);
  padding: 0 0 3px;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-mid); }

/* ─── POST CARD (compartido en todas las páginas) ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.post-card {
  display: flex; flex-direction: column;
  cursor: pointer;
}
.post-card-img {
  aspect-ratio: 3/2;
  background: var(--bg-alt);
  overflow: hidden; margin-bottom: 1.3rem;
  position: relative;
}
.post-card-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.post-card-img .img-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #E2DDD5 0%, #D0C9BE 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-style: italic;
  font-size: 3.5rem; color: rgba(28,25,23,.07);
  transition: transform .7s var(--ease);
}
.post-card:hover .post-card-img img,
.post-card:hover .img-placeholder { transform: scale(1.04); }

.post-cat {
  font-family: var(--sans);
  font-size: .58rem; font-weight: 300;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .5rem;
  display: block;
}
.post-title {
  font-family: var(--display);
  font-size: 1.1rem; font-weight: 400; line-height: 1.3;
  color: var(--ink); margin-bottom: .6rem;
  display: block;
  transition: color .3s;
}
.post-card:hover .post-title { color: var(--accent); }
.post-excerpt {
  font-size: .85rem; font-weight: 200;
  color: var(--ink-mid); line-height: 1.85;
  margin-bottom: .7rem;
}
.post-meta {
  font-size: .62rem; font-weight: 300;
  letter-spacing: .12em; color: var(--ink-faint);
  display: flex; align-items: center; gap: .6rem;
}
.post-meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%; background: var(--ink-faint);
}

/* ─── TEMAS GRID ─────────────────────────────────── */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.topic-item {
  background: var(--bg-alt);
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center;
  transition: background .4s;
}
.topic-item:hover { background: var(--white); }
.topic-icon {
  font-family: var(--display);
  font-size: 2rem; font-style: italic;
  color: var(--ink-faint); margin-bottom: .8rem;
  display: block; transition: color .4s;
}
.topic-item:hover .topic-icon { color: var(--accent); }
.topic-name {
  font-family: var(--sans);
  font-size: .68rem; font-weight: 300;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-mid);
}
.topic-count {
  font-size: .6rem; color: var(--ink-faint);
  margin-top: .3rem; letter-spacing: .1em;
}

/* ─── NEWSLETTER STRIP ───────────────────────────── */
.newsletter-section {
  background: var(--ink);
  text-align: center;
  padding: 6rem 3rem;
}
.newsletter-section .section-label { color: var(--accent); }
.newsletter-section .section-title { color: var(--white); margin-bottom: 1rem; }
.newsletter-section p {
  font-size: .95rem; font-weight: 200;
  color: rgba(255,255,255,.5);
  line-height: 1.85; margin-bottom: 2.5rem;
}
.form-row {
  display: flex; justify-content: center;
  max-width: 440px; margin: 0 auto;
}
.form-row input {
  flex: 1; padding: 1rem 1.4rem;
  font-family: var(--sans); font-size: .85rem; font-weight: 200;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-right: none; color: var(--white); outline: none;
  transition: border-color .3s;
}
.form-row input::placeholder { color: rgba(255,255,255,.3); }
.form-row input:focus { border-color: rgba(255,255,255,.4); }
.form-row button {
  font-family: var(--sans);
  font-size: .62rem; font-weight: 300;
  letter-spacing: .2em; text-transform: uppercase;
  background: var(--accent); color: var(--white);
  border: 1px solid var(--accent);
  padding: 1rem 1.6rem; cursor: pointer;
  transition: background .4s;
  white-space: nowrap;
}
.form-row button:hover { background: #7a6245; }

/* ─── FOOTER ─────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 4rem 3rem 3rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand p {
  font-size: .82rem; font-weight: 200;
  color: var(--ink-mid); line-height: 1.85;
  max-width: 220px; margin: .8rem 0 1.5rem;
}
.footer-social-row {
  display: flex; gap: 1rem;
}
.footer-social-row a {
  color: var(--ink-soft); transition: color .3s;
}
.footer-social-row a:hover { color: var(--accent); }
.footer-social-row svg { width: 17px; height: 17px; }
.footer-col h4 {
  font-family: var(--sans);
  font-size: .6rem; font-weight: 300;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 1.4rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.footer-col ul li a {
  font-size: .85rem; font-weight: 200;
  color: var(--ink-mid); transition: color .3s;
}
.footer-col ul li a:hover { color: var(--ink); }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  padding: 1.4rem 3rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: .8rem;
}
.footer-bottom span {
  font-size: .62rem; font-weight: 200;
  color: var(--ink-faint); letter-spacing: .1em;
}

/* ─── PÁGINA DE POST (artículo individual) ──────── */
.post-hero {
  padding: 8rem 3rem 4rem;
  max-width: 780px; margin: 0 auto;
  text-align: center;
}
.post-hero .post-cat { justify-content: center; margin-bottom: 1.5rem; }
.post-hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400; line-height: 1.15;
  margin-bottom: 1.5rem;
}
.post-hero .post-intro {
  font-family: var(--display);
  font-size: 1.15rem; font-style: italic;
  color: var(--ink-mid); line-height: 1.8;
  margin-bottom: 2rem;
}
.post-hero .post-meta { justify-content: center; }

.post-cover {
  max-width: 900px; margin: 3rem auto;
  padding: 0 3rem;
  aspect-ratio: 16/7;
  overflow: hidden;
}
.post-cover .cover-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #E5E0D6 0%, #D0C9BC 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-style: italic;
  font-size: 6rem; color: rgba(28,25,23,.06);
}

.post-body {
  max-width: 680px; margin: 0 auto;
  padding: 0 3rem 6rem;
}
.post-body p {
  font-family: var(--serif);
  font-size: 1.05rem; font-weight: 400;
  line-height: 2; color: var(--ink-mid);
  margin-bottom: 1.8rem;
}
.post-body p:first-child { font-size: 1.12rem; color: var(--ink); }
.post-body h2 {
  font-family: var(--display);
  font-size: 1.6rem; font-weight: 400;
  color: var(--ink); margin: 3rem 0 1.2rem;
  line-height: 1.3;
}
.post-body h3 {
  font-family: var(--display);
  font-size: 1.2rem; font-weight: 400;
  font-style: italic; color: var(--ink);
  margin: 2.5rem 0 1rem;
}
.post-body blockquote {
  border-left: 2px solid var(--accent);
  padding: .5rem 0 .5rem 2rem;
  margin: 2.5rem 0;
}
.post-body blockquote p {
  font-family: var(--display);
  font-size: 1.2rem; font-style: italic;
  color: var(--ink); margin: 0; line-height: 1.7;
}

.post-tags {
  display: flex; align-items: center; gap: .8rem;
  flex-wrap: wrap;
  padding: 2.5rem 3rem;
  max-width: 680px; margin: 0 auto;
  border-top: 1px solid var(--line);
}
.post-tag {
  font-family: var(--sans);
  font-size: .6rem; font-weight: 300;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-mid);
  border: 1px solid var(--line);
  padding: .4rem .9rem;
  transition: border-color .3s, color .3s;
}
.post-tag:hover { border-color: var(--ink-mid); color: var(--ink); }

/* ─── PÁGINA DE CATEGORÍA ────────────────────────── */
.category-hero {
  padding: 9rem 3rem 4rem;
  max-width: 1100px; margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.category-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 400; line-height: 1.05;
  margin-bottom: 1rem;
}
.category-hero h1 em {
  font-style: italic; color: var(--accent);
}
.category-hero p {
  font-size: 1rem; font-weight: 200;
  color: var(--ink-mid); line-height: 1.9;
  max-width: 480px;
}

/* ─── MOBILE ─────────────────────────────────────── */
@media (max-width: 900px) {
  header, header.solid { padding: 1.1rem 1.5rem; }
  nav.main-nav { display: none; }
  .nav-icons { display: none; }
  .hamburger { display: flex; }

  .section-inner { padding: 4rem 1.5rem; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
  .post-hero, .post-cover, .post-body, .post-tags { padding-left: 1.5rem; padding-right: 1.5rem; }
  .category-hero { padding: 7rem 1.5rem 3rem; }
}
@media (max-width: 580px) {
  .posts-grid { grid-template-columns: 1fr; }
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .form-row input { border-right: 1px solid rgba(255,255,255,.15); border-bottom: none; }
}
