/* ─────────────────────────────────────────────────────────────
   Pasifae Arquitech — Hoja de estilo compartida de páginas de
   detalle de proyecto (/proyectos/<slug>/). Mismo lenguaje visual
   que el resto del sitio.
   ───────────────────────────────────────────────────────────── */

:root {
  --cream: #faf6ef;
  --cream-deep: #f3ede2;
  --ink: #1c1917;
  --ink-soft: #4a4440;
  --terra: #b75c4c;
  --terra-dark: #71362e;
  --terra-soft: #ead3cb;
  --green: #4f8a5b;
  --radius: 24px;
  --nav-h: 72px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--terra);
  color: var(--cream);
}

em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

.label-caps {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* ── Navegación ─────────────────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: color-mix(in srgb, var(--cream) 85%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(28 25 23 / 0.08);
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.nav-brand-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}

.nav-brand-tag {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.6;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.3s;
}

.nav-link:hover {
  opacity: 0.55;
}

.nav-link.is-active {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--terra);
}

.nav-cta {
  font-size: 14px;
  font-weight: 500;
  color: var(--cream);
  background: var(--terra);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 999px;
  transition: background 0.3s;
}

.nav-cta:hover {
  background: var(--terra-dark);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 44px;
  color: var(--cream);
  text-decoration: none;
  padding: 8px 0;
}

body.menu-open .nav-burger span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

body.menu-open .nav-burger span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ── Hero del proyecto ──────────────────────────────────────── */

.proyecto-hero {
  padding: calc(var(--nav-h) + clamp(48px, 10vh, 112px)) 40px clamp(28px, 4vh, 44px);
  max-width: 1100px;
  margin-inline: auto;
}

.proyecto-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--ink-soft);
}

.proyecto-breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.3s;
}

.proyecto-breadcrumb a:hover {
  color: var(--terra);
}

.proyecto-meta {
  color: var(--terra);
  margin-bottom: 18px;
}

.proyecto-title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
  max-width: 20ch;
}

/* ── Portada grande (LCP) ───────────────────────────────────── */

.proyecto-portada {
  max-width: 1400px;
  margin: clamp(24px, 4vh, 40px) auto 0;
  padding-inline: 40px;
}

.proyecto-portada img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  background: var(--cream-deep);
}

/* ── Cuerpo del documento ───────────────────────────────────── */

.proyecto-body {
  padding: clamp(48px, 8vh, 96px) 40px 0;
  max-width: 760px;
  margin-inline: auto;
}

.proyecto-lead {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-bottom: clamp(32px, 5vh, 48px);
  text-wrap: pretty;
}

.proyecto-section {
  margin-bottom: clamp(32px, 5vh, 56px);
}

.proyecto-section h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.proyecto-num {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 0.85em;
  color: var(--terra);
  flex: none;
}

.proyecto-section p,
.proyecto-section li {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.proyecto-section p + p {
  margin-top: 14px;
}

.proyecto-section ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.proyecto-section li {
  margin-bottom: 8px;
}

.proyecto-section li strong {
  color: var(--ink);
  font-weight: 600;
}

blockquote.proyecto-cita {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: 1.32;
  color: var(--ink);
  border-left: 2px solid var(--terra);
  padding-left: 24px;
  margin: clamp(24px, 4vh, 40px) 0;
}

/* Ficha técnica */
.proyecto-ficha {
  background: var(--cream-deep);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.proyecto-ficha div {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 16px;
  align-items: baseline;
}

.proyecto-ficha dt {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--terra);
}

.proyecto-ficha dd {
  font-size: 1.02rem;
  color: var(--ink);
}

/* Señal verde: copy nuestro, a validar */
.authored-star {
  color: var(--green);
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
}

.proyecto-nota-autoria {
  margin-top: clamp(28px, 4vh, 40px);
  font-size: 0.82rem;
  line-height: 1.5;
  color: #3f7a4e;
  border-top: 1px solid rgb(79 138 91 / 0.25);
  padding-top: 16px;
}

/* ── Galería ────────────────────────────────────────────────── */

.proyecto-galeria {
  max-width: 1400px;
  margin: clamp(48px, 8vh, 96px) auto 0;
  padding-inline: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.proyecto-galeria figure {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-deep);
}

.proyecto-galeria img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Navegación entre proyectos ─────────────────────────────── */

.proyecto-nav-proyectos {
  max-width: 1100px;
  margin: clamp(56px, 9vh, 112px) auto 0;
  padding: clamp(32px, 5vh, 48px) 40px;
  border-top: 1px solid rgb(28 25 23 / 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.proyecto-nav-proyectos a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.3s;
}

.proyecto-nav-proyectos a:hover {
  color: var(--terra);
}

.proyecto-nav-proyectos .is-center {
  color: var(--ink-soft);
}

/* ── Footer ─────────────────────────────────────────────────── */

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px 40px;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px solid rgb(28 25 23 / 0.08);
}

.page-footer nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.3s;
}

