/* ============================================================
   drzea.com — Sistema visual
   Tinta profunda + oro. Fraunces display / Inter body.
   Todos los colores y fuentes se controlan desde :root (BD).
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }
.eyebrow, .kicker {
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin: 0 0 1rem;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block; padding: .85rem 1.7rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; transition: transform .25s ease, box-shadow .25s ease, background .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: .55rem 1.2rem; font-size: .85rem; }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 6px 24px color-mix(in srgb, var(--gold) 35%, transparent); }
.btn-gold:hover { box-shadow: 0 10px 32px color-mix(in srgb, var(--gold) 50%, transparent); }
.btn-ghost { border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); color: var(--gold); }
.btn-ghost:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.btn-ghost-dark { border: 1px solid var(--ink); color: var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: var(--paper); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--ink) 85%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--gold) 25%, transparent);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 42px; }
.brand-mark {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: #fff;
}
.brand-mark::after { content: '.'; color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a:not(.btn) {
  color: #E8EAF0; font-size: .92rem; font-weight: 500; position: relative;
}
.nav-links a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--gold); transition: width .25s ease;
}
.nav-links a:not(.btn):hover::after { width: 100%; }
.nav-burger { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  background: var(--ink); color: #F2F3F7; overflow: hidden;
  padding: 130px 0 90px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 80% 10%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, color-mix(in srgb, var(--gold) 8%, transparent), transparent 60%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0; opacity: .35;
  background-image: radial-gradient(color-mix(in srgb, #fff 7%, transparent) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}
.hero-inner { position: relative; max-width: 860px; }
.hero-title {
  color: #fff;
  background: linear-gradient(115deg, #fff 55%, var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 1.15rem; color: #B9C0CF; max-width: 58ch; margin: 1.2rem 0 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Firma: ECG */
.ecg { width: min(680px, 100%); height: 64px; margin: .4rem 0 0; }
.ecg svg { width: 100%; height: 100%; }
.ecg-line {
  fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gold) 65%, transparent));
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  animation: ecg-draw 3.2s ease-out .4s forwards;
}
@keyframes ecg-draw { to { stroke-dashoffset: 0; } }