.page-footer a:hover {
  color: var(--terra);
}

/* ── Reveal ─────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.32, 0.94, 0.6, 1),
    transform 0.7s cubic-bezier(0.32, 0.94, 0.6, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 900px) {
  .nav {
    padding: 0 20px;
  }

  .nav-menu,
  .nav-cta {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .proyecto-hero,
  .proyecto-portada,
  .proyecto-body,
  .proyecto-galeria,
  .proyecto-nav-proyectos {
    padding-inline: 20px;
  }

  .proyecto-galeria {
    grid-template-columns: 1fr;
  }

  .proyecto-ficha div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .page-footer {
    flex-direction: column;
    padding: 24px 20px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}


/* ── Footer de página (consistente en todo el sitio) ───────── */
.page-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 44px 40px;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px solid rgb(28 25 23 / 0.1);
}
.page-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}
.page-footer-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
}
.page-footer-nav a:hover { color: var(--terra); }
.page-footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: center;
  color: var(--ink-soft);
}
.page-footer-contact a { color: var(--ink-soft); text-decoration: none; transition: color 0.3s; }
.page-footer-contact a:hover { color: var(--terra); }
.page-footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid rgb(28 25 23 / 0.08);
}
.page-footer-legal nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.page-footer-legal a { color: var(--ink-soft); text-decoration: none; transition: color 0.3s; }
.page-footer-legal a:hover { color: var(--terra); }

/* ── CTA a servicios (desde cada página de proyecto) ────────── */
.proyecto-cta {
  max-width: 1100px;
  margin: clamp(56px, 9vh, 112px) auto 0;
  padding-inline: 40px;
}
.proyecto-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  background: var(--terra);
  color: var(--cream);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 44px);
}
.proyecto-cta-inner p {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.1;
  color: var(--cream);
  max-width: 22ch;
}
.proyecto-cta-inner a {
  flex: none;
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
}
.proyecto-cta-inner a:hover {
  background: var(--ink);
  color: var(--cream);
}
@media (max-width: 900px) {
  .proyecto-cta { padding-inline: 20px; }
}


/* ── Roll-over del navbar: el texto sube y entra su duplicado serif terracota ── */
.nav-roll {
  position: relative;
  display: inline-block;
  overflow: hidden;
  padding: 3px 10px;
  margin: -3px -10px;
}
.nav-roll:hover { opacity: 1; }
.nav-roll-base {
  display: block;
  transition: transform 0.5s cubic-bezier(0.32, 0.94, 0.6, 1);
}
.nav-roll-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.18em;
  transform: translateY(115%);
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--terra);
  transition: transform 0.5s cubic-bezier(0.32, 0.94, 0.6, 1);
}
.nav-roll:hover .nav-roll-base { transform: translateY(-115%); }
.nav-roll:hover .nav-roll-hover { transform: translateY(0); }