/* ---------- Stats ---------- */
.stats { background: var(--ink); padding: 0 0 70px; color: #fff; }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px;
  background: color-mix(in srgb, var(--gold) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
  border-radius: 16px; overflow: hidden;
}
.stat { background: color-mix(in srgb, var(--ink) 92%, #fff); padding: 1.8rem 1.5rem; }
.stat-n { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--gold); }
.stat-l { font-size: .85rem; color: #A7AFC0; margin-top: .3rem; }

/* ---------- Secciones ---------- */
.section { padding: 110px 0; }
.section-dark { background: var(--ink); color: #EDEFF4; }
.section-dark h2 { color: #fff; }
.section-dark .lead { color: #A9B1C2; }
.section-paper { background: color-mix(in srgb, var(--paper) 60%, #fff); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }

/* Sobre mí */
.about-grid { display: grid; grid-template-columns: 380px 1fr; gap: 4rem; align-items: center; }
.about-media { position: relative; }
.about-media img, .about-placeholder {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 14px; position: relative; z-index: 1;
}
.about-placeholder {
  background: linear-gradient(150deg, var(--ink), color-mix(in srgb, var(--ink) 70%, var(--gold)));
  display: grid; place-items: center;
}
.about-placeholder span { font-family: var(--font-display); font-size: 7rem; color: var(--gold); opacity: .85; }
.about-frame {
  position: absolute; inset: 18px -18px -18px 18px; border: 1.5px solid var(--gold);
  border-radius: 14px; z-index: 0;
}

/* Servicios */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; margin-top: 2.6rem; }
.service {
  border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent);
  border-radius: 16px; padding: 2rem 1.6rem;
  background: color-mix(in srgb, var(--ink) 94%, #fff);
  transition: transform .3s ease, border-color .3s, box-shadow .3s;
}
.service:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 18px 44px color-mix(in srgb, #000 45%, transparent);
}
.service-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold); font-size: 1.3rem; margin-bottom: 1.1rem;
}
.service h3 { color: #fff; }
.service p { color: #A9B1C2; font-size: .95rem; }

/* Casos */
.cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; margin-top: 2.4rem; }
.case {
  border-left: 3px solid var(--gold);
  background: #fff; border-radius: 0 14px 14px 0; padding: 1.8rem 1.6rem;
  box-shadow: 0 8px 30px color-mix(in srgb, var(--ink) 8%, transparent);
  transition: transform .3s ease;
}
.case:hover { transform: translateY(-4px); }
.case-index { font-family: var(--font-display); font-size: .95rem; color: var(--gold); font-weight: 700; letter-spacing: .1em; }
.case h3 { margin-top: .4rem; }
.case p { color: var(--muted); font-size: .95rem; }

/* Blog cards */
.section-head-actions { display: flex; align-items: center; gap: .6rem; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.6rem; }
.blog-grid--three { grid-template-columns: repeat(3, 1fr); }
.post-card {
  background: #fff; border-radius: 18px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--ink) 7%, transparent);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  display: flex; flex-direction: column;
}
.post-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  box-shadow: 0 22px 50px color-mix(in srgb, var(--ink) 15%, transparent);
}
.post-cover { aspect-ratio: 16/10; overflow: hidden; position: relative; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.post-card:hover .post-cover img { transform: scale(1.06); }
/* Portada sin imagen: bloque de marca con inicial */
.post-cover--empty {
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 55%),
    linear-gradient(150deg, var(--ink), color-mix(in srgb, var(--ink) 78%, var(--gold)));
}
.post-cover--empty span { font-family: var(--font-display); font-size: 3.4rem; color: var(--gold); opacity: .9; }
.post-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-cat { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.post-body h3 { margin: .5rem 0 .4rem; font-size: 1.12rem; }
.post-body p { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-body time { font-size: .78rem; color: var(--muted); margin-top: auto; }

/* Carrusel de la portada */
.blog-carousel {
  display: flex; gap: 1.4rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .4rem .2rem 1.2rem; margin: 0 -.2rem;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 25%, transparent) transparent;
}
.blog-carousel::-webkit-scrollbar { height: 6px; }
.blog-carousel::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 99px; }
.carousel-item { scroll-snap-align: start; flex: 0 0 clamp(280px, calc((100% - 2.8rem) / 3), 380px); }
.carousel-btn {
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  background: #fff; color: var(--ink); font-size: 1.3rem; line-height: 1;
  display: grid; place-items: center; transition: background .25s, color .25s, transform .25s;
}
.carousel-btn:hover { background: var(--ink); color: var(--gold); transform: translateY(-2px); }
.carousel-btn:disabled { opacity: .35; cursor: default; transform: none; background: #fff; color: var(--ink); }

/* Artículo destacado en /blog.php */
.post-featured {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; margin-bottom: 2.6rem;
  background: #fff; border-radius: 20px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
  box-shadow: 0 10px 40px color-mix(in srgb, var(--ink) 10%, transparent);
  transition: transform .35s ease, box-shadow .35s ease;
}
.post-featured:hover { transform: translateY(-4px); box-shadow: 0 24px 60px color-mix(in srgb, var(--ink) 16%, transparent); }
.post-featured-media { position: relative; min-height: 320px; overflow: hidden; }
.post-featured-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.post-featured:hover .post-featured-media img { transform: scale(1.05); }
.post-featured-media.post-cover--empty span { font-size: 5rem; }
.post-featured-body { padding: 2.4rem 2.2rem; display: flex; flex-direction: column; justify-content: center; }
.post-featured-body h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: .6rem 0 .8rem; }
.post-featured-body p { color: var(--muted); margin: 0 0 1.4rem; }
.post-featured-meta { display: flex; align-items: center; gap: 1.2rem; }
.post-featured-meta time { font-size: .85rem; color: var(--muted); }
.read-more { color: var(--gold); font-weight: 600; font-size: .9rem; }

.pager { display: flex; gap: .5rem; justify-content: center; margin-top: 2.6rem; }
.pager a {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); font-weight: 600;
}
.pager a.active { background: var(--ink); color: var(--gold); border-color: var(--ink); }

/* Página interior / artículo */
.page-hero { background: var(--ink); color: #fff; padding: 160px 0 70px; }
.article-wrap { max-width: 760px; }
.article-cover { border-radius: 16px; margin-bottom: 2.2rem; }
.article-content { font-size: 1.06rem; }
.article-content img { border-radius: 12px; margin: 1.5rem 0; }
.article-content h2, .article-content h3 { margin-top: 2rem; }
.article-content blockquote {
  border-left: 3px solid var(--gold); margin: 1.6rem 0; padding: .4rem 0 .4rem 1.3rem;
  color: var(--muted); font-style: italic;
}
.article-back { margin-top: 3rem; }
.article-back a { color: var(--gold); font-weight: 600; }

/* Contacto */
.contact-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.contact .lead { margin-left: auto; margin-right: auto; }
.contact-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* Footer */
.footer { background: color-mix(in srgb, var(--ink) 96%, #000); color: #9AA3B5; padding: 60px 0 30px; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-display); font-size: 1.2rem; color: #fff; }
.footer-tag { font-size: .85rem; margin-top: .3rem; max-width: 40ch; }
.footer-links { display: flex; flex-direction: column; gap: .5rem; font-size: .9rem; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid color-mix(in srgb, #fff 8%, transparent); margin-top: 2.4rem; padding-top: 1.4rem; font-size: .8rem; }

/* ---------- Animaciones de aparición ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ecg-line { animation: none; stroke-dashoffset: 0; }
  .btn, .service, .case, .post-card, .post-cover img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .blog-grid--three { grid-template-columns: repeat(2, 1fr); }
  .post-featured { grid-template-columns: 1fr; }
  .post-featured-media { min-height: 220px; }
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-media { max-width: 340px; }
  .blog-grid--three { grid-template-columns: 1fr; }
  .carousel-item { flex-basis: 82%; }
  .nav-links {
    position: fixed; top: 72px; right: 0; left: 0;
    background: var(--ink); flex-direction: column; padding: 1.5rem; gap: 1.2rem;
    transform: translateY(-130%); transition: transform .3s ease;
  }
  .nav-links.open { transform: none; }
  .nav-burger { display: block; }
  .nav { background: var(--ink); }
  .section { padding: 80px 0; }
}
